0

We have an old zimbra server as the company mailserver, which does TLS1 only. Let's call zimbra for MailServerA.

To fix this (and sort out some security issues), I'd like to setup a postfix server to receive incoming email from the internet. Let's call this server for MailServerB

Then it should only forward email to MailServerA if the recipient's domain is in my list of domains.

How do I configure MailServerB to accept email from anyone, but only relay to MailserverA if the email is for one of my domains?

1 Answer 1

2

by using the selective relay feature:

  • add a line in /etc/postfix/transport:

    mydomain.net smtp:insecuremx.mydomain.net

  • run postmap /etc/postfix/transport

  • add

smtpd_relay_restrictions = permit_mynetworks, reject_unauth_destination
transport_maps = hash:/etc/postfix/transport
relay_recipient_maps = hash:/etc/postfix/relay_recipients

to /etc/postfix/main.cf it it is missing and run postfix reload.

Postfix to relay mails to other SMTP for particular domain

http://www.postfix.org/SMTPD_ACCESS_README.html#lists

https://xdeb.org/post/2017/12/20/mail-relay-mx-backup-and-spam-filtering-with-postfix/

1
  • 2
    Thanks! I managed to fix it. The transport was a part of the solution, but I also needed relay_recipients_map (only domains, no usernames). Ref: xdeb.org/post/2017/12/20/… Jun 7, 2020 at 17:40

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .