On Fri, Apr 09, 2010 at 09:21:12AM +1000, James Lever wrote:

> So are you suggesting that what I really need to do is something like this:
> 
>  1. $myorigin = $mydomain

Instead of masquerading.

>  2. still use masquerading to catch $lo...@$myhostname and $local

Typically, disable all local delivery.

        mydestination =
        alias_database =
        alias_maps = $alias_database
        local_transport = error:5.1.2 Mailbox unavailable
        local_recipient_maps =

>  3. use virtual(5) or generic(5) to rewrite excepted address to
> $lo...@$myhostname

Can't answer that without understand what you are really trying to
achieve. What are these "exception addresses" and why do you need them?
Who reads their email and what is the best way to make it available
to them?

> With 3., how do you have it so that the headers are rewritten as
> $lo...@$myhostname, in the generic form, without having to edit the
> configuration file by hand for each host?

Who said anything about per-host customization being done "by-hand"?
The simplest approach is to push template files, and use "make". More
sophisticated tooling can be integrated as appropriate.

> Also, how do you rewrite $lo...@localhost? (this still gets delivered
> to /var/mail/) and are there any other cases that would deliver to a
> local mailbox?

If you leave mydestination empty, and set "local_transport = error:..."
there is no local delivery. Mail addressed to would-be local addresses
should be rewritten to arrive somewhere sensible.

If you want something more subtle, you need to explain your goals
more clearly.

-- 
        Viktor.

P.S. Morgan Stanley is looking for a New York City based, Senior Unix
system/email administrator to architect and sustain our perimeter email
environment.  If you are interested, please drop me a note.

Reply via email to