0

I have a setup with 1 pure mail server, lets call it mail, and 1 web server, lets call it web.

When web sends out email to an external server it uses mail as relay. Both servers use postfix. mail has a MX record and is the the official mail server for the domain, web has no MX record and on this server postfix works basically as a mail client only.

The problem: When web sends email via mail, and that email is rejected by the remote mail server, it gets bounced back to mail which forwards the NDR to web. What I'd like to have is that mail accepts and stores the bounce emails.

What postfix options do I need on both servers to achieve this?

0

I found a solution: Because all of our emails contain an envelope from address of bounce@ourdomain.net I was able to add a transport rule on mail server that enforces local delivery.

In main.cf I have this line:

transport_maps = regexp:/etc/postfix/transport.regexp

In /etc/postfix/transport.regexp this line redirects all email send to bounce@ourdomain.net to the virtual process for local delivery:

/^bounce@ourdomain\.net$/                        virtual:

If you don't have a multi domain setup like we do, instead of virtual you could probably use local or lmtp

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.