internet accelerators
    internet access
    internet and phone call
    web hosting
    storage space
    url redirection
    internet call waiting
    free sms
    nota bene

How to configure Scalix with Spamassassin on SuSe Linux

Open SuSe 11.0
Open source Scalix 11.4.2
Spamassassin 3.2.4
Spamass-milter 0.3.1

Filtering spam messages is done by the Spamassassin. Spamassassin is called by the spamass-milter. Spamass-milter can be called either by the Scalix SMTP Relay or by the Sendmail. Let us describe configuration for both methods.

Let's assume Scalix was installed in the /var/opt/scalix

Section I is the same for both methods.

I. Configuration of Spamassassin and spamass-milter

1) Install Spamassassin

2) Create working directory for Spamassassin

# mkdir /home/spamassassin; chown nobody /home/spamassassin

3) In /etc/sysconfig/spamd set run arguments for Spamassassin daemon

SPAMD_ARGS="-d -c -L -u nobody -x --virtual-config-dir=/home/spamassassin" 

4) Install spamass-milter

5) In /etc/rc.d/spamass-milter set correct variables DAEMON and SOCKET, for example


6) Start spamd and spamass-milter

# service spamd start
# service spamass-milter start

7) Configure spamd and spamass-milter to start on system boot

# chkconfig spamd 35
# chkconfig spamass-milter 35

To configure futher choose either section II or section III.

II. Configuration of Spamassassin calling from within the Scalix SMTP Relay

1) In /var/opt/scalix/ml/s/sys/smtpd.cfg set options

INPUT_MAIL_FILTER=('spamassassin', S='local:/var/run/spamass-milter/spamass-milter.sock, F=, T=C:15m;S:4m;R:4m;E:10m')

Ensure the milter socket path is the same in the smtpd.cfg and in the /etc/rc.d/spamass-milter

2) Restart the Scalix SMTP Relay

# omoff -d 0 -w smtpd
# omon smtpd

III. Configuration of Spamassassin calling from within the Sendmail

1) In /var/opt/scalix/ml/s/sys/smtpd.cfg set option


2) Add options to sendmail.mc and compile new sendmail.cf with m4.

INPUT_MAIL_FILTER(`spamassassin',`S=local:/var/run/spamass-milter/spamass-milter.sock, F=, T=C:15m;S:4m;R:4m;E:10m')dnl
define(`confINPUT_MAIL_FILTERS', `spamassassin')dnl

Ensure the milter socket path is the same in the sendmail.mc and in the /etc/rc.d/spamass-milter

2 alternative) Sendmail can be configured by editing sendmail.cf file directly, without compiling new configuration file.

In sendmail.cf set InputMailFilters option

# Input mail filters
O InputMailFilters=Spamassassin

Add some milter macros definitions in the Milter options section

# Milter options
O Milter.macros.connect=b, j, _, {daemon_name}, {if_name}, {if_addr}
O Milter.macros.helo={tls_version}, {cipher}, {cipher_bits}, {cert_subject}, {cert_issuer}
O Milter.macros.envfrom=i, {auth_type}, {auth_authen}, {auth_ssf} {auth_author}, {mail_mailer}, {mail_host}, {mail_addr}
O Milter.macros.envrcpt={rcpt_mailer}, {rcpt_host}, {rcpt_addr}

In MAIL FILTER DEFINITIONS section add spamass-milter definition

Xspamassassin, S=local:/var/run/spamass-milter/spamass-milter.sock, F=, T=C:15m;S:4m;R:4m;E:10m

Ensure the milter socket path is the same in the sendmail.cf and in the /etc/rc.d/spamass-milter

3) Restart Sendmail

# service sendmail restart

4) Restart the Scalix SMTP Relay

# omoff -d 0 -w smtpd
# omon smtpd