Forum OpenACS Development: Re: RFC: New OpenACS Mail Procedures

Posted by Mat Kovach on
I have added the following to acs-mail-lite (some of it stolen from various areas or suggestions from others.  I admit I have given complete credit in the comments, I'll clean that up shortly).

SMTP or /usr/sbin/sendmail support.

You can now send emails using SMTP (a modified version of ns_sendmail) or /usr/sbin/sendmail (which all major UNIX MTA's support).

Message-ID: support.

If not provided, a Message-ID: header will be added to the provide email before it is sent.  The message id that is created is:

<[ns_time].acs_mail_lite_sequence_id.[ns_rand 32767].oacs@domain]>

Some public functions have been addeded to parse an email address, among others.

Bounce support.

Simple bounce support.  For each email sent, and envolope address is created in the form:

(where bounce can be a use set option).

Bounces are recorded in the database.  If the time of the first recorded bounce is more that 10 days ago, a notification email will be sent and all bounces for the user will be removed from the database.  If a bounce is received after the notification is sent, email_bouncing_p is set to 't' in the users table.

I have tested this lightly with bulk-mail and notifications.
Currently oracle support is limited.  Anybody that has a working oracle installation a bit for time feel free to update the oracle sql.

The following problems will be worked on this week:

Schedule processes to remove bounces older than 10 days and remove old notifications that did not receive a bounce after 24 hours.

Additional parameters to allow adminstrators change the queue run period, bounce measurement period, and the notifcation monitor period.


Clean up various bits of the code.

We need to decieded on a way to advise the user their mail is currently bouncing to the system and has been disabled.  We should also include a way to allow the user to verify their email address to re-enable email.

Note:  I bumped up the version of acs-mail-lite to 0.36a.  A for alpha and .36 because my parents celebrate 36 years of wedding bliss today :->

You can download the code:



or (in the openacs directory)

Questions, comments, patches? please send to