1

Topic: Spam management under Ldap

Hi All,
my question are if is possible use Spamassassin schema to store
in LDap server spam user preference and set iRedmail to use it.

If yes, how I can enable it?

If not possible, are available anothers settings (ex: amavis) to have same result?

Many thanks,

Enrico

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: Spam management under Ldap

you can integrate Amavis + LDAP smile

3

Re: Spam management under Ldap

O.K.,

I have read many documentation on the Net regarding Amavisd under LDap.
File interested to change are amavis.d conf file
(that are "user" file in /etc/amavis/conf.d/ directory under debian, if I have understand correctly)

$enable_ldap = 1; # 0 = false, 1 = true

$default_ldap = {
     hostname => 'ldap.domain.com', # ldap hostname
     timeout => 5,
     tls => 1, # 0 = false, 1 = true
     base => 'cn=users,dc=domain,dc=com', # your searchbase
     query_filter =>
     '(&(objectClass=amavisAccount)(|(mail=%m)(mailAlternateAddress=%m)))'
};

And into another write to set up another change, alwais in amavisd.conf:

Comment out the lines that start with:
@bypass_spam_checks_acl  = qw( . );
@local_domains_acl

O.K.,
where are a good way?

:-)

Many thanks,

Enrico

4

Re: Spam management under Ldap

Amavisd will now lookup some special attributes from LDAP, you can monitor openldap log file to check what it expect.
Simplily change 'loglevel' to 256 in openldap config file and restart ldap service, and then monitor /var/log/openldap.log.

5

Re: Spam management under Ldap

O.K., there are a little guide to integrate LDap in iredmail.org email system:
Edit "50-user" file in /etc/amavis/conf.d/ and add, AFTER FIRST COMMENT

"#
# Place your configuration directives here.  They will override those in
# earlier files.
#
# See /usr/share/doc/amavisd-new/ for documentation and examples of
# the directives you can use in this file
#"

THIS SETTINGS:

########### PERSONALIZED SETTINGS BY LDAP ###########
$sa_timeout                             = 30;
$sa_mail_body_size_limit                = 150*1024;
$sa_spam_subject_tag                    = '***SPAM*** ';
$first_infected_stops_scan              = 1;
$enable_ldap                            = 1;
$default_ldap                           = {
  hostname                              => 'localhost',
  base                                  => your_base_dn',
  bind_dn                               => 'your_bind_user',
  bind_password                         => 'your_bind_passwd',
  query_filter                          => '(&(objectClass=amavisAccount)(mail=%m))'
};


Save file.

Install libnet-ldap-perl, because iredmail does not provide to install it
(debian: apt-get install libnet-ldap-perl)

Now, stop and restart amavisd et voilà, you have a nice amavisd LDap integration!

:-)

Bye,

Enrico