Postfix SMTP Delegation

Sat 23 December 2017 by Thejaswi Puthraya

Email still continues to be a popular communication and collaboration tool especially within enterprises. And Postfix (configurable SMTP server) has withstood the test of time and remains popular.

Programmable SMTP servers like Haraka, Lamson make building applications on top of email easy but I am not comfortable exposing them as the primary server. In comes SMTP delegation; Postfix forwards mails over to Haraka which then process the mails based on javascript (user-configured) rules.

Postfix needs to be made aware of the domains whose mails are to be delegated. This is achieved through the virtual_mailbox_domains setting in the configuration file.

Then in the transport configuration file, you need to list out the domains and the locations where the mails have to be delegated/forwarded.

Here's an snippet of a config file with the relevant change:

virtual_mailbox_domains =

And the transport file forwarding the emails to Haraka running on port 2525:     smtp:     smtp:

Finally, you restart postfix to reflect the changes.