I'm a little stuck on implementation of things here in Postfix, because we're trying to replace a sendmail email gateway/relay with Postfix, and replicate the setup.

Currently, the sendmail gateway does several things:

(1) Handles splitting of traffic destinations so things go to specific endpoint mail servers. That is, foo@domain.tld would be sent to imap01.domain.tld by Sendmail. foobar@domain.tld, a listserv, would be relayed to relay01.domain.tld which is the ListServ system for relaying ListServ mail.

(2) Handles certain other domains and delivers them to the proper endpoints for those domains, whether they be email addresses sitting on exchange01, or local alias lists, or other servers.

(3) All other @domain.tld mail would first be rewritten to be address@pa.domain.tld, which is then delivered to exchange01.domain.tld.

Now, this works great in SendMail, but SendMail is a royal pain to try and configure and modify configuration settings for. As such, we're trying to move to PostFix.

From PostFix, I've got mail properly relaying via transport maps for the individual email addresses that need customized routing, but I'm having issues with the third part, rewriting the domain before delivering it to the exchange01 server.

Anyone got any guidance for what I need to change in Postfix to do the third part of what that sendmail gateway currently does? (There's an MX record for pa.domain.tld interally, if it matters, which points to exchange01, I just need to figure out the rewriting functionality before specifying an @pa.domain.tld record in /etc/postfix/transport.)

This is Postfix 3.1.0 on Ubuntu 16.04, if it matters, but I'd like to have a solution that isn't dependent on Ubuntu-only items.

Editors: Please do not add the tag, I left it off intentionally.

  • 1
    Maybe this might be able to help you: Address rewriting postfix official doc – Hunter.S.Thompson Aug 9 '17 at 14:43
  • @Hunter.S.Thompson I looked there, but it wasn't clear where canonical maps (which probably would work) come into play - before or after the transport mechanism. If it's before the transport mechanism then it'll break some things; if it's after the transport mechanism, then I might be able to make it work, except for the Exchange delivery... – Thomas Ward Aug 9 '17 at 15:17

Your Answer

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

Browse other questions tagged or ask your own question.