Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

We have a Postfix server that receives mail from our application servers. Senders are in the form user@host.fqdn (where host.fqdn can vary, depending on source server) and recipients can be internal or external users.

Messages going to external users should have the sender changed to user@domain.com. I have tried using canonical maps, but since that is handled by the cleanup daemon, before any transport decisions are made, it would affect all sender addresses.

I have also tried creating a custom smtp transport with generic mappings and configuring transport_maps to use that custom smtp transport for external domains. However, generic mappings affect both sender and recipient addresses.

Lastly, I've tried the following:

  • Create a custom smtpd daemon that specifies sender canonical maps and a unique transport table.
  • Send all externally addressed mail to that custom daemon. Ideally, sender canonical maps would transform the sender address and the unique transport table would relay messages to the internet.

However, evidently, only one transport table can be used per Postfix instance.

I want to avoid creating an entirely new Postfix instance to accommodate this rewriting. Any suggestions? (and thanks in advance)

share|improve this question

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.