LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Procmail and spamassassin question (https://www.linuxquestions.org/questions/linux-software-2/procmail-and-spamassassin-question-178586/)

Liberator 05-06-2004 10:45 AM

Procmail and spamassassin question
 
I'm trying to set up a rule in procmail that will show the spam score in the body of the email. I'm not sure if it's possible, but it would be a great help if it worked.

I'm using fetchmail to download the emails from several accounts. Procmail then sorts the emails according to some rules. One of those rules i want be that if the email is to my "spam account", i want spamassassin to check it and write the "X-Spam-Status" line in the body of the email, so it will be easier for me to adjust spamassassin scores.

Can this be done? Any help is appreciated.

Thanx in advance.

Regards,
Liberator

mako747 05-06-2004 12:23 PM

Forgive me if I get this wrong.

I currently use procmail to pipe our mail through spamassassin.

It writes the score to the subject line and also to the headers of the message.

Is this what you are trying to do?

Liberator 05-06-2004 02:46 PM

Almost...

Although i want that line to be the first line in the body of the email, putting it in the subject will work as well. And of course i want it to be in the headers too.

How do u do that?

mako747 05-06-2004 02:56 PM

In my procmailrc file I have the following line after it passes through some other stuff...

:0fw
* < 256000
| spamc

That pipes it through spamassassin
Then I have the following lines in my spamassassin/local.cf file...


# How many hits before a message is considered spam.
required_hits 5.0

# Whether to change the subject of suspected spam
rewrite_subject 1

# Text to prepend to subject if rewrite_subject is used
subject_tag *****SPAM***** SCORE _HITS_

# Encapsulate spam in an attachment
report_safe 2

# Use terse version of the spam report
use_terse_report 1

Liberator 05-06-2004 03:47 PM

Ok... I thought i had to do it in the procmailrc. But instead it looks like i should have read more about spamassassin... he he.

Thanxs. I'll give it a try later.

jymbo 08-13-2004 03:24 PM

Rather, I find that this portion works for me in /etc/mail/spamassassin/local.cf:

Quote:

# How many hits before a message is considered spam.
required_hits 5.0

# Whether to change the subject of suspected spam
rewrite_subject 1

# Text to prepend to subject if rewrite_subject is used
subject_tag *****SPAM***** SCORE _HITS_

# Encapsulate spam in an attachment
report_safe 2

# Use terse version of the spam report
use_terse_report 1


All times are GMT -5. The time now is 02:19 PM.