Linode Forum
https://forum.linode.com/

Split domain email via two different SMTP servers
https://forum.linode.com/viewtopic.php?f=11&t=10824
Page 1 of 1

Author:  Cromulent [ Mon Feb 03, 2014 2:17 pm ]
Post subject:  Split domain email via two different SMTP servers

I currently use Google Apps for Business for one of my domains. I'd like to keep using it for staff email addresses such as:

my.name@domain.com

but I'd like to use my own SMTP / IMAP servers for company wide email addresses such as

sales@domain.com
support@domain.com

does anyone know if this is possible at all?

Author:  vonskippy [ Mon Feb 03, 2014 4:51 pm ]
Post subject:  Re: Split domain email via two different SMTP servers

In theory you can "sort" email with a SMTP Proxy server.

Might be easier just to use two domains.
joe.staff@bc-online.com
sales@BigCompany.com

You keep your outside face aligned with your branding, and use a internal/intranet domain for all the staff traffic.

Author:  sednet [ Tue Feb 04, 2014 10:53 am ]
Post subject:  Re: Split domain email via two different SMTP servers

Postfix will do it with a virtual alias and a transport map sending selected addresses to a second server.

virtual_alias_map:
Code:
sales@domain.com  sales@server2.domain.com
support@domain.com support@server2.domain.com


transport_map:
Code:
server2.domain.com smtp:server2


Alternatively you could use simple aliasing which would work in postfix and sendmail to send the mail to server2:
/etc/aliases:
Code:
sales@domain.com  sales@server2.domain.com
support@domain.com support@server2.domain.com


Either way you can't tell the world to send mail to different servers based on username alone. The mail has to go to one server where some of it is filtered and resent.


If at all possible don't do this. Do as vonskippy's suggests and use two domains. It makes the configuration so much simpler and complexity causes failures. One domain could be a subdomain of the other. E.g. sales@mycompany.com, my.name@people.mycompany.com.

Author:  Cromulent [ Tue Feb 04, 2014 2:06 pm ]
Post subject:  Re: Split domain email via two different SMTP servers

Thanks for the information. I wish I had thought about this a bit more before I initially set up my email infrastructure. Using a sub-domain for staff email addresses would have made perfect sense.

I'll have to have a bit of a think regarding this since I already have personal email addresses configured and in use.

Page 1 of 1 All times are UTC-04:00
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/