On Thu, 23 May 2002, Marc G. Fournier wrote: > Nope, this doesn't work ...
...in all situations. > try sending yourself a CC'd mail message, and you'll see what I mean > ... I sent an email to a friend on my server, CC'd it to myself, from > a remote server, and here is the result that I've received: [...] > Notice the 'required=5.1'? My required is the default 5.0 ... I've > never changed from what was installed, but she has ... > > This, again, will only work properly if there is only one recipient :( Apparently so, at least if you vary configuration between individuals. If it matters to you, Postfix is passing in the recipient address details for all the addresses on the command line. My setup only extracts the first one and uses that. If you want to get the filtering per-individual correct, dump the first "user" argument entirely, then use the script to iterate through the recipient addresses and call SA for each of them. Something like: spam unix - n n - - pipe flags=Rq user=mailfilter argv=/home/mailfilter/spam-filter \ '${sender}' -- ${recipient} ---------- cut here ---------- #!/bin/bash # # Process mail through SpamAssassin, adding the results, then feed it back into # the PostFix process. sender=$1; shift for recipient in $@; do user=${recipient} user=${user#+} user=${user#-} user=${user#@} { spamc -u "${user}" | /usr/sbin/sendmail -i -f "${sender}" \ "${recipient}" } || exit 75 done exit 0 ---------- cut here ---------- I didn't test that script, though, so some assembly may be required. The principal should be clear enough, though. Watch out for the increase in system load that comes from scanning each mail for each recipient and for forking the delivery process for each of them. This will also stop things like Cyrus doing the hardlink "multiple recipients" optimization, should you care about that. If you want this to work at an ISP scale, rewrite the spamd backend to deliver to your MTA via LMTP, not a forked sendmail, after the scanning is done. If you care, of course. Daniel -- If you feel you have both feet planted on level ground, then the university has failed you. -- Robert F. Goheen _______________________________________________________________ Don't miss the 2002 Sprint PCS Application Developer's Conference August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm _______________________________________________ Spamassassin-talk mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/spamassassin-talk