[TriLUG] relaying outgoing mail through external SMTP server with Postfix

Magnus chrish at trilug.org
Mon Jun 23 10:16:30 EDT 2003


On Monday, June 23, 2003, at 10:00 AM, Chris Merrill wrote:

> I remember a topic recently regarding relaying mail from a mail server
> (e.g. Postfix) through an external mail server (e.g. 
> smtp-server.nc.rr.com).
>
> My search of the trilug site did not find what I was looking for, so I 
> must
> not be searching in the right place.  My Postfix book didn't have much 
> to
> say about this topic...can anybody point me in the right direction?
>
> BTW, the problem I am trying to solve is the issue of certain domains
> (AOL) rejecting mail from dynamic-IPs...

OK I think what you want to do is enable transports.  In your main.cf 
make sure you have something like:

	transport_maps = hash:/etc/postfix/transport

The /etc/postfix/transport file is a hash with the following example 
syntax (from the man page):

             my.domain    :
             .my.domain   :
             *            smtp:outbound-relay.my.domain

So you could do something like add lines like these:

			aol.com		smtp:smtp-server.nc.rr.com
			.aol.com	smtp:smtp-server.nc.rr.com

This will allow your postfix server to directly route all email, except 
for that destined for AOL which will instead be relayed through RR.

You'll need to reload your postfix configuration after making these 
changes.

--

C. Magnus Hedemark
http://trilug.org/~chrish
PGP Key fingerprint = 984D 9A88 3D60 016F BE01 1506 60FB 85E1 9ABD 96F6
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://www.trilug.org/pipermail/trilug/attachments/20030623/ac588509/attachment.pgp>


More information about the TriLUG mailing list