# Setting up Spamassassin system-wide Sendmail e-mail server?

## Bosnian[X]

Hello, 

Im admin for a server at work that runs email server with following software.

Sendmail, Procmail and Qpopper.

All my pop3 accounts are in /var/spool/mail and now my boss wants me to install some kind of spamfilter. Spamassassin was choice nr.1 because i heard  just positive stuff about it. 

Now to tricky part,  i have never installed it before   :Embarassed:   and have a no clue how to doit.  

I want spamassassin to work system-wide for all users. I have installed spamassassin and that's the only thing i did. 

How do i proceed now with settin it up spamassassin it works wit PROCMAIL and Sendmail. 

I have searched forum but i could't find any help  how to setup spamassassin for /var/spool/mail folder with Sendmail and procmail..

Im counting on u.

//damir

----------

## Toke

I'm not familliar with procmail, I'm using qmail on my server.  But here's a link that may help:

http://www.geekly.com/entries/archives/00000155.htm

It doesn't look too difficult.

when you get it running, you may want to take a look at some of these custom rules:

http://www.merchantsoverseas.com/wwwroot/gorilla/sa_rules.htm

I'm definatly catching a lot more spam using these rules as well.  You can just copy them to /etc/mail/spamassassin, if you used the default install configuration.

  -John

----------

## Bosnian[X]

Toke: Thanx for a reply but that's not what i need. 

I want to install Spamassassin system-wide wich means i don't want the per user settings. 

All my accounts are in /var/spool/mail

What do i put in spamassassin conf and /etc/procmailrc  file so that spamassassin scans all emails  in /var/spool/mail and send spam mail into special folder or just mark the subject line with "SPAM" so that account owner can easily setup their client to filter those spammails.

//damir

----------

## Toke

To have spamassassin alter the Subject line add this to local.cf

```
Rewrite_subject 1
```

The default is ******SPAM*******

but can be changed with

```
subject_tag STRING
```

There's a lot you can change/configure in that file.  Check out http://au.spamassassin.org/doc/Mail_SpamAssassin_Conf.html for a complete list.

  I'm not familliar with procmail,  but in qmail, I did need to make changes to each mailbox.  Since the box has about fifty domains, I wrote a cron script to check for new mailboxes and make the alterations, if needed.  Sorry I can't be of more help with that part.

----------

## eltech

 *Toke wrote:*   

> To have spamassassin alter the Subject line add this to local.cf
> 
> ```
> Rewrite_subject 1
> ```
> ...

 

not trying to hijack here but look at this thread https://forums.gentoo.org/viewtopic.php?t=100671 am trying to get similar results as this member .. anyone offer any suggestions?

----------

## mglauche

if you use sendmail, have a closer look to sendmail's milter interface, its *very* good. I think you can compile spamd/spamc the way that it will use sendmail's milter, if not, have a look at amavis(-ng/new, any of the newer ones), they can talk to milter. (and SA is "just" an perl script, thats easily embeddable by amavis*)

----------

