I'm trying to get postfix --smtp--> amavisd --lmtp--> dovecot all setup and 
working nicely together.  I've configured amavisd as a before_queue filter in 
Postfix.

smtpd     pass  -       -       n       -       20       smtpd
        -o smtpd_proxy_filter=127.0.0.1:10024
        -o smtpd_client_connection_count_limit=10
        -o smtpd_proxy_options=speed_adjust


If I send a message to a recipient's address that is found via 
virtual_mailbox_map then that same address is passed to the before_queue 
filter.  If I send a message to a recipient's address that is found via 
virtual_alias_maps, then the alias address is passed instead of the result of 
the lookup.

Both maps are setup to use LDAP, both maps are identical.

[root@mta03 /opt/local/etc/postfix]# cat ldap_virtual_alias_maps.cf 
server_host = ldap://ldapserver/
search_base = dc=coyp
version = 3
bind = yes
bind_dn = cn=user,dc=coyp
bind_pw = ***
query_filter = 
(&(ObjectClass=inetLocalMailRecipient)(|(mail=%s)(mailLocalAddress=%s)))
result_format = %s
result_attribute = mail


Here are the headers from a message sent without the content filter in place

> Received: from relay.coyp.dc ([10.0.0.52])
>         by localhost (Dovecot) with LMTP id UvV1MIg9UFQBTQAA0J78UA
>         for <[email protected]>; Wed, 29 Oct 2014 01:06:16 +0000
              ^^^^^^^^ -- found via mailbox lookup
> Received: from chad (unknown [10.0.0.171])
>         by relay.coyp.dc (Postfix) with SMTP id 3jSBRz3dL9zfq6
>         for <[email protected]>; Tue, 28 Oct 2014 20:06:07 -0500 (CDT)
              ^^^^^^ -- found via alias lookup


Can I get Postfix to do the alias lookup and substitution before sending to the 
content filter?


Thank you,
Chad


Reply via email to