Block domain - spam

Discussion in 'Server Operation' started by Christovampaynes, Dec 13, 2017.

  1. Hi!
    I need to do some locks per domain. I'm getting a lot of spam with final domain .my .ltda .fun .fr .tk .cafe .ga .gl .gq ..etc ...
    I would like some tips as I have the following settings today.

    smtpd_sender_restrictions =
    check_sender_access hash:/etc/postfix/sender_block
    check_sender_ns_access hash:/etc/postfix/sender_block,
    check_sender_mx_access hash:/etc/postfix/sender_block,

    and file /etc/postfix/sender_block:
    anaronoz.ml REJECT
    adestlea.ml REJECT
    aquron.cf REJECT
    abaush.ml REJECT
    utonkish.tk REJECT
    envqaz.tk REJECT
    usoedc.tk REJECT
    /\.pro$/ REJECT We reject all .pro domains
    /\.date$/ REJECT We reject all .date domains
    /\.science$/ REJECT We reject all .science domains
    /\.top$/ REJECT We reject all .top domains
    /\.download$/ REJECT We reject all .download domains
    /\.work$/ REJECT We reject all .work domains
    /\.click$/ REJECT We reject all .click domains
    /\.link$/ REJECT We reject all .link domains
    /\.diet$/ REJECT We reject all .diet domains
    /\.review$/ REJECT We reject all .review domains
    /\.party$/ REJECT We reject all .party domains
    /\.zip$/ REJECT We reject all .zip domains
    /\.xyz$/ REJECT We reject all .xyz domains
    /\.stream$/ REJECT We reject all .stream domains
    /\.bid$/ REJECT We reject all .bid domains
    *.ml REJECT
    *.cf REJECT
    *.tk REJECT
    *.ltda REJECT
    *.fun REJECT
    *.my REJECT
    *.fr REJECT
    *.cafe REJECT
    *.ga REJECT
    *.gl REJECT
    *.gq REJECT
    *.gp REJECT
    *.ec REJECT
    *.lt REJECT
    *.fyi REJECT
    *.fi REJECT
    *.pro REJECT

    etc...
    however many emails that are listed within the sender_block file end up coming and going in the user's inbox.
    I tried to block the start of the domain, .my .ltda .fun .fr .tk .cafe .ga, as follows:

    header_checks = regexp:/etc/postfix/header_checks
    file /etc/postfix/header_checks
    /^Received: .*\.im .*$/ REJECT STOP SPAM 1
    /^From: .*\.im .*$/ REJECT STOP SPAM 2
    /^Received: .*\.ltda .*$/ REJECT STOP SPAM 3
    /^From: .*\.ltda .*$/ REJECT STOP SPAM 4
    /^Received: .*\.fyi .*$/ REJECT STOP SPAM 5
    /^From: .*\.fyi .*$/ REJECT STOP SPAM 6
    The result is not being positive because of these domains are passing.

    Any tip?
     
    Last edited: Dec 13, 2017

Share This Page