[Mimedefang] sanity Check: MD -> SpamAssassing checks ~/.spamassassin/user_prefs

Kevin A. McGrail KMcGrail at PCCC.com
Wed Aug 1 08:33:10 EDT 2012


On 7/31/2012 10:35 PM, Ben Kamen wrote:
> Quick yes/no...
>
> when using SA though MD, does SA still check the user_prefs (for 
> white/blacklisting) in the
> destination user's homedir/.spamassassin/ directory?
>
> I whitelisted *@domain.com and just got an email still marked as spam 
> by SA.
Annoying answer: MD can do anything you tell it to do.

Less annoying answer:

By default, my belief is that all the SA checks are run as the user MD 
runs under. I believe what you might want to look into are integrating 
these two commands with your filter:

                     $SASpamTester->load_scoreonly_sql($user);
                     $SASpamTester->signal_user_changed({ username => 
$user });

I also use spamc based on code from Matthew van Eerde.  A pdf of that 
basis is attached (my email was rejected with the PDF for size so it's 
now at 
http://www.pccc.com/downloads/MIMEDefang/contrib/spamc/SpamassassinSpamcSpamd%20-%20Kwiki.pdf). 
I think I've published my code but in short, I run spamc with  -u 
$username and have routines that identify the username.

For a localuser, you can use something like shelling out and running 
sendmail -bv kmcgrail at pccc.com
kmcgrail at pccc.com... deliverable: mailer local, user kmcgrail

Hope this helps.
Regards,
KAM



More information about the MIMEDefang mailing list