--On Thursday, October 06, 2005 9:33 AM -0700 Chris Grau
<[EMAIL PROTECTED]> wrote:

> On Sun, Oct 02, 2005 at 07:21:10PM -0700, [EMAIL PROTECTED] wrote:
>> SPAWAR wants me to relay all sent emails through a relay host.
>> 
>> The problem is that I *don't* want emails meant for root
>> to go to relayhost.
>> 
>> Adding an /etc/aliases entry for root doesn't seem to fix the problem.
>> 
>> I guess emails get forwarded to relayhost before /etc/aliases
>> is consulted?
>> 
>> Anyone seen this or know how to fix?
>> 
>> Chris
>> 
>> P.S. Some other guy who collects emails for the root account
>> on the relayhost is getting all my root's emails!!!
> 
> Have you solved this yet?
> 
> This problem sounds... odd.  I'm using Postfix with a relay host and not
> experiencing this.
> 
> I believe the /etc/aliases file is only consulted for local delivery,
> and mail sent to root is always local (or should be).  In my experience,
> sending mail to local users appends the local host name to the address.
> Do you have a transport table rule set up to forward all mail to the
> relay host?  Maybe (and I have to ask) the user to whom you're
> forwarding root's mail has a .forward rule?
> 
> -chris

Maybe you've already fixed this.  My approach is to set up a transport
table.  (man 5 transport)  Create a file called transport in your Postfix
config directory with the following in it:

[EMAIL PROTECTED]  local:
[EMAIL PROTECTED] local:
*   smtp:your.relay.host

I think you can leave the 'local' out and just have the colons, but I like
to put it in so it's a bit less cryptic.
Modify your main.cf with the following (change the path as needed):

transport_maps = hash:/etc/postfix/transport

Then run the following from the directory containing your Postfix config
files:

# postmap transport
# postfix reload

postmap builds a file called transport.db.  The transport_maps line doesn't
contain the '.db', it's implied since it's a hash.

That should do it.


Karl Cunningham


-- 
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-list

Reply via email to