The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Spam Assisin Config

Discussion in 'General Discussion' started by pkuk, May 4, 2003.

  1. pkuk

    pkuk Well-Known Member

    Joined:
    Nov 16, 2002
    Messages:
    65
    Likes Received:
    0
    Trophy Points:
    6
    Hi

    A client has made this request, can anyone help?


    ***
    "I have enabled spam assassin on my account it seems to working fine with the default level of 5. I have located a spam assassin config file on the server but I guess it is a .properies.override type thing where there is a base config and you mod that.

    What I would like to do, if possible, is to setup spam assassin to modify the subject line of the email to include a SPAM: at the beginning. This would allow my rules engine to just look at the subject rather than the a body text search for "This mail is probably spam."
    ***
     
  2. SonServers

    SonServers Well-Known Member

    Joined:
    Oct 24, 2001
    Messages:
    94
    Likes Received:
    0
    Trophy Points:
    6
    Hi,

    You should have a system-wide config file for Spamassassin at:
    /etc/mail/spamassassin/local.cf

    Each user also has their own config file at:
    /home/username/.spamassassin/user_prefs

    Given that, the following comes from the config docs at:
    http://www.spamassassin.org

    So, if you want the user to be able to set his own preferences, you need to turn this on in the system-wide config like:
    allow_user_rules 1

    The docs clearly discourage turning this on. The user settings will not be read unless you do.

    If you don't want to allow individual user settings but want to have all it so everyone's subjects will get tagged, you need this one:

    So, to make Spamassassin tag the subject lines for everyone, add this line to the system-wide config:
    rewrite_subject 1

    If you want to change the subject tag:

    Spamassassin used to tag the subject lines but somewhere along the way it defaulted to no tags. I personally missed the tag so I just changed it back system-wide . . . because that's the way I wanted it. ;)

    Hope that helps,
    Scott
     
  3. casey

    casey Well-Known Member

    Joined:
    Jan 17, 2003
    Messages:
    2,303
    Likes Received:
    0
    Trophy Points:
    36
    Location:
    If there is trouble, it will find me
    Does this get overwritten with every cPanel update?

    cPanel.net Support Ticket Number:
     
  4. joshstein

    joshstein Active Member

    Joined:
    Feb 23, 2003
    Messages:
    40
    Likes Received:
    0
    Trophy Points:
    6
    Does it?

    cPanel.net Support Ticket Number:
     
  5. casey

    casey Well-Known Member

    Joined:
    Jan 17, 2003
    Messages:
    2,303
    Likes Received:
    0
    Trophy Points:
    36
    Location:
    If there is trouble, it will find me
    Yea!

    cPanel.net Support Ticket Number:
     
  6. Damian

    Damian Well-Known Member

    Joined:
    Oct 1, 2001
    Messages:
    95
    Likes Received:
    1
    Trophy Points:
    8
    The ability to change the subject line has been available within the CPanel supplied CPanel themes for a few weeks.

    If you go into the Spam Assassin page within the control panel you will see a 'Configure' button. Within this page you can change the score, the subject line and blacklist/whitelist specific addresses. These are set on per username basis and are not overwritten as they user based settings.

    If you are using a 3rd party theme and this option isn't available get on them so that they can update their theme to support it :)

    cPanel.net Support Ticket Number:
     
  7. Tom Pyles

    Tom Pyles Well-Known Member

    Joined:
    Apr 26, 2002
    Messages:
    254
    Likes Received:
    0
    Trophy Points:
    16
    Damian,
    Good point, but it is faulty (at least for us). When we use the custom configuration in Blue Lagoon, the score is changed to what we want, but for the life of me, I can't get a subject line of ***SPAM***. It retains the e-mails orginial subject, but the e-mail itself is changed to 'This mail is probably spam.....'

    cPanel.net Support Ticket Number:
     
  8. Damian

    Damian Well-Known Member

    Joined:
    Oct 1, 2001
    Messages:
    95
    Likes Received:
    1
    Trophy Points:
    8
    Have you placed a '1' in the text box above the 'subject_tag' line?

    It needs to be set as follows:

    subject_tag 1
    rewrite_subject SPAM

    Is suspect that you have, but I thought it best to asl :) It seems to be working ok for us. Two items to note though.

    1) You can't prepend SPAM: to the subject line. You can only replace (rewrite) the entire subject line.

    2) The subject line can't contact spaces. Everytime a user has tried to save the subject line it truncates it at the first space. We've just gone to suggesting underscores_be_used_instead.

    cPanel.net Support Ticket Number:
     
  9. SonServers

    SonServers Well-Known Member

    Joined:
    Oct 24, 2001
    Messages:
    94
    Likes Received:
    0
    Trophy Points:
    6
    I have not used the individual spamassassin settings in Cpanel. In my spamassasin local.cf file, I have the following settings:

    rewrite_subject 1
    required_hits 5
    subject_tag **SPAM** (score:_HITS_)

    Now, when Spamassassin gets triggered by a message over a score of 5, the spam tag gets added but the full subject is remaining in tact. For example, I got a spam this morning and the subject is:

    **SPAM** (score:10.00) 7 *VERY* VALUABLE ITEMS FOR YOUR REVIEW.

    It seems to be working for me.

    cPanel.net Support Ticket Number:
     
  10. PbG

    PbG Well-Known Member

    Joined:
    Mar 11, 2003
    Messages:
    241
    Likes Received:
    0
    Trophy Points:
    16
    Has anyone ever tried ading the following option found at http://spamassassin.org/doc/Mail_SpamAssassin.html


    $f->reply_with_warning ($mail, $replysender)
    Reply to the sender of a mail, encapsulated in a Mail::Audit object, explaining that their message has been added to spam-tracking databases and deleted. To be used in conjunction with report_as_spam. The $replysender argument should contain an email address to use as the sender of the reply message.


    If you have any experience with this option or any other options that actually delete the message and/or return the same to the sender please advise.

    cPanel.net Support Ticket Number:
     
  11. Stefaans

    Stefaans Well-Known Member

    Joined:
    Mar 5, 2002
    Messages:
    451
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    Vancouver, Canada
    I would love to have the ability to delete tagged messages. But it would appear as if the current order of events does not allow for this.

    To get tagged message deleted I currently do the following;
    * Deliver messages to a mailbox. Spamassassin tags the offending messages.
    * Use fetchmail to re-deliver the same messages to a second mailbox. I have a mail filter set up that deletes tagged messages.

    cPanel.net Support Ticket Number:
     
  12. qdog

    qdog Member

    Joined:
    Apr 27, 2004
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    1
    Use filters to delete it:
    Hint: To filter all mail that SpamAssasin has marked as spam, just choose "SpamAssassin Spam Header", "begins with", and then enter "Yes" in the box.
     
  13. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    Wow! a year old thread, WTG ;)
     
Loading...

Share This Page