Link to home
Start Free TrialLog in
Avatar of ropetin
ropetin

asked on

Unable to Rewrite Subject Line

I set up a Qmail Toaster with Vpopmail support, exactly following these instructions;

http://www.shupp.org/toaster/

Everything seems to work wonderfully, and I can send and receive fine.  However, I'm having one small issue with Spamassassin.  Initially it wasn't running at all, but once I linked /usr/local/bin/spamd to /usr/local/spamd, it started working like a champ.  It definitely knows what is or isn't spam, and any spam it detects gets turned into an attachment to an email, which lists all the reasons why the email was detected as spam.

However, what I would like is to have is the text "*****SPAM*****" added to the subject, so my users can easily identify a spam message.

Per some information I found on the Internet, I add the line;

rewrite_header Subject ****SPAM(_SCORE_)****

To the file;

/etc/mail/spamassassin/local.cf

Unfortunately after (I think) restarted Spamassassin, it still doesn't add the text to the subject line.

Honestly, I'm totally lost on this one!
Avatar of WizRd-Linux
WizRd-Linux
Flag of Australia image

/etc/init.d/spamassassin stop
/etc/init.d/spamassassin start

These two commands should definately stop and start spam assassin, however between the two if you add "ps aux | grep spamassassin" you will be able to find out if it is still running in the background.

Also if you are using pre 3.x of spamassassin, check with spamassassin -v the correct sytax will be:

rewrite_subject 1
subject_tag ****SPAM(_SCORE_)****

ASKER CERTIFIED SOLUTION
Avatar of WizRd-Linux
WizRd-Linux
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ropetin
ropetin

ASKER

Currently Spamassassin is being run by simscan via Daemontools, so the usual /etc/init.d/spamd stop and start doesn't work.

I found a couple of suggestions online to just kill the spamd processes, and then let daemontools restart it, which I have done.  Unfortunately the same thing still happens, the subject line does not get re-written.

Here is my current local.cf, with the recently suggested addition, any ideas?
# This is the right place to customize your installation of SpamAssassin.
#
# See 'perldoc Mail::SpamAssassin::Conf' for details of what can be
# tweaked.
#
###########################################################################
 
required_hits 5.0
report_safe 1
rewrite_header Subject ****SPAM(_SCORE_)****
 
skip_rbl_checks 1
use_bayes 1
bayes_file_mode 0700
bayes_path /etc/mail/spamassassin/.spamassassin/bayes
bayes_auto_learn_threshold_spam 8.0
ok_languages all
ok_locales all
add_header spam Flag _YESNOCAPS_

Open in new window

Avatar of ropetin

ASKER

Turns out the above information worked fine (thanks!), I just didn't know how to restart spamd correctly.


svc -du /service/spamd

Worked like a charm.