Page 1 of 1

Spamassassin integration in version 11

Posted: Fri Feb 02, 2007 9:58 am
by les
In version 11 the sendmail setup for spamass-milter integration is via the mc file as per the faq.

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

i was wondering if it was still necessary to hand edit the following options in the sendmail.cf file in 11 still?

Edit the file /etc/mail/sendmail.cf to make the following changes:
Change OperatorChars from:
O OperatorChars=.:%@!^/[]+=
To
O OperatorChars=.:%@!^/[]+

Out of curiosity whats the significance of the "=", and if its needed is there a way to mc that also?

Posted: Tue Feb 06, 2007 12:36 am
by hkphooey
According to the knowledgebase article, the following changes are required for sendmail.cf

Code: Select all

Change OperatorChars from: 
O OperatorChars=.:%@!^/[]+=  To 
O OperatorChars=.:%@!^/[]+ 

Uncomment the line: 
#O InputMailFilters  and change it to: 
O InputMailFilters=Spamassassin 

Immediately below that line, add the following
# Milter options
#O Milter.LogLevel 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 the section MAIL FILTER DEFINITIONS, add the following line: 
Xspamassassin, S=local:/var/run/spamass.sock, F=, T=C:15m;S:4m;R:4m;E:10m

When you edit sendmail.mc, add the line you mention and then run
make -C /etc/mail
it seems to take care of all these changes for you. On my Centos 4.4 install it
-- uncommented my OperatorChars line (although it was already without the = sign).
-- enabled Input mail Filters=spamassassin
-- Added some milter options, although not quite exactly the same ones as above.
[/list]

Maybe a mention should be made of the sendmail.mc approach in the knowledgebase article, in case people start incorrectly hacking their sendmail.cf

Posted: Tue Feb 06, 2007 1:00 am
by hkphooey
Also on Centos (and therefore RHEL) 4.4 spamd doesn't exist. You need
chkconfig spamassassin on
and
service spamassassin restart

instead of the lines relating to spamd.

Posted: Tue Feb 06, 2007 4:59 am
by les
hkphooey wrote:According to the knowledgebase article, the following changes are required for sendmail.cf

Code: Select all

Change OperatorChars from: 
O OperatorChars=.:%@!^/[]+=  To 
O OperatorChars=.:%@!^/[]+ 

Uncomment the line: 
#O InputMailFilters  and change it to: 
O InputMailFilters=Spamassassin 

Immediately below that line, add the following
# Milter options
#O Milter.LogLevel 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 the section MAIL FILTER DEFINITIONS, add the following line: 
Xspamassassin, S=local:/var/run/spamass.sock, F=, T=C:15m;S:4m;R:4m;E:10m

When you edit sendmail.mc, add the line you mention and then run
make -C /etc/mail
it seems to take care of all these changes for you. On my Centos 4.4 install it
-- uncommented my OperatorChars line (although it was already without the = sign).
-- enabled Input mail Filters=spamassassin
-- Added some milter options, although not quite exactly the same ones as above.
[/list]

Maybe a mention should be made of the sendmail.mc approach in the knowledgebase article, in case people start incorrectly hacking their sendmail.cf


Thanks, but that not what i asked for! I'm well aware of how to make the changes by hand editting, and already know of the knowledgebase article. But that article IS SPECIFIC TO VERSION 10, as far as i can tell.

On the Scalix Wiki the article has been somewhat superceded as it shows how to add an MC entry for spamassassin/spamass-milter.

The only thing it doesn't seem to cater for as opposed to doing hand edits of the cf file is the "OperatorChars" line.

And my question was ..... In version 11 is it still necessary to hand edit the sendmail.cf with the "OperatorChars" line as per the knowledgebase article????

Posted: Tue Feb 06, 2007 5:10 am
by hkphooey
les wrote:Thanks, but that not what i asked for! I'm well aware of how to make the changes by hand editting, and already know of the knowledgebase article. But that article IS SPECIFIC TO VERSION 10, as far as i can tell.

I'm running 11.0.1
les wrote:And my question was ..... In version 11 is it still necessary to hand edit the sendmail.cf with the "OperatorChars" line as per the knowledgebase article????

So my answer was: no it doesn't seem as though you need to do that, as all the necessary changes are made when you alter the .mc file and run make -C /etc/mail. On Centos 4.4. On Scalix 11.0.1. In my experience.

Posted: Tue Feb 06, 2007 5:24 am
by les
hkphooey wrote:
les wrote:Thanks, but that not what i asked for! I'm well aware of how to make the changes by hand editting, and already know of the knowledgebase article. But that article IS SPECIFIC TO VERSION 10, as far as i can tell.

I'm running 11.0.1
les wrote:And my question was ..... In version 11 is it still necessary to hand edit the sendmail.cf with the "OperatorChars" line as per the knowledgebase article????

So my answer was: no it doesn't seem as though you need to do that, as all the necessary changes are made when you alter the .mc file and run make -C /etc/mail. On Centos 4.4. On Scalix 11.0.1. In my experience.


Ahhh...sorry....its been a long day, i didn't quite read your reply closely enough.

I've just checked one of my servers, and you are dead right, the OperatorChars does get modified as required just by using the MC file.

Thanks for the help.

p.s. thanks for informing me that 11.0.1 was out ;)