Victor Duchovni wrote: > On Tue, Jun 22, 2010 at 11:53:37AM +0200, Mariusz Kie?pi?ski wrote: > >> allow_mail_to_commands and allow_mail_to_files according to >> http://www.postfix.org/postconf.5.html are global for all users. I have a >> need do disallow processing of .forward for most user (default behavior) >> however some of them should still have a possibility of usage .forward file. In the other words is this possible to block processing .forward file for some users ? > > Yes, by using multiple copies of the local transport in master.cf, and using transport_maps to route mail for selected users to an alternate local transport, (with -o foo=bar overrides in master.cf). > > local2 unix - n n - - local > -o ... > Ok. So I added in master.cf local_no_forward unix - n n - - local -o allow_mail_to_commands=alias -o allow_mail_to_files=alias
I also created transport_maps /u...@.*/ local_no_forward: and postmap-ed it To main.cf I added transport_maps = pcre:/etc/postfix/transport_maps It seems that maps works because DF82C8B2E8: to=<u...@xxxxxxx>, relay=local_no_forward, delay=0.12, delays=0.06/0.01/0/0.05, dsn=2.0.0, status=sent (forwarded as EFDC48B2E6) However .forward file in home directory of user still works What is wrong ?