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?