Forum OpenACS Q&A: email relay

Collapse
Posted by Jon Griffin on
I'm working on a legacy site (very legacy) and wonder if there is a way to add a relay to send notifications. i.e. http://smtp-relay.gmail.com/

This server is being retired in several months (max) so I just need to fix that in the meantime. Another option, just stop notifications from being sent.

Ideas?

Collapse
2: Re: email relay (response to 1)
Posted by Gustaf Neumann on
There are several options:

Suspending notification handling:
- Notification is handled by sweep_notifications, registered by [1], if you disable (i.e. comment out) the registry of the schedules procedures, this processing stops.
- in general different delivery methods are allowed configured, default is "email", and the delivery works over [2]

Suspending outgoing emails:
- mail sending works for non immediate cases vial a mail queue, which is processed via acs_mail_lite::sweeper [3]
- one can deactivate the sweeper by commenting out the
registry of the scheduled procedure in [4]

Deactivating schedules procedures can also be done by getting the scheduled id (e.g. via nsstats) and unregister the scheduled proc.

One can also deactivate mail queue processing temporarily (without server stopping) be setting the nsv "acs_mail_lite send_mails_p" to a value larger than 0, telling the sweeper, that it should not process it.

For configuring SMTP delivery, the following parameter in acs-mail-lite can be used: SMTPHost, SMTPTimeout, SMTPPort, SMTPUser, SMTPPassword. Adjusting these parameter should be sufficient for most mail relays.

Hope this helps
-gn

[1] packages/notifications/tcl/sweep-init.tcl
[2] https://openacs.org/api-doc/proc-view?proc=acs_mail_lite::send&source_p=1
[3] https://openacs.org/api-doc/proc-view?proc=acs_mail_lite::sweeper&source_p=1
[4] packages/acs-mail-lite/tcl/acs-mail-lite-init.tcl

Collapse
3: Re: email relay (response to 1)
Posted by Jon Griffin on
Thanks! That will work fine. I would normally try to update everything, but the site is very old and the company got bought so they are switching everything to salesforce.