callback::acs_mail_lite::incoming_email::impl::acs-mail-lite (private, deprecated)
callback::acs_mail_lite::incoming_email::impl::acs-mail-lite \ -array array -package_id package_id
Defined in packages/acs-mail-lite/tcl/acs-mail-lite-callback-procs.tcl
Deprecated. Invoking this procedure generates a warning.
Implementation of the interface acs_mail_lite::incoming_email for acs-mail-lite. This proc takes care of emails bounced back from mailer daemons. The required syntax for the To header is as follows: EnvelopPrefix-user_id-signature-package_id@myhost.com. This email was set for the Return-Path header of the original email. The signature is created by calculating the SHA value of the original Message-Id header. Thus an email is valid if the signature is correct and the user is known. If this is the case we record the bounce.
- Switches:
- -array (required)
- An array with all headers, files and bodies. To access the array you need to use upvar.
- -package_id (required)
- The package instance that registered the prefix
- Returns:
- nothing
- Error:
- Author:
- Nima Mazloumi <nima.mazloumi@gmx.de>
- Created:
- 2005-07-15
- See Also:
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
Source code: ::callback::acs_mail_lite::incoming_email::contract__arg_parser {*}$args ad_log_deprecated proc callback::acs_mail_lite::incoming_email::impl::acs-mail-lite upvar $array email # for email_queue, header info is already parsed if { [info exists email(aml_to_addrs)] } { set to $email(aml_to_addrs) } else { set to [acs_mail_lite::parse_email_address -email $email(to)] } ns_log Debug "acs_mail_lite::incoming_email -impl acs-mail-lite called. Recipient $to" if { ![info exists email(aml_user_id)] } { # # GN: acs_mail_lite::parse_bounce_address is deprecated. # # Should # we use here acs_mail_lite::inbound_email_context, or should # acs_mail_lite::incoming_email (and load_mails) be also deprecated # and only # - acs_mail_lite::maildir_check_incoming and # - acs_mail_lite::imap_check_incoming # should be called? # # Traditional call parses here. Queue case is pre-parsed. lassign [acs_mail_lite::parse_bounce_address -bounce_address $to] user_id package_id signature } else { set user_id $email(aml_user_id) set package_id $email(aml_package_id) # signature could come from a number of headers. Pre-parsing # makes signature obsolete here. set signature "" } # The above adaptions make this proc usable with newer versions of # code in the legacy paradigm. # Sadly, this bounces all cases with a user_id so it is not # usable for the new inbound email callback scheme. # If no user_id found or signature invalid, ignore message if {$user_id eq ""} { ns_log Debug "acs_mail_lite::incoming_email impl acs-mail-lite: No equivalent user found for $to" } else { ns_log Debug "acs_mail_lite::incoming_email impl acs-mail-lite: Bounce checking $to, $user_id" acs_mail_lite::record_bounce -user_id $user_id }XQL Not present: PostgreSQL, Oracle Generic XQL file: <fullquery name="callback::acs_mail_lite::incoming_email::impl::acs-mail-lite.record_bounce"> <querytext> update acs_mail_lite_bounce set bounce_count = bounce_count + 1 where party_id = :user_id </querytext> </fullquery> <fullquery name="callback::acs_mail_lite::incoming_email::impl::acs-mail-lite.insert_bounce"> <querytext> insert into acs_mail_lite_bounce (party_id, bounce_count) values (:user_id, 1) </querytext> </fullquery>packages/acs-mail-lite/tcl/acs-mail-lite-callback-procs.xql