From iRedMail
Revision as of 07:49, 24 February 2014 by ZhangHuangbin (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

If you have multiple IP addresses available on your iRedMail server, and you want to send out email from specified IP address for hosted mail domain '', please try below steps.

  • Parameter "sender_dependent_default_transport_maps" is available in Postfix 2.7 or later, so please make sure your Postfix version is 2.7 or later releases:
# postconf mail_version
mail_version = 2.10.3
  • Add Postfix setting: sender_dependent_default_transport_maps in /etc/postfix/ NOTE: I use pcre here, not regexp or hash.
File: /etc/postfix/
sender_dependent_default_transport_maps = pcre:/etc/postfix/sdd_transport.pcre
  • Add file /etc/postfix/sdd_transport.pcre. NOTE: I use domain '' for testing, it will use transport 'smtp-example-com'.
File: /etc/postfix/sdd_transport.pcre
/@example\.com$/ smtp-example-com:
  • Add custom transport in Postfix /etc/postfix/
File: /etc/postfix/
smtp-example-com  unix -       -       n       -       -       smtp
   -o smtp_bind_address=
   -o syslog_name=postfix-example-com

NOTE: We use IP address here for example. You must have the IP address specified here available on your server.

  • Restart Postfix service.

Now try sending email to Gmail/Yahoo/Hotmail as user '', you can see syslog name 'postfix-example-com' in Postfix log file.

Personal tools