Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 11 of 11
  1. #1
    Member
    Join Date
    Sep 2002
    Posts
    18

    Default SpamAssassin no longer modifying subject line. (cPanel 6)

    G'day

    My parent hosting provider appears to have upgraded to cPanel 6. Since then SpamAssassin is not altering the subject line, but is doing everything else that it used to. I have tried disabling and re-enabling SA.

    Has anyone else come across this problem?

    Cheers, Mike.

    http://www.auzzie.net/

  2. #2
    Member
    Join Date
    Sep 2002
    Posts
    282

    Default spamassassin

    from reading the spamassasin mailing list, there MIGHT
    be a configuration option to return to the old behaviour,
    otherwise, I'd suggest you look at spamassassin.org
    they might have the authoritative answer for you

  3. #3
    Moderator cPanel Partner NOC Badge dgbaker's Avatar
    Join Date
    Sep 2002
    Location
    Toronto, Ontario Canada
    Posts
    2,773

    Default

    Try this;

    In /usr/share/spamassassin

    edit 10_misc.cf

    Look for the following lines

    10_misc.cf: rewrite_subject 0
    10_misc.cf: subject_tag *****SPAM*****

    change the 0 to a 1

    That should turn it back on.
    Regards,
    David
    Forum Moderator

  4. #4
    Member
    Join Date
    Sep 2002
    Posts
    18

    Default

    G'day again

    My parent hosts have tried your solution, and also tried rebooting the server, but the problem still remains.

    Any other suggestions?

    Cheers, Mike.

  5. #5
    JC
    JC is offline
    Member
    Join Date
    Nov 2002
    Posts
    88

    Default

    Well Mike,

    David is right.
    I did some testing because it is also happening on my server.
    It does work as he says if you add those options into each /home/user/.spamassassin/user_prefs

    I just added the following at the end of each file:
    rewrite_subject 1
    # report_safe 1
    subject_tag *****SPAM*****
    # use_terse_report 0
    # skip_rbl_checks 0
    # check_mx_attempts 2
    # check_mx_delay 5

    Tested by sending a spam message and it works now. Why it doesn't work serverwide I cannot gues :-(

  6. #6
    Member trakwebster's Avatar
    Join Date
    Jan 2003
    Posts
    145

    Default system-wide config for spamassassin

    At spamassassin.org/doc.html there is a 'Top Level README File' which, among many many many other things, says:

    Customising SpamAssassin
    ------------------------

    These are the configuration files installed by SpamAssassin. The commands
    that can be used therein are listed in the POD documentation for the
    Mail::SpamAssassin::Conf class (run the following command to read it:
    "perldoc Mail::SpamAssassin::Conf"). Note: The following directories are
    the standard defaults that people use. There is an explanation of all the
    default locations that SpamAssassin will look at the end.

    - /usr/share/spamassassin/*.cf:

    Distributed configuration files, with all defaults. Do not modify
    these, as they are overwritten when you upgrade.

    - /etc/mail/spamassassin/*.cf:

    Site config files, for system admins to create, modify, and
    add local rules and scores to. Modifications here will be
    appended to the config loaded from the above directory.

    - /usr/share/spamassassin/user_prefs.template:

    Distributed default user preferences. Do not modify this, as it is
    overwritten when you upgrade.

    - /etc/mail/spamassassin/user_prefs.template:

    Default user preferences, for system admins to create, modify, and
    set defaults for users' preferences files. Takes precedence over
    the above prefs file, if it exists.

    Do not put system-wide settings in here; put them in the
    /etc/mail/spamassassin directory. This file is just a template,
    which will be copied to a user's home directory for them to
    change.

    [ snip -- it then goes on to the config available inside the user's home area ]


    Now, I'm not very skillful at this, but it would appear that the one which would produce system-wide change would be the second one, here:


    - /etc/mail/spamassassin/*.cf:

    When I went there I found only one file called local.conf. Inside it says:

    # this is the right place to customize your installation of SpamAssassin
    # See 'perldoc Mail::SpamAssassin::Conf for details of what can be tweaked
    #
    #rewrite_subject 0
    #report_header 1
    #defang_mime 0

    I tried uncommenting rewrite_subject and setting the value to 1.

    However, it didn't seem to make any difference. I sent myself some spam, and although all the 'analysis' is printed inside the email when received, the header is not rewritten.

    I might guess that the spam daemon may need to be restarted because if it's smart it only reads the config file once; but I do not know how to restart it, assuming that the spam daemon is in fact running.

    I tried the suggestion about using the command perldoc blahblah, but my system complained that something called taint needed to be enabled.

    I suppose I could rewrite all the user prefs, but it's meant to be configurable system wide, so there must be a way it can be done.

    Anyone?
    -- Arthur Cronos from Voltos
    =================================================
    The Bloggard, Un Hombre Muy Blogisto -- http://www.bloggard.com
    Your loch ness monster, your yeti, your bigfoot. Bah! I've seen worse.
    =================================================

  7. #7
    Moderator cPanel Partner NOC Badge dgbaker's Avatar
    Join Date
    Sep 2002
    Location
    Toronto, Ontario Canada
    Posts
    2,773

    Default

    To use perldoc make sure you are NOT root.
    Regards,
    David
    Forum Moderator

  8. #8
    Member trakwebster's Avatar
    Join Date
    Jan 2003
    Posts
    145

    Default Must be root ... must not be root!

    David,

    aha!

    Ok, one devil down, 428 to go!

    -- Arthur Cronos at Voltos
    -- Arthur Cronos from Voltos
    =================================================
    The Bloggard, Un Hombre Muy Blogisto -- http://www.bloggard.com
    Your loch ness monster, your yeti, your bigfoot. Bah! I've seen worse.
    =================================================

  9. #9
    Member
    Join Date
    Aug 2001
    Posts
    110

    Default

    Cpanel upgraded Spamassassin with the Cpanel 6 upgrade... So this behavior changed.

    To put the *****SPAM***** back in the subject line by default, edit this file:
    /etc/mail/spamassassin/local.cf

    And put in this line:
    rewrite_subject 1

    Then restart spamd by restarting Exim:
    service exim restart

    This upgrade (finally) made it possible for users to use their own preferences again. So the user can turn this off if they want by editing the:
    ~/.spamassassin/user_pref file and putting in:
    rewrite_subject 0

  10. #10
    Member trakwebster's Avatar
    Join Date
    Jan 2003
    Posts
    145

    Default Found the problem!

    Hi, jumpdomain,

    What you say makes sense. This is exactly what the SpamAssassin document says should work.

    All the same, I did just those things and restarted exim ... but it did not seem to work.

    However, I've found where the problem lies. When, as root, I restart exim with

    service exim restart

    then it *does* stop and restart the spamd daemon along with exim.

    However, apparently when I *restart* exim by using WHMgr, it does restart exim but it must not restart spamd, because if you do it that way, the emails's subjects do *NOT* show the change you've made to /etc/mail/spamassassin/local.cf

    Saying it another way, in order to re-enable SpamAssassin to write *****SPAM***** in the subject line, after you edit the /etc/mail/spamassassin/local.cf file you must restart exim with the shell command, not with WHMgr.

    Thanks for your help!

    Last edited by trakwebster; 03-09-2003 at 12:29 PM.
    -- Arthur Cronos from Voltos
    =================================================
    The Bloggard, Un Hombre Muy Blogisto -- http://www.bloggard.com
    Your loch ness monster, your yeti, your bigfoot. Bah! I've seen worse.
    =================================================

  11. #11
    Member SageBrian's Avatar
    Join Date
    Jun 2002
    Location
    NY/CT (US)
    Posts
    386

    Default Re: Found the problem!

    Originally posted by trakwebster

    However, I've found where the problem lies. When, as root, I restart exim with

    service exim restart

    then it *does* stop and restart the spamd daemon along with exim.

    However, apparently when I *restart* exim by using WHMgr, it does restart exim but it must not restart spamd, because if you do it that way, the emails's subjects do *NOT* show the change you've made to /etc/mail/spamassassin/local.cf

    Saying it another way, in order to re-enable SpamAssassin to write *****SPAM***** in the subject line, after you edit the /etc/mail/spamassassin/local.cf file you must restart exim with the shell command, not with WHMgr.
    Confirmed. Worked great. While there, I also made sure that my email address was put in on the WhiteList.

    Let's hope that SpamAssassin and Exim don't change the system again.

    And, maybe in the future, when we restart exim from WHM, it will behave like the command line? Or, better yet.... what if we had a way to issue a command line directly from WHM?

Similar Threads & Tags
Similar threads

  1. SpamAssassin Does Not Rewrite Subject Line Anymore
    By viking2ev in forum E-mail Discussions
    Replies: 13
    Last Post: 07-30-2010, 02:41 PM
  2. spamassassin can't rewrite subject in cpanel 11?
    By babaganoosh in forum cPanel and WHM Discussions
    Replies: 6
    Last Post: 11-06-2008, 04:06 PM
  3. Allowing email by a code word in the subject line
    By cPandemonium in forum E-mail Discussions
    Replies: 4
    Last Post: 01-29-2008, 04:44 PM
  4. Spamassassin not tagging subject line
    By nsusa in forum cPanel and WHM Discussions
    Replies: 24
    Last Post: 09-21-2007, 05:07 PM
  5. seeing spamassasin AND mailscanner subject line modifications?
    By dhecker in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 08-06-2005, 12:47 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube