1

Topic: Outbound routing per recipient

======== Required information ====
- iRedMail version (check /etc/iredmail-release): 0.8.6
- Linux/BSD distribution name and version: Ubuntu 12.04.4 LTS
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySql
- Web server (Apache or Nginx): Apache
- Manage mail accounts with iRedAdmin-Pro? Yes
- Related log if you're reporting an issue: n/a
====

Our server hosts inbound and outbound for hundreds of customer domains. We wish to route certain recipient domains outbound via secondary IP addresses on the server, based on the destination domain name e.g.

default: x.x.x.1
to hotmail.com: x.x.x.2
to gmail.com: x.x.x.3

Is such routing possible?

Regards,

AJ

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: Outbound routing per recipient

Sure. Add file /etc/postfix/transport, add content like this:

hotmail.com x.x.x.2
gmail.com x.x.x.3 

Update /etc/postfix/main.cf, transport_maps like below:

transport_maps = hash:/etc/postfix/transport, ...[other existing settings]...

Run:

# postmap hash:/etc/postfix/transport
# service postfix reload

References:
http://www.postfix.org/postconf.5.html#transport_maps
http://www.postfix.org/transport.5.html