Spamassassin (yet again)

locateMe

Verified User
Joined
Feb 12, 2004
Messages
44
Sorry for so many questions :)

I have installed SpamAssasssin as per the instructions on the thread below (had to install the HTML thing as well) and then upgraded it to 2.63 which all seems ok.

However a thread did indicate that I could check it's status with

service spamassassin status

but that returns

spamassassin: unrecognized service

as does

service spamassassin restart
and
service spamassassin start

What am I doing wrong and how can I check to see if SpamAssassin is running - the incoming email headers say
Return-path: <[email protected]>
Envelope-to: [email protected]
Delivery-date: Tue, 09 Mar 2004 10:38:18 -0500
Received: from mail by server.8888.com with spam-scanned (Exim 4.24)
id 1B0jJ9-0004Un-E6
for [email protected]; Tue, 09 Mar 2004 10:38:18 -0500
Received: from [157.88.149.101] (helo=adi1)

But this is SPAM that was not marked

HELP!!!! lol

Steve
 
Hello,

Try running:

spamd &

to load it up, and to check it, just run:

ps -ax | grep spamd

John
 
I did that - what should I see?

I ran ps -ax | grep spamd and it gave me

22778 pts/0 S 0:00 grep spamd

Can you tell me what this means and whether it is good or bad ;)

Cheers

Steve
 
What you saw is the command you were running. Based on that output, the spamd program is not running, so try running:
Code:
[root@server]# /usr/bin/spamd &
John
 
I think it's working ;)

OK, that seemed to do it.

If I check the headers I now see

Return-path: <[email protected]>
Envelope-to: [email protected]
Delivery-date: Tue, 09 Mar 2004 14:33:43 -0500
Received: from mail by server.8888.com with spam-scanned (Exim 4.24)
id 1B0mz0-0005vl-VK
for [email protected]; Tue, 09 Mar 2004 14:33:43 -0500
Received: from localhost by server.8888.com
with SpamAssassin (2.63 2004-01-11);
Tue, 09 Mar 2004 14:33:43 -0500
From: "Want a computer?" <[email protected]>
To: [email protected]
Subject: If you have bad credit, we'll give you a computer!
Date: Tue, 9 Mar 2004 13:33:44 -0600
Message-Id: <[email protected]>
X-Spam-Flag: YES
X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on server.8888.com
X-Spam-Level: *************
X-Spam-Status: Yes, hits=13.0 required=5.0 tests=BAD_CREDIT,EMAIL_ROT13,
HTML_IMAGE_AREA_05,HTML_IMAGE_ONLY_02,HTML_MESSAGE,MAILTO_SUBJ_REMOVE,
MAILTO_TO_REMOVE,MIME_HTML_NO_CHARSET,MIME_HTML_ONLY,OBSCURED_EMAIL
autolearn=no version=2.63
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="----------=_404E1C17.A6F34C0D"


My question is (sorry) how can I now do something about this spam - ideally can I redirect it to a dump mailbox or at the very least flag it in someway.

I see that it did see that it was spam which is a good start.

Thanks for your patience with me

Steve
 
Hello,

We don't have any method setup this second for redirecting it. I believe jlasman is going to post a method to do this when time becomes available. We'll see what happens.

John
 
DirectAdmin Support said:
Hello,

We don't have any method setup this second for redirecting it. I believe jlasman is going to post a method to do this when time becomes available. We'll see what happens.

John

So what does Spamassassin do if it doesn't redirect? Can it flag the message as Spam in the subject? I am new to this as well but would love to get this working...

Regards,
Phil
 
The idea behind Spamassassin is to just mark the email as potential spam. It can rewrite the subject or add a line to the header. You can use both to filter it out, you can add procmail or mailscanner to sort or delete it.
 
existenz said:
The idea behind Spamassassin is to just mark the email as potential spam. It can rewrite the subject or add a line to the header. You can use both to filter it out, you can add procmail or mailscanner to sort or delete it.

How do you set it up to re-write the subject?

Thanks,
Phil
 
I made my server rewrite the subject line earlier today


edit this file:

/etc/mail/spamassassin/local.cf


add the following 2 lines into local.cf

PHP:
rewrite_subject 1
subject_tag {Spam?} _HITS_ -


so if a spammy email had a subject line which was originally
Buy Viagra

then after the local.cf is changed it becomes

{Spam?} 12.34 - Buy Viagra

where 12.34 is the spam score (hits)


After editing local.cf I also restarted spamd

/etc/rc.d/init.d/spamd stop
/etc/rc.d/init.d/spamd start

and I restarted the exim service just to be on the safe side (not sure if this was needed or not...)

local.cf is global for all domains


There probably are other ways of doing the above, this is what worked for me.
 
Back
Top