postfix discard

Discuss your pilot or production implementation with other Zimbra admins or our engineers.
five04tluv
Posts: 4
Joined: Tue Sep 01, 2015 3:45 pm

postfix discard

Postby five04tluv » Fri Jan 19, 2018 8:55 pm

I've been using postfix_custom_header_checks to discard emails to certain users. Unfortunately this discards the ENTIRE message. I see that in postfix I would need to use transport_maps to

Code: Select all

/etc/postfix/main.cf:
    transport_maps = hash:/etc/postfix/transport

/etc/postfix/transport:
    someuser@domain.com   discard:
    someuser2@domain.com discard:


How do I do this the Zimbra way?

current postconf transport_map usage

address_verify_transport_maps = $transport_maps
transport_maps = proxy:ldap:/opt/zimbra/conf/ldap-transport.cf (which does LDAP lookup for destination mail server for user)


User avatar
fs.schmidt
Advanced member
Advanced member
Posts: 118
Joined: Sat Sep 13, 2014 3:37 am
Location: Brazil
Contact:

Re: postfix discard

Postby fs.schmidt » Fri Jan 19, 2018 11:07 pm

Hello,

Please see the following steps to use tranport_maps in Zimbra (I've tested it in 8.7 and 8.8):

su - zimbra

vim /opt/zimbra/postfix/conf/transportfile

(edit the file with your discard rules)

zmprov mcf zimbraMtaTransportMaps "lmdb:/opt/zimbra/postfix/conf/transportfile,proxy:ldap:/opt/zimbra/conf/ldap-transport.cf"
five04tluv
Posts: 4
Joined: Tue Sep 01, 2015 3:45 pm

Re: postfix discard

Postby five04tluv » Wed Jan 24, 2018 3:29 pm

I'm on NE 8.7.11, I don't have a dir /opt/zimbra/postfix and I don't see any mention of this in the Admin Docs.
User avatar
fs.schmidt
Advanced member
Advanced member
Posts: 118
Joined: Sat Sep 13, 2014 3:37 am
Location: Brazil
Contact:

Re: postfix discard

Postby fs.schmidt » Thu Jan 25, 2018 2:51 am

Hi,

The correct path is: /opt/zimbra/conf/

So the steps would be:

vim /opt/zimbra/conf/transportfile

(insert your discard rules)

postmap /opt/zimbra/conf/transportfile

zmprov mcf zimbraMtaTransportMaps "lmdb:/opt/zimbra/conf/transportfile,proxy:ldap:/opt/zimbra/conf/ldap-transport.cf"

Postfix will reload with the new rules within a few minutes, but you can force the reload with "postfix reload"

Return to “Administrators”

Who is online

Users browsing this forum: Majestic-12 [Bot] and 32 guests