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.

does not contain .filter

Discussion in 'General Discussion' started by firbolg, Nov 10, 2004.

  1. firbolg

    firbolg Registered

    Joined:
    Nov 10, 2004
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Hi,
    I would like to have a filter to only accept emails that have a particular subject to a particular email address on my site., i.e. I want the emails without this subject to be treated as spam.
    All I can see in Cpanel is a method of blocking email with a certain subject, but what about an option to only allow emails with a specific subject, is there some way that I can manually edit the .filter file, also remembering this only applies to one specific email address.
    Any help would be great.
    regards,
    Barry.
     
  2. pubwvj

    pubwvj Active Member

    Joined:
    Mar 15, 2004
    Messages:
    39
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    In the Mountains of Vermont
    I do it thus:

    $h_X-Spam-Status: begins "Yes"+++++++junk@domain.com
    $header_subject: contains "PasswordA"+++++++protecteduser0@domain.com
    $header_subject: contains "PasswordB"+++++++protecteduser1@domain.com

    in my .filter file in the home directory. This is not rejecting all other mail but it does grab the important mail and let it through if it has one of those two passwords. It uses a very sensitive spam filtering level (must be <1.00) as set in SpamAssassin. In SpamAssassin's user_prefs configuration I whitelist the people I want to hear from and give the password out to other people so they can temporarily reach me. (Aren't I anti-social! :)

    junk@domain.com can be replaced with /dev/nul once you're happy with how things are running so that the spam will be blackholed.

    You can use CPanel File Manger to edit the .filter file which is in your home directory. Add an extra item and then delete it in the CPanel filters page to get the data copied to the vfilters.

    You can use CPanel File Manger to edit the .spamassassin/user_prefs as well since CPanel is useless in that regard. Example:

    required_hits 1.00

    rewrite_header Subject [SPAM=_SCORE_/_REQD_]
    rewrite_header_add Subject 1

    auto_learn 1
    bayes_auto_learn_threshold_nonspam -1.00
    bayes_auto_learn_threshold_spam 5.00

    ok_languages en fr de
    ok_locales en
    use_bayes 1
    use_dcc 1
    use_pyzor 1
    use_razor2 1
    skip_rbl_checks 0
    use_terse_report 0
    report_safe 0

    blacklist_from *@paypal.com

    whiltelist_from friend@friendsISP.com



    Cheers,

    -Walter
    in Vermont
    on a warm New Year's day
    All hail global warming!
    Rev up those SUVs! Not.
     
Loading...

Share This Page