Re: catch-all local mail
- On Mon, Mar 29, 2010 at 10:12 PM, mouss <mouss@...> wrote:
> Charlie Root a écrit :It seems that local lookup for owner-$user in the alias database, and
>> I've been fighting with it for a long time but still can't get the desirable:
>> - forward all local mail sent to valid unix users (+postmaster and
>> abuse redirects of course) to specific email address.
>> I.e. forward all mail sent to:
>> just [valid-user] without domain part
>> In other words any address which local service would accept.
>> I've tried luser_relay but it local service still desperately wants to
>> deliver to local unix mailbox first.
>> I've tried "mailbox_transport = virtual" and "localredir_alias_maps =
>> static:redirect-here@..." but then virtual service failed to
>> deliver to "redirect-here@..." with "User unknown in virtual
>> alias table".
>> Is it possible to setup catch-all for local mail without specifing
>> each valid local user and/or each valid IP/hostname of the mail
> maybe try
> real_alias_maps = hash:/etc/aliases
> local_recipient_maps = proxy:unix:passwd.byname $real_alias_maps
> alias_maps = static:redirect-here@...
> (without overriding "local" configuration).
once the alias found (and it will as we have static:) it substitute
Envelope From to owner-$user instead of just $user. And I have not
found the option to override it.
However changing static to simple regexp completely solved the issue:
real_alias_maps = hash:/etc/aliases
local_recipient_maps = proxy:unix:passwd.byname $real_alias_maps
alias_maps = alias_maps = regexp:/etc/postfix/catch-all-local.regexp
Thanks a lot for insight!