Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 4 of 4
  1. #1
    Member
    Join Date
    Jan 2005
    Posts
    19

    Default How to reject all emails by spamassassin

    Hello Folks,

    What would happen if I specify a domain or ip address in both blacklist_from and whitelist_from field of spamassassin. Tagged as spam or not? I want to to receive emails only from some domains and reject all other emails. Can this be done by blacklisting all and whitelisting the required domains?

    Thanks

  2. #2
    wzd
    wzd is offline
    Member wzd's Avatar
    Join Date
    Dec 2005
    Location
    South Africa
    Posts
    115

    Smile Lotsa stuff

    By adding lines such as:

    blacklist_from sde@spledee.com
    blacklist_from *@bonanzaoffers.com
    blacklist_from *@deal-seeker.com
    blacklist_from *@hispeedmediaoffers.com
    blacklist_from *@jumpjive.com
    blacklist_from *@*.ew01.com

    to /etc/mail/spamassassin/local.cf or ~/.spamassassin/user_prefs , you tell spamassassin that mail from any of these domains gets a +100 spam score, effectively blocking them.

    Then try whitelisting a specific domain?

    Otherwise if you are concerned about spam why not check out this black list:

    http://www.sa-blacklist.stearns.org/sa-blacklist/

    MORE:

    The following procmail script will delete mail with a score of 15 or higher. By moving the # (comment) mark up one line, it will save all mail with a score of 15 or higher in a separate folder rather than deleting. The general implementation then, is that mail with a score of less than 5 goes into the inbox, a client side rule triggering on "X-Spam-Status: YES" will cause mail scoring between 5 and 15 to go into a Junk Mail folder where it can regularly be checked, and mail of 15 or higher will be stored on the server or dropped on the floor.

    Code:
    Uncomment the following 3 lines and use tail -f procmail.log to debug
    #LOGFILE=$HOME/procmail.log
    #VERBOSE=yes
    #LOGABSTRACT=all
    
    # Send all mail through SpamAssassin
    
    :0fw: spamassassin.lock
    * < 256000
    | spamassassin
    
    
    # Mail that is very likely spam (>15) can be dropped on the floor.
    # Move the # up one line to save it on the server instead.
    # Note that dropping mail on the floor is a *bad*
    # idea unless you really, really believe no false positives will
    # have a score greater than 15.
    
    :0
    * ^X-Spam-Level: \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
    /dev/null
    #almost-certainly-spam
    http://wiki.apache.org/spamassassin/...lToForwardMail

    Read that for more information :-)

    I am not certain what will happen if you blacklist *@* and whitelist a certain *@domain.com but give it a go. In order to delete the emails you will use the above and provide all blacklisted emails with a score say above 15 or 100 and then use that procmail script.

    Let me know how it goes,
    Attached Thumbnails Attached Thumbnails How to reject all emails by spamassassin-confused_spammer.jpg  
    You will learn to earn death...
    Flamewave

  3. #3
    Registered User
    Join Date
    Aug 2008
    Posts
    4

    Default

    you tell spamassassin that mail from any of these domains gets a +100 spam score, effectively blocking them.
    Hello,

    I have a similiar question: I want to whitelist a whole domain and blacklist certain specific users from that domain. The whitelist rule give -100.. according to your reply blacklisting gives +100.

    This would leave the score of the bad email around 0... thus allowing it to pass (my SA score is 1).

    I am a user, I do not know how to create rules. I do know that in the Configure SA options there is a section that allows you to overwrite scores but I do not know the name of the rule associated to the blacklist so I can set it to +200 for example.


    Oh and why don't my blacklisted emails get filtered through as normal spam into my spam-catching-account? They just dissapear or sometimes send error messages.


    Thanks in advance!

  4. #4
    Registered User
    Join Date
    Aug 2008
    Posts
    4

    Default

    Ok I found out how to do this with an account in cP 10

    score USER_IN_BLACKLIST ###

    Works great!

    For some reason it doesn't work the same in cP 11. I suspect that the rule is called differently. Any ideas?

Similar Threads & Tags
Similar threads

  1. reject .pps,.html and etc.. for emails per domain
    By jeancog84 in forum E-mail Discussions
    Replies: 3
    Last Post: 05-21-2008, 07:50 AM
  2. Replies: 2
    Last Post: 10-01-2007, 09:42 AM
  3. reject large emails
    By abubin in forum E-mail Discussions
    Replies: 1
    Last Post: 04-17-2007, 04:30 AM
  4. how to auto reject and delete emails like this?
    By roby2k in forum cPanel and WHM Discussions
    Replies: 5
    Last Post: 02-07-2007, 07:59 AM
  5. SpamAssassin Not Tagging Forwarded Emails
    By Jeff75 in forum cPanel and WHM Discussions
    Replies: 9
    Last Post: 11-28-2005, 11:29 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube