Goodmoornig to everybody:

I'm mounting a mail server with these characteristics and services:

        Cyrus-Imap (Imap/Pop3 server)
        Postfix (SMTP server)
        Amavis with ClamAV and SpamAssassin for filtering spam and virus.
        LDAP to authenticate Cyrus-Imap and Postfix services, and retreiveing  
different attributes for PostFix and SpamAssassin.

So I want to SpamAssassin get witelist and blacklists atributes for  
each user stored in LDAP.

I've followed this guide  
http://wiki.apache.org/spamassassin/BetterDocumentation/LdapReadme to  
perform my objetive.

The problem is that SpamAssassin doesn't queries to LDAP anything.
When I try to send a spam, amavis detects and rejects it, but without  
doing any LDAP query.

I'll put some important log lines:


Restarting amavisd:

[EMAIL PROTECTED] spamassassin]# /etc/init.d/amavisd restart
Shutting down Mail Virus Scanner (amavisd):                [  OK  ]
Starting Mail Virus Scanner (amavisd):                     [  OK  ]
[EMAIL PROTECTED] spamassassin]#

--------------------------------------------------------------------------------------------
...
Apr 11 13:20:58 MQ20-nicatest amavis[28886]: Module Mail::Internet      2.02
Apr 11 13:20:58 MQ20-nicatest amavis[28886]: Module Mail::SpamAssassin  
  3.001009
Apr 11 13:20:58 MQ20-nicatest amavis[28886]: Module Net::DNS            0.48
Apr 11 13:20:58 MQ20-nicatest amavis[28886]: Module Net::Server         0.97
Apr 11 13:20:58 MQ20-nicatest amavis[28886]: Module Time::HiRes         1.55
Apr 11 13:20:58 MQ20-nicatest amavis[28886]: Module URI                 1.36
Apr 11 13:20:58 MQ20-nicatest amavis[28886]: Module Unix::Syslog        1.0
Apr 11 13:20:58 MQ20-nicatest amavis[28886]: Amavis::DB code      loaded
Apr 11 13:20:58 MQ20-nicatest amavis[28886]: Amavis::Cache code   loaded
Apr 11 13:20:58 MQ20-nicatest amavis[28886]: SQL base code        NOT loaded
Apr 11 13:20:58 MQ20-nicatest amavis[28886]: SQL::Log code        NOT loaded
Apr 11 13:20:58 MQ20-nicatest amavis[28886]: SQL::Quarantine      NOT loaded
Apr 11 13:20:58 MQ20-nicatest amavis[28886]: Lookup::SQL code     NOT loaded
Apr 11 13:20:58 MQ20-nicatest amavis[28886]: Lookup::LDAP code    NOT loaded
Apr 11 13:20:58 MQ20-nicatest amavis[28886]: AM.PDP-in proto code loaded
Apr 11 13:20:58 MQ20-nicatest amavis[28886]: SMTP-in proto code   loaded
Apr 11 13:20:58 MQ20-nicatest amavis[28886]: Courier proto code   NOT loaded
Apr 11 13:20:58 MQ20-nicatest amavis[28886]: SMTP-out proto code  loaded
Apr 11 13:20:58 MQ20-nicatest amavis[28886]: Pipe-out proto code  NOT loaded
Apr 11 13:20:58 MQ20-nicatest amavis[28886]: BSMTP-out proto code NOT loaded
Apr 11 13:20:58 MQ20-nicatest amavis[28886]: Local-out proto code loaded
Apr 11 13:20:58 MQ20-nicatest amavis[28886]: OS_Fingerprint code  NOT loaded
Apr 11 13:20:58 MQ20-nicatest amavis[28886]: ANTI-VIRUS code      loaded
Apr 11 13:20:58 MQ20-nicatest amavis[28886]: ANTI-SPAM code       loaded
Apr 11 13:20:58 MQ20-nicatest amavis[28886]: ANTI-SPAM-SA code    loaded
Apr 11 13:20:58 MQ20-nicatest amavis[28886]: Unpackers code       loaded
Apr 11 13:20:58 MQ20-nicatest amavis[28886]: Found $file            at  
/usr/bin/file
Apr 11 13:20:58 MQ20-nicatest amavis[28886]: No $dspam,              
not using it
Apr 11 13:20:58 MQ20-nicatest amavis[28886]: No $altermime,          
not using it
Apr 11 13:20:58 MQ20-nicatest amavis[28886]: Internal decoder for .mail
Apr 11 13:20:58 MQ20-nicatest amavis[28886]: Found secondary av  
scanner ClamAV-clamscan at /usr/bin/clamscan
Apr 11 13:20:58 MQ20-nicatest amavis[28886]: Creating db in  
/var/amavis/db/; BerkeleyDB 0.33, libdb 4.2
Apr 11 13:20:58 MQ20-nicatest amavis[28886]: SpamControl: initializing  
Mail::SpamAssassin
Apr 11 13:20:59 MQ20-nicatest amavis[28886]: SpamControl: init_pre_fork done
--------------------------------------------------------------------------------------------


When receiving a mail:
--------------------------------------------------------------------------------------------
Apr 11 13:19:36 MQ20-nicatest postfix/smtpd[28848]: DD59128001:  
client=unknown[192.168.2.82], sasl_method=PLAIN,  
[EMAIL PROTECTED]
Apr 11 13:19:36 MQ20-nicatest postfix/cleanup[28849]: DD59128001:  
message-id=<[EMAIL PROTECTED]>
Apr 11 13:19:36 MQ20-nicatest postfix/qmgr[32651]: DD59128001:  
from=<[EMAIL PROTECTED]>, size=2136, nrcpt=1 (queue active)
Apr 11 13:19:36 MQ20-nicatest amavis[27656]: (27656-01) LMTP::10024  
/var/amavis/tmp/amavis-20080411T131936-27656:  
<[EMAIL PROTECTED]> -> <[EMAIL PROTECTED]> SIZE=2136  
Received: from MQ20-nicatest ([127.0.0.1]) by localhost  
(localhost.localdomain [127.0.0.1]) (amavisd-new, port 10024) with  
LMTP for <[EMAIL PROTECTED]>; Fri, 11 Apr 2008 13:19:36 +0200  
(CEST)
Apr 11 13:19:36 MQ20-nicatest postfix/smtpd[28848]: disconnect from  
unknown[192.168.2.82]
Apr 11 13:19:36 MQ20-nicatest amavis[27656]: (27656-01) Checking:  
FbehK6oCbmPh MYNETS [192.168.2.82] <[EMAIL PROTECTED]> ->  
<[EMAIL PROTECTED]>
Apr 11 13:19:40 MQ20-nicatest amavis[27656]: (27656-01) local  
delivery: <> -> <spam-quarantine>,  
mbx=/var/virusmails/spam-FbehK6oCbmPh.gz
Apr 11 13:19:40 MQ20-nicatest amavis[27656]: (27656-01) Blocked SPAM,  
MYNETS LOCAL [192.168.2.82] [192.168.2.82] <[EMAIL PROTECTED]>  
-> <[EMAIL PROTECTED]>, quarantine: spam-FbehK6oCbmPh.gz,  
Message-ID: <[EMAIL PROTECTED]>, mail_id:  
FbehK6oCbmPh, Hits: 998.56, size: 2136, 3422 ms
--------------------------------------------------------------------------------------------


Some important lines in configuration files:

/etc/amavisd.conf
-----------------------------------------------------------------------------------
# @bypass_virus_checks_maps = (1);  # controls running of anti-virus code
# @bypass_spam_checks_maps  = (1);  # controls running of anti-spam code
[EMAIL PROTECTED]
-----------------------------------------------------------------------------------

/etc/mail/spamassassin/local.cf
-----------------------------------------------------------------------------------
user_scores_dsn ldap://localhost:389/o=XXX?spamassassin?sub?uid=__USERNAME__
user_scores_ldap_username       cn=XXX,o=XXX
user_scores_ldap_password       XXXX
-----------------------------------------------------------------------------------

/etc/mail/spamassassin/spamassassin-default.rc
-----------------------------------------------------------------------------------
# send mail through spamassassin
:0fw
| /usr/bin/spamassassin --ldap-config -x
-----------------------------------------------------------------------------------


Lots of thanks.



-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
AMaViS-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/amavis-user
AMaViS-FAQ:http://www.amavis.org/amavis-faq.php3
AMaViS-HowTos:http://www.amavis.org/howto/

Reply via email to