Hi there,
This is I wish to accomplish with one single instance of Postfix that
has two different IPs. Having traffic coming to one IP be processed
differently than the other, and use LDAP to validate domain &
recipients.
This is master.cf: (I do not know how to define separate transports)
<IP 1>:smtp inet n - n - - smtpd
-o transport=dovecot:
<IP 2>:smtp inet n - n - - smtpd
-o transport=connector:
...... <directing messages to Python scripts and DoveCot for
processing> ......
connector unix - n n - - pipe
flags= user=hubdirect argv=python /usr/local/bin/connector.py
dovecot unix - n n - - pipe
flags=Rhu user=hubdirect argv=/usr/libexec/dovecot/deliver -f
${sender} -d ${recipient}
This is main.cf:
dovecot_recipient_maps = ldap:ldaplocal
connector_recipient_maps = ldap:ldaplocal (I want LDAP
validation here for all messages)
ldaplocal_server_host = ldap://hub-devds01.dev.medplus.com:389/
ldaplocal_search_base = ou=domain,dc=hubdirect,dc=dev,dc=medplus,dc=com
ldaplocal_query_filter = (addressvalue=%s) ldaplocal_result_attribute =
deliverto
The closest one I can get to is to set up master.cf like the following,
but that does not go through LDAP for domain & recipient validation. I
am getting all messages without Postfix rejecting invalid addresses. I
was told that this is what content filter does. So my question is, can I
define my own transport, so that messages are routed differently AFTER
Postfix validates address and domains? If so, how can I set it up in
master.cf?
<IP 1>:smtp inet n - n - - smtpd
-o content_filter=dovecot:
(this routes messages but does not go through Postfix address
validation)
<IP 2>:smtp inet n - n - - smtpd
-o content_filter=connector:
Thanks,
Yan
Confidentiality Notice: The information contained in this electronic
transmission is confidential and may be legally privileged. It is intended only
for the addressee(s) named above. If you are not an intended recipient, be
aware that any disclosure, copying, distribution or use of the information
contained in this transmission is prohibited and may be unlawful. If you have
received this transmission in error, please notify us by telephone (513)
229-5500 or by email ([email protected]). After replying, please erase it
from your computer system.