Hello again,

To filter only incoming foreign mail with dspam i'm using access maps:

smtpd_sender_restrictions = reject_unknown_sender_domain
                        permit_mynetworks
                        permit_sasl_authenticated        
                        check_sender_access 
hash:/usr/local/etc/postfix/sender_access
                        check_client_access 
pcre:/usr/local/etc/postfix/filter_default

My filter_default contains:
/./     FILTER lmtp:unix:/var/run/dspam/sock 
(dspam is running as daemon and is reinjecting mail to Postfix using SMTP 
at localhost:10026)

All is working as I want. But some of my users needs to be forwarded
to other machine (running postfix+dspam to) to avoid NFS mount, so I would 
like to filter their mail only on destination machine. Filter is
triggered depend on client info/envelope from etc., so even when mail
needs to be forwarded it goes to dspam first.

Is there a possibility to trigger content filters _after_ expanding aliases 
(virtual/local)? I would like to filter only mail which destination is local 
machine and let the others to be forwarded untouched after expanding aliases.
I know I can call dspam as mailbox_command of course, but this solution has big
disadvantage - filtering can be bypassed by ~/.forward file, so it forbids 
users 
to call their own LDA.

Thanks for any suggestions.
Cheers,

P.S. Some sysinfo:
FreeBSD Current, postfix-current-2.6.20081109,4,dspam-devel-3.8.0

-- 
Marcin Rzepecki
m.rzepecki(at)iem.pw.edu.pl

Reply via email to