Forum OpenACS Development: Notification e-mail creation doubt

Collapse
Posted by Eduardo Santos on
Hi everybody,

The reply by e-mail seems to be not working anymore in my system and I'm doing some investigation in possible causes. I'm using notification 5.3.0d1 and acs-mail-lite 5.3.2, and I keep seeing this error in the log:

Notice: acs-mail-lite: bounce_address not found
Notice: acs-mail-lite: No user id found

So, I found the proc acs_mail_lite::parse_bounce_address in the file acs-mail-lite/tcl/acs-mail-lite-procs.tcl wich has been moved another file in oacs-5-4, but it didn't change the code. This proc has the following regular expression to find the mail data:


set regexp_str "^[bounce_prefix]-(\[0-9\]+)-(\[^-\]+)-(\[0-9\]+)\@"
if {![regexp $regexp_str $bounce_address all user_id signature package_id]} {
ns_log Notice "acs-mail-lite: $bounce_address not found"
return ""
}

This regexp supose the e-mail has three different numbers, something like mailto:notification-00000-0000-0000@domain.com. However, looking at my system messages, I've realized that the e-mail reply address has only two numbers, something like mailto:notification-4263234-1213@domain.com.

To find out this difference, I've tried to find the place where the mail is created, and I found the proc notification::email::reply_address in the file notification/tcl/notification-email-procs.tcl, wich has the following code:


ad_proc -public reply_address {
{-object_id:required}
{-type_id:required}
} {
if {[empty_string_p $object_id] || [empty_string_p $type_id]} {
return "[address_domain] mailer <[reply_address_prefix]@[address_domain]>"
} else {
return "[address_domain] mailer <[reply_address_prefix]-$object_id-$type_id@[address_domain]>"
}
}

This proc shows me that the generated e-mail has only two numbers, using object_id and type_id. I don't know where this difference comes from. The acs_mail_lite proc above presumes that the e-mail has three fields: user_id, signature and package_id, so the order is different from the generated e-mail. I've searched the docs, but I couldn't find any reason for this. Can somebody explain me how this works and maybe help me to find this error?

Collapse
Posted by Dave Bauer on
Notifications has its own incoming email parser see
http://cvs.openacs.org/cvs/openacs-4/packages/notifications/tcl/notification-email-procs.tcl?rev=1.31.2.1&view=markup
for example.

For forums reply by email it should be handled by the notifications package.

Collapse
Posted by Eduardo Santos on
Hi Dave,

Thank you for the answer. So, there seems to be a conflict between acs_mail_lite::sweeper and the procs notification::reply::sweep::scan_all_replies and notification::reply::sweep::process_all_replies. If I disable the first one and let the other two work, it seems to be ok.

So can you tell me what is this acs_mail_lite proc for?

Collapse
Posted by Emmanuelle Raffenne on
Eduardo,

acs_mail_lite::sweeper sends the messages of the acs-mail-lite queue. It doesn't take part in processing bounced messages nor notification replies.

Collapse
Posted by Dave Bauer on
I am not sure why there are two. Ideally there would not be.

For my clients, we setup two maildirs, one for bounce-* emails and one for notification-* emails.

The acs-mail-lite sweeper checks the bounce Maildir and notifications checks the notificaiton Maildir.

If you have both packages configured to use the same Maildir, one or the other will sweep and delete all the email intended for the other package.