|
I got one problem using this setup.. the whitelist/blacklist nor
bayesian works, because spamd doesnt look the homedir of the user in
the ldap.. just preferences.. With this problem I rewrote one module used to auth in courier to work directly in ldap http://www.ebrain.com.br/~cassiano/AuthLdap.pm I save it on spamssassin modules dir (under perl modules) in my debian box the dir is /usr/share/perl5/Mail/SpamAssassin/ and after the #!/usr/bin/perl in the begin of spamd i put this line use Mail::SpamAssassin::AuthLdap; this module rewrites the getpwuid and getpwnam, with this spamd thinks the ldap user is one real user.. let me show you one spamassassin log Feb 27 07:41:08 edge spamd[1504]: connection from localhost [127.0.0.1] at port 61376 Feb 27 07:41:09 edge spamd[1504]: info: setuid to [EMAIL PROTECTED] succeeded Feb 27 07:41:09 edge spamd[1504]: processing message <20050227104106.27865.qmail at mail-1.ebrain.com.br> for caquino at ebrain.com.br:1033. Feb 27 07:41:09 edge spamd[1515]: clean message (-4.5/4.0) for caquino at ebrain.com.br:1033 in 4.0 seconds, 975 bytes. Feb 27 07:41:09 edge spamd[1515]: result: . -4 - ALL_TRUSTED,AWL,BAYES_00,NO_REAL_NAME scantime=4.0,size=975,mid=<20050227104056.27746.qmail at mail-1.ebrain.co m.br>,bayes=1.66533453693773e-16,autolearn=ham I think the most interesting line is this Feb 27 07:41:09 edge spamd[1504]: info: setuid to [EMAIL PROTECTED] succeeded where the spamassassin thinks [EMAIL PROTECTED] is one real user. now I can create one .spamassassin in the virtual home dir with al the configuration and the spam dbs. I think the AuthLdap.pm needs some adjustments to fit your needs.. but this is the one I use here. in the maildrop user config I put if ( $SIZE < 262144 ) { exception { xfilter "spamc -f -u [EMAIL PROTECTED]" } } if (/^X-Spam-Flag: *YES/) { exception { to "Maildir/.SPAM.E Spam" } } I don´t have tested with simscan but I think simscan can pass the -u to spamc.. and the user can haver your spam settings valid before the mail gets the queue. Ace Suares wrote: On Saturday 26 February 2005 6:21, you wrote: |
- Re: Spamassassin with ldap users? Cassiano Aquino
- Re: Spamassassin with ldap users? OmarArmas
