virtual alias maps rewriting headers

(no email)
Date: Fri Sep 01 2006 - 19:55:15 EDT

  • Next message: Wietse Venema: "Re: Multiple HELO names"

    I'm running Postfix 2.1.5 on an Xserve along with the other
    open-source mail software bundled with OS X Server 10.4. This server
    exists is bound to a MS active directory (AD) Our primary
    mail domain hosted on that server is Since our Xserve
    is bound to AD, users in AD are treated like local users--their
    account name is their 6-digit numeric ID (fully qualified =
    ), however, their assigned internet mail address is
    different (e.g. ). My goal is to have a working
    system that uses their assigned address in all visual headers so the
    user doesn't ever see their actual account. Also, we want to prohibit
    users from sending mail to each other at their <id>
    address. I'm rewriting envelope and header addresses with
    virtual_alias_maps and sender_canonical_maps. virtual_alias_maps
    rewrites envelope recipients for incoming mail from our mail filter.
    This setup is working fine for internal <-> external mail but users
    cannot mail other users (or themselves) at their assigned addresses
    ( because **the virtual alias maps is rewriting the
    recipient**. Is there any way to prevent/override virtual_alias_maps
    rewriting the recipient address while still allowing
    sender_canonical_maps to rewrite the sender address? (maybe I'm
    needing a new receive_override_options option to disable virtual alias
    map expansion but not canonical address mapping)

    An example with log:

    A message from user (e-mail address = )
    sends a message to user at their e-mail address

    Log shows:
    1 postfix/smtpd[7034]: connect from localhost[]
    2 postfix/smtpd[7034]: C23441214C7: client=localhost[]
    3 postfix/cleanup[7037]: C23441214C7:
    4 postfix/qmgr[4831]: C23441214C7: from=<>, size=753,
    nrcpt=1 (queue active)
    5 postfix/smtpd[7034]: disconnect from localhost[]
    6 postfix/smtp[7038]: C23441214C7: to=<>,
    delay=0, status=sent (250 Message received OK)
    7 postfix/qmgr[4831]: C23441214C7: removed

    You'll notice on line 4 that sender_canonical correctly rewrote the
    sender address from 111222 to , however, virtual
    alias maps rewrote the recipient as shown in line 6. The mail filter
    sees this recipient and throws and NDR because it can't resolve includes the following:
     content_filter = smtp:[]
     mailbox_transport = cyrus
     mydestination = $myhostname,, localhost.$mydomain,
    localhost, $mydomain
     mydomain =
     mydomain_fallback = localhost
     myhostname =
     mynetworks =,,
     sender_canonical_maps = hash:$config_directory/sender_canonical
     virtual_alias_domains = hash:$config_directory/virtual_domains
     virtual_alias_maps = hash:$config_directory/virtual
     virtual_transport = lmtp:unix:/var/imap/socket/lmtp


    sender_canonical table is exact opposite of virtual table

  • Next message: Wietse Venema: "Re: Multiple HELO names"

    Hosted Email Solutions

    Invaluement Anti-Spam DNSBLs

    Powered By FreeBSD   Powered By FreeBSD