Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

does not contain .filter

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

  1. firbolg

    firbolg Registered

    Nov 10, 2004
    Likes Received:
    Trophy Points:
    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.
  2. pubwvj

    pubwvj Active Member

    Mar 15, 2004
    Likes Received:
    Trophy Points:
    In the Mountains of Vermont
    I do it thus:

    $h_X-Spam-Status: begins "Yes"
    $header_subject: contains "PasswordA"
    $header_subject: contains "PasswordB"

    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! :) 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 *



    in Vermont
    on a warm New Year's day
    All hail global warming!
    Rev up those SUVs! Not.
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice