Hi all,

I'm trying to configure postfix on a new machine at home to replace an
old installation of sendmail on another machine.  I want the new machine
to be the outgoing mail server for the LAN and to masquerade addresses
in my domain, exactly as sendmail is already doing.  The mail server for
my domain is elsewhere, so this new server should forward all mail for
the domain (except those directly addressed to LAN hosts) to the
external mail server.

I've almost got it, but there's one thing I can't get to work and that's
correct handling of mail addressed to root.  I want mail to <root>,
<[EMAIL PROTECTED]> and <[EMAIL PROTECTED]> to be delivered locally, but
<[EMAIL PROTECTED]> needs to be forwarded to the external mail server.  I've
only been able to make it forward all variations of root to the external
server, or deliver them all locally.

I'm using postfix 2.2.4-1ubuntu2.1 on breezy.  Here are the relevant
bits of my main.cf:

    append_dot_mydomain = no
    alias_maps = hash:/etc/aliases
    alias_database = hash:/etc/aliases
    myorigin = /etc/mailname
    mydestination = dropbear.kirriwa.net, localhost.localdomain, localhost, 
localhost.kirriwa.net
    relay_domains = kirriwa.net
    relayhost = mail.internode.on.net
    mynetworks = 127.0.0.0/8, 192.168.42.0/24
    virtual_alias_maps = hash:/etc/postfix/virtual
    masquerade_domains = kirrwa.net
    masquerade_exceptions = root

/etc/mailname contains:

    kirriwa.net

/etc/aliases contains:

    root:   [EMAIL PROTECTED]
    clamav: root

/etc/postfix/virtual contains:

    root    [EMAIL PROTECTED]

I've tried with & without masquerade_exceptions, with & without
virtual_alias_maps, but I can't make it do what I want.  I either get
mail to <root> delivered externally, or mail to <[EMAIL PROTECTED]>
delivered locally.


Is there a postfix guru out there who can whack me with the appropriate
cluestick?


Thanks,

John
-- 
> Wow. They've got you both coming *and* going, eh mate?
Yep. That's why semen is white and urine is yellow. That way, the
soccer/football fans can tell whether they're coming or going.
            -- Mike Andrews
-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html

Reply via email to