On Thursday 22 December 2011 03:39:39 Michael Maymann wrote: > As 99,96% of all our mail is to internal users > (*@internal_mail.com), I would like to relay these directly to our > official mailserver, and still keep relaying external mails > (anything but *@internal_mail.com) to our ISP mailserver. > Is it possible to do this in postfix, or can I only have 1 > relayhost configured at a time ? > If possible - how can this be done.
http://www.postfix.org/transport.5.html It's a fairly simple use of transport_maps: main.cf: transport_maps = hash:$config_directory/transport # leave your relayhost intact, assuming they have fixed the problem $config_directory/transport: # changed your example to example.com example.com smtp:example.com This does MX lookup for 'example.com' and uses the smtp(8) client to send to the MX host[s] on port 25. Note, this will not work if your outbound port 25 is blocked, and it might require whitelisting by the destination hosts, e.g., if you are in a dynamic IP range and they're using Spamhaus Zen or the like for blocking of zombies. In the case of blocked port 25, you might need this instead: example.com smtp:[host.example.com]:587 No MX lookup is done, only a hostname (A/AAAA) lookup of host.example.com, and delivery will be done on port 587. This might require some form of authentication for you on host.example.com. -- http://rob0.nodns4.us/ -- system administration and consulting Offlist GMX mail is seen only if "/dev/rob0" is in the Subject: