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: 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.

-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
Nima Mazloumi <>

See Also:

Partial Call Graph (max 5 caller/called nodes):
%3 acs_mail_lite::parse_bounce_address acs_mail_lite::parse_bounce_address (public, deprecated) acs_mail_lite::parse_email_address acs_mail_lite::parse_email_address (private) acs_mail_lite::record_bounce acs_mail_lite::record_bounce (public, deprecated) ad_get_tcl_call_stack ad_get_tcl_call_stack (public) callback::acs_mail_lite::incoming_email::impl::acs-mail-lite callback::acs_mail_lite::incoming_email::impl::acs-mail-lite callback::acs_mail_lite::incoming_email::impl::acs-mail-lite->acs_mail_lite::parse_bounce_address callback::acs_mail_lite::incoming_email::impl::acs-mail-lite->acs_mail_lite::parse_email_address callback::acs_mail_lite::incoming_email::impl::acs-mail-lite->acs_mail_lite::record_bounce callback::acs_mail_lite::incoming_email::impl::acs-mail-lite->ad_get_tcl_call_stack

No testcase defined.
Source code:
    ::callback::acs_mail_lite::incoming_email::contract__arg_parser {*}$args
ns_log Notice "Deprecated proc callback::acs_mail_lite::incoming_email::impl::acs-mail-lite used:\n[ad_get_tcl_call_stack]"

    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">

       update acs_mail_lite_bounce
       set bounce_count = bounce_count + 1
       where party_id = :user_id


<fullquery name="callback::acs_mail_lite::incoming_email::impl::acs-mail-lite.insert_bounce">

       insert into acs_mail_lite_bounce (party_id, bounce_count)
       values (:user_id, 1)


[ hide source ] | [ make this the default ]
Show another procedure: