Spam - sender_access stopped working after upgrade

Discussion in 'Installation/Configuration' started by TheBirdMan, Oct 13, 2016.

  1. TheBirdMan

    TheBirdMan Member

    After upgrading from ispconfog 3 to 3.1 my postfix sender_access stopped working. I was able to block spam root domains like .info, .web… The postfix blacklist within ispconfig does not stop .web, .info.… unless I am using the wrong format.

    Thank you for any help,
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    The postfix blacklist in ispconfig makes no difference on the tld, so it works for all tld's in the exact same way. Did you had a look at the syntax in the manual?
     
  3. TheBirdMan

    TheBirdMan Member

    I still have the isoconfig 2 manual so I will need to download the new one. The format I tried was .info and @*.info but neither worked. I don't remember any information about that in the v2 manual.
    Thanks,
     
  4. TheBirdMan

    TheBirdMan Member

    I have the v3 manual and it looks like my syntax is correct.
     
  5. TheBirdMan

    TheBirdMan Member

    I ended up just creating a rejected_domains file to block all tld's known for spam and it's working great. I can still use the ispconfig blacklist for specific domains. There may be a better way but here is what I did incase anyone else is having major spam issues or has a better way of doing it.

    created a file
    nano /etc/postfix/rejected_domains

    insert into /etc/postfix/rejected_domains =
    Code:
    /\.download$/   REJECT Mail from .download not accepted
    /\.in$/           REJECT Mail from .in not accepted
    /\.top$/           REJECT Mail from .top not accepted
    /\.info$/       REJECT Mail from .info not accepted
    /\.date$/           REJECT Mail from .date not accepted
    /\.biz$/           REJECT Mail from .biz not accepted
    /\.racing$/           REJECT Mail from .racing not accepted
    /\.xyz$/           REJECT Mail from .xyz not accepted
    /\.faith$/           REJECT Mail from .faith not accepted
    /\.bid$/           REJECT Mail from .bid not accepted
    /\.review$/           REJECT Mail from .review not accepted
    /\.enjoy$/           REJECT Mail from .enjoy not accepted
    /\.in.net$/           REJECT Mail from .in.net not accepted
    /\.space$/           REJECT Mail from .space not accepted
    /\.eu$/           REJECT Mail from .eu not accepted
    /\.club$/           REJECT Mail from .club not accepted
    /\.pro$/           REJECT Mail from .pro not accepted
    /\.link$/           REJECT Mail from .link not accepted
    /\.click$/           REJECT Mail from .click not accepted
    /\.win$/           REJECT Mail from .win not accepted
    /\.website$/           REJECT Mail from .website not accepted
    /\.loan$/           REJECT Mail from .loan not accepted
    /\.uno$/           REJECT Mail from .uno not accepted
    /\.vn$/           REJECT Mail from .vn not accepted
    /\.trade$/           REJECT Mail from .trade not accepted
    /\.us$/           REJECT Mail from .us not accepted
    /\.stream$/           REJECT Mail from .stream not accepted
    may want to backup main.cf
    cp /etc/postfix/main.cf /etc/postfix/main.cf-bak

    postconf -e smtpd_sender_restrictions=pcre:/etc/postfix/rejected_domains
    postconf -e reject_unauth_destinations=pcre:/etc/postfix/rejected_domains

    I modified my smtpd_sender_restrictions line in the main.cf file to look like this =

    smtpd_sender_restrictions = check_sender_access regexp:/etc/postfix/tag_as_originating.re, permit_mynetworks, permit_sasl_authenticated, check_sender_access mysql:/etc/postfix/mysql-virtual_sender.cf, check_sender_access regexp:/etc/postfix/tag_as_foreign.re, pcre:/etc/postfix/rejected_domains

    If there is a better way please let me know, Thanks
     

Share This Page