acs_mail_lite::unique_id_parse (private)

 acs_mail_lite::unique_id_parse -message_id message_id

Defined in packages/acs-mail-lite/tcl/email-inbound-procs.tcl

Parses a signed message-id created by acs_mail_lite::unique_id_create. Returns package_id, party_id, object_id, other, datetime_cs in a name value list. Invalid addresses or missing mappings yield empty values. datetime_cs is approximate system time in seconds from epoch when the header was created. Use bounce_address_valid_p when only address validation is needed.

Switches:
-message_id (required)
See Also:

Partial Call Graph (max 5 caller/called nodes):
test_acs_mail_lite_bounce_address_roundtrip acs_mail_lite_bounce_address_roundtrip (test acs-mail-lite) acs_mail_lite::unique_id_parse acs_mail_lite::unique_id_parse test_acs_mail_lite_bounce_address_roundtrip->acs_mail_lite::unique_id_parse test_acs_mail_lite_inbound_procs_check acs_mail_lite_inbound_procs_check (test acs-mail-lite) test_acs_mail_lite_inbound_procs_check->acs_mail_lite::unique_id_parse acs_mail_lite::ValidBounceSignedId acs_mail_lite::ValidBounceSignedId (private) acs_mail_lite::unique_id_parse->acs_mail_lite::ValidBounceSignedId db_list_of_lists db_list_of_lists (public) acs_mail_lite::unique_id_parse->db_list_of_lists acs_mail_lite::inbound_email_context acs_mail_lite::inbound_email_context (private) acs_mail_lite::inbound_email_context->acs_mail_lite::unique_id_parse

Testcases:
acs_mail_lite_bounce_address_roundtrip, acs_mail_lite_inbound_procs_check
Source code:
    lassign {} package_id party_id object_id other datetime_cs
    set unique_part [acs_mail_lite::ValidBounceSignedId $message_id]
    if {$unique_part ne ""} {
        # Only the hash case may differ from the stored generated message ID.
        # Keep the signed identifier case sensitive and the lookup indexed.
        set hash_start [expr {[string length $unique_part] - 40}]
        set stem [string range $unique_part 0 $hash_start-1]
        set hash [string range $unique_part $hash_start end]
        set upper_signature_part $stem[string toupper $hash]
        set lower_signature_part $stem[string tolower $hash]
        set p_lists [db_list_of_lists acs_mail_lite_send_msg_id_map_r1all {
            select package_id, party_id, object_id, other, datetime_cs
            from acs_mail_lite_send_msg_id_map
            where msg_id in (:upper_signature_part, :lower_signature_part)
        }]
        lassign [lindex $p_lists 0] package_id party_id object_id other datetime_cs
    }
    return [list package_id $package_id party_id $party_id object_id $object_id  other $other datetime_cs $datetime_cs]
XQL Not present:
PostgreSQL, Oracle
Generic XQL file:
packages/acs-mail-lite/tcl/email-inbound-procs.xql

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