Re: [SLUG] Postfix relayhost = option

From: Paul M Foster (paulf@quillandmouse.com)
Date: Wed Sep 14 2005 - 18:13:41 EDT


On Wed, Sep 14, 2005 at 08:22:25AM -0400, Doug Koobs wrote:

> I'm not sure if relayhost is the correct option for what you want to
> do... Here is
> how I have done it in my setup, I send all my outgoing mail through
> earthlink's mail
> server...
>
> in /etc/postfix/main.cf:
> transport_maps = hash:/etc/postfix/transport
>
> and in /etc/postfix/transport
> * smtp:smtpauth.earthlink.net
>
> The asterisk means to send all outgoing mail through the specified
> server. If you
> only want to do certain domains, you can add a line for each domain...
>
> Then, you have to run the command:
>
> postmap hash:/etc/postfix/transport
>
> to create the .db file (you may need to use something other than "hash"
> in your
> setup, check the man pages for more info)
>

I have to agree with Doug. Relayhost seems to be tricky to set up; at
least it has been for me. Better to use the transport file. In fact, it
allows you to send mail in such a way that you can save internet
bandwidth, etc. For example, if you have a box on your network which you
want to be able to directly connect with for email (rather than sending
it via the internet and back down), you can add a line like this:

pokey.mars.lan :

which will cause the boxes to directly connect (SMTP-wise) for email.
Truly "local" email on your box (like cron mailings, etc.) can be done
this way:

localhost local:
hobbes.mars.lan local:

Very handy. I set up a .forward file on my box for root, so that all
cron mailings to root forward to me, and because of the transport recipe
above, go to me locally, without an internet smarthost. Similarly, the
pokey box above also generates cron mailings and such. Because of the
above recipe, it can simply email them to my machine (hobbes). All mail
from mutt (my MUA) gets sent directly to hobbes' postfix SMTP server.
Then I set up a cron job to dump any internet mail to the internet every
15 minutes, after it picks up my POP mail.

Paul
-----------------------------------------------------------------------
This list is provided as an unmoderated internet service by Networked
Knowledge Systems (NKS). Views and opinions expressed in messages
posted are those of the author and do not necessarily reflect the
official policy or position of NKS or any of its employees.



This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 16:07:27 EDT