Re: catch-all local mail
On Mon, Mar 29, 2010 at 10:12 PM, mouss wrote: > Charlie Root a écrit : >> 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: >> [any-valid-unix-name-from-etc-pass...@[any-ip-address-of-the-host] >> [valid-us...@[any-hostname-of-the-server] >> 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-h...@example.org" but then virtual service failed to >> deliver to "redirect-h...@example.org" 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 >> server? >> > > > > maybe try > > real_alias_maps = hash:/etc/aliases > local_recipient_maps = proxy:unix:passwd.byname $real_alias_maps > alias_maps = static:redirect-h...@example.org > > (without overriding "local" configuration). > It seems that local lookup for owner-$user in the alias database, and 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: main.cf: 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 catch-all-local.regexp: !/^owner-/ redirect-h...@example.org Thanks a lot for insight! Dimitri.
Re: catch-all local mail
Charlie Root a écrit : > 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: > [any-valid-unix-name-from-etc-pass...@[any-ip-address-of-the-host] > [valid-us...@[any-hostname-of-the-server] > 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-h...@example.org" but then virtual service failed to > deliver to "redirect-h...@example.org" 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 > server? > maybe try real_alias_maps = hash:/etc/aliases local_recipient_maps = proxy:unix:passwd.byname $real_alias_maps alias_maps = static:redirect-h...@example.org (without overriding "local" configuration).
catch-all local mail
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: [any-valid-unix-name-from-etc-pass...@[any-ip-address-of-the-host] [valid-us...@[any-hostname-of-the-server] 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-h...@example.org" but then virtual service failed to deliver to "redirect-h...@example.org" 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 server? Thanks! Dimitri.