hi-

i'm not quite certain the subject is an accurate synopsis.  apologies if it's 
misleading.  we have a proprietary system which delivers voicemail messages as 
email attachments.  it submits mail via submission to postfix, which looks like 
this:

Sep 18 16:03:33 msa postfix/submission/smtpd[21286]: 3hzTdK1j5ZzyQn: 
client=phonesrv.example.com[10.25.40.1], sasl_method=LOGIN, 
sasl_username=phonesrv
Sep 18 16:03:33 msa postfix/cleanup[21289]: 3hzTdK1j5ZzyQn: 
message-id=<[email protected]>
Sep 18 16:03:33 msa postfix/qmgr[11026]: 3hzTdK1j5ZzyQn: 
from=<VOICE/[email protected]>, size=385664, nrcpt=1 (queue 
active)
Sep 18 16:03:33 msa postfix/internal/smtp[21290]: 3hzTdK1j5ZzyQn: 
to=<[email protected]>, relay=mta.example.com[10.3.70.5]:25, delay=0.11, 
delays=0.04/0.02/0.01/0.05, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as 
3hzTdK2DdyzJmy2)
Sep 18 16:03:33 msa postfix/qmgr[11026]: 3hzTdK1j5ZzyQn: removed

occasionally, misconfiguration of the system [e.g. a typo, etc.] results in 
attempted delivery to an invalid address, which postfix of course rejects.  the 
client then generates a bounce to <VOICE/[email protected]>, 
which comes back to postfix, since the client relays all mail through postfix.  
to ensure this is seen by the right people, i've done this:

main.cf:
    recipient_canonical_maps = hash:${table_directory}/canonical_recipients
    virtual_alias_maps =
        proxy:ldap:${table_directory}/virtual_alias_maps-address_literals.cf
        proxy:ldap:${table_directory}/virtual_alias_maps-domains.cf

canonical_recipients:
    @phonesrv.example.com                       
[email protected]

[email protected] is a virtual alias:

>postmap -q '[email protected]' 
>ldap:./virtual_alias_maps-domains.cf 
[email protected],[email protected]

this works, but in the received message there is no reference to 
[email protected] - only:

From: [email protected]
To: "VOICE/1nnn5551212"@phonesrv.example.com

how can i add a reference in the message to the recipient_canonical_maps lookup 
result [a header, preferably?]?  i'd like to do this so the name of the 
distribution list/virtual alias can be used in the mua for filtering to a 
specific mailbox.  i know there are other criteria which would function for the 
purposes of filtering, but i'd like to use this method if possible.  it would 
allow me to avoid reliance on strings/characteristics from the proprietary 
system, which may change.

thanks
-ben

Reply via email to