Postfix - Relay each outbound email via different SMTP server

5 posts / 0 new
Last post
#1 Thu, 04/07/2011 - 02:46
kelv1n

Postfix - Relay each outbound email via different SMTP server

Hi Guys

Is it possible to configure Postfix to relay eamail for each virtual host via a different server? We have several domains which need their email sent via a 3rd party (Messagelabs), but we have others that need to be sent direct.

If this is possible, could anybody offer advise on how its done?

Thanks Kelv1n

Thu, 04/07/2011 - 08:13
andreychek

Howdy,

So you'd like outbound email to go through a specific server?

You can configure that by going into Webmin -> Servers -> Postfix -> General Options, and setting your relay host in the field "Send outgoing mail via host".

-Eric

Tue, 03/13/2012 - 02:05
steve.rifkin

Sorry to nudge an old thread but I have come to this thinking I am wondering about the same issue.

Erik,

I have tested the "Send outgoing mail via host" option in the Postfix Config and it works. But, it is global and works for each Vritual Server I have on this box (Ubuntu 10.04). Is there a way to allow some of the virtual servers to send via the external SMTP host (gmail in my case) while lettings others go through the default "direct" option?

Thu, 01/31/2013 - 18:37
amsri

I am also looking for a way to configure some of the virtual servers to send outgoing mail via an external SMTP host (like sendgrid) while lettings others go through the default "direct" option. I tried to search but could not find a solution.

Sun, 02/03/2013 - 09:05
miner

For Postfix 2.7 and later, sender_dependent_default_transport_maps

for Postfix 2.3 and later, I think you have to use sender_dependent_relayhost_maps and list your domains in $relay_domains

These would be edit's to the postfix main.cf file

Topic locked