This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Block entire Top Level Domains in Email Protection : Anti-spam ?

I am getting an enormous amount of spam in user quarantines from a seemingly made up TLD. I used to get .xyz and now I get .science.

Of my 10680 mails in quarrintine, 4455 are from a .science domain

I would love it if someone would tell me how to block these since that are all junk.

I tried 
*@*.science
 under Email Protection : Anti-spam : Sender blacklist but it does not work.

It looks like each SPAM campaign has a different IP, domain, and sub-domain so the TLD is the only common factor. These never get caught by rDNS or RBLs and I would like to see them gone.

Here are some sample headers: 

Received: from prescout.quinter.science ([66.248.193.188]:49960) by 7552-5.UTM-server.com with esmtp (Exim 4.82_1-5b7a7c0-XX) (envelope-from ) id 1YzYdc-0005Qn-0p for mic@mydomain.com; Mon, 01 Jun 2015 18:56:56 -0400
Received: from 0035201d.prescout.quinter.science ([127.0.0.1]:4011 helo=prescout.quinter.science) by prescout.quinter.science with ESMTP id 00GP3520VA1D; for ; Mon, 1 Jun 2015 15:56:55 -0700
X-CTCH-RefID: str=0001.0A020203.556CE338.00C9,ss=3,re=0.000,recu=0.000,reip=0.000,cl=3,cld=1,fgs=0
Date: Mon, 1 Jun 2015 15:56:55 -0700
To: 
Message-ID: 

Received: from 2rqun09wm.lovechristian.science ([198.52.177.235]:50587) by 7552-5.UTM-server.com with esmtp (Exim 4.82_1-5b7a7c0-XX) (envelope-from ) id 1YzYS4-0004vz-0R for connie@mydomain.com; Mon, 01 Jun 2015 18:45:00 -0400
Received: from 00de1d46.2rqun09wm.lovechristian.science (amavisd, port 6523) by 2rqun09wm.lovechristian.science with ESMTP id 00PPATYDE1DVNNNY46; for ; Mon, 1 Jun 2015 15:44:56 -0700
X-CTCH-RefID: str=0001.0A020202.556CE038.0081,ss=3,sh,re=0.000,recu=0.000,reip=0.000,cl=3,cld=1,fgs=0
Message-ID: 
Envelope-to: connie@mydomain.com
Date: Mon, 1 Jun 2015 15:44:56 -0700
From: "ONLINE-DATING" 
Subject: ARE YOU-SINGLE?- CONSIDER THIS..
To: 
Content-Language: en-us


Will a REGEX work?

If so, can someone please post one?

Thanks.


This thread was automatically locked due to age.
Parents
  • hi,

    i'm also interested in blocking such "threads". maybe  the option 
    *@*.science


    could be a feature in a release in the future, if its possible? it will make it much easier to get such emails sorted out.
  • This doesn't need a feature request as it used to work. But alas, as everything else that used to work in astaro, a lot of little stuff doesn't work in sophos[:@]

    You can modify the exim.conf file to workaround the problem but keep in mind it will break your support and may break other things if you are using profiles. Also I wouldn't use very long lists since it may slow your exim down.
    Edit using vi or whatever, but make sure you google vi tutorial before using vi. Its not intuitive if you don't know what you are doing 
    vi /var/storage/chroot-smtp/etc/exim.conf

    Look for the section 
    # Sender blacklist

    Comment out the line senders=wildlsearch with # in the beginning like I have done below
    #       senders = wildlsearch;SENDERBLACKLIST/${lookup{${lc:$domain}}nwildlsearch{SENDERBLACKLIST/domains}}


    Add another line below the commented line
    senders = SENDERBLACKLIST/REF_SMTPGlobalProfile
     
    Your sender blacklist section should look like this now

      # Sender blacklist
      drop message = Access denied (sender blacklisted)
           domains = +domains
    #       senders = wildlsearch;SENDERBLACKLIST/${lookup{${lc:$domain}}nwildlsearch{SENDERBLACKLIST/domains}}
            senders = SENDERBLACKLIST/REF_SMTPGlobalProfile
           set acl_c0 = sender_blacklist
           set acl_c1 = $sender_address blacklisted
           condition = INSERT_REJECT
           logwrite = LOG_RCPT_REJEC

    Save the file and restart the smtp proxy from webadmin. Look for any error logs and revert changes as necessary. You can now add wildcards anyway you want including TLDs[;)]
  • Billybob,

    So are you saying:

    A. That the Sender Blacklist in WebAdmin: EMail Protection: SMTP: AntiSpam tab is calling the code below from the exim.conf?
    wildlsearch;SENDERBLACKLIST/${lookup{${lc:$domain}}nwildlsearch{SENDERBLACKLIST/domains}}


    B. That the above code was modified at some point by Sophos during a firmware update and is now  insufficient to have *@*.science or a REGEX work from Sender Blacklist: Blacklisted address patterns on WebAdmin: EMail Protection SMTP: AntiSpam tab but it used to work in an earlier version before exim.conf was changed to above code?

    and

    C. That if the exim.conf gets modified the way you specify then *@*.science will work when added to Sender Blacklist: Blacklisted address patterns on the WebAdmin: EMail Protection SMTP: AntiSpam tab or would it require a REGEX?

    Also, I would assume this would get wiped out by any firmware updates, but survive reboot?

    Thanks,
    HTG

    Best Regards - HTG
    Frustrated Sophos Partner seeing all the things
    that brought me to Sophos slowly slip away.
    RIP astaro.org

  • The antispam tab modifies the file 
    /var/storage/chroot-smtp/etc/exim.conf.senderblacklist/REF_SMTPGlobalProfile
    . Exim.conf is a generic template higly modified by astaro. All I am doing is calling the file directly instead of using wild linear search function. The file needs either wildcards or specific email address, regex won't work.

    The file maintainer Micha Lenk hasn't worked for sophos in a while. I haven't looked at how the older versions were calling the feauter, but I have successfully used the sender blacklist before. I am not sure if sophos made the change or if the current version of exim is having issues but regardless, the linear wildlsearch function built into exim is not working for some reason.

    But if you give the file location, it works perfectly. A firmware update more than likely won't bother it unless it involved smtp proxy. A reboot or any other configuration change should have no effect.

    I have used the function before but country blocking etc usually takes care of my problems. But sender blacklist is trivial in most MTAs and there is no reason it shouldn't work in astaro[:@]
  • I was curious so I searched where the functionality broke and traced it back to 9.3 beta here https://community.sophos.com/products/unified-threat-management/astaroorg/f/82/t/65900

    Seems like webadmin was not creating the reference REF_SMTPGlobalProfile and therefore since the search file was missing, all the mails were being temporarily rejected. The final fix to the problem wasn't supposedly released till v9.309 but the 9.30xx releases before that somehow worked. I am guessing someone took the blacklist functionality out. 

    They supposedly fixed the REF_SMTPGlobalProfile file creation problem, and fixed something again in 9.310 but the backend is still broke.
    34744 Email scanner timeout/deadlock if blacklist entry contains multiple *

    By that time wifi was completely useless so who cares about global blacklists right? What a joke[:O]
  • Billybob,

    OT: Tell me about it! My UTMs with WiFi are still useless but I now have them on SNAP AV Wattboxes so I can remote reboot the APs, and auto reboot then everyday at 6am. They are still much slower on Speedtest than the APs they replaced. Supposedly this can be fixed by connecting the APs directly to a UTM port instead of just on the LAN, but I have not been able to try this yet.

    The UTM I have running SMTP proxy is still on version 9.307. IDC if it is on the latest, I just need SMTP Proxy to work.

    So after your research, would you you say there is one particular version that works like maybe 9.309 that I could upgrade to and get this working without having to modify /var/storage/chroot-smtp/etc/exim.conf?

    Or am I still going to need to do the mod?

    Thanks,
    HTG

    Best Regards - HTG
    Frustrated Sophos Partner seeing all the things
    that brought me to Sophos slowly slip away.
    RIP astaro.org

  • Bob (BAlfson) is the master of astaro world and beyond[:D] The guy can answer most questions before you even ask them[:P] He probably knew about the exim.conf modification that I wrote about but most likely didn't mention it since he likes to stay within compliance as much as possible. He will guide you in the best direction.

    We stopped using astaro in our organization a while back and I have not really been involved with the latest trends in newer versions of astaro so can't really answer your question. If I had to take a guess, probably 9.2x tree would be your best bet. I am on v9.310 at home and the functionality you are seeking is broken in this version. Maybe you can try one of the newer soft releases that are floating around and start a conversation in the soft release thread about blacklisting not working.

    Best of luck to you[:)]
  • I'm not sure what's causing it, but after I implemented this change all user defined blacklists stopped working.

    The TLD blocking works perfectly.

  • This method worked perfectly to block TLD's.

     

    The problem is, it broke user blacklists and whitelists.  This is really becoming a crisis now.  ALL user's whitelists no longer function after making this change.

    I have to have user whitelists working.  And I HAVE to have TLD domain blocking working.

     

    Please help.

  • Yesterday, xyz.bl.yodbl.net was apparently hacked as many IPs were added to it that are NOT spam IPs.  Outlook.com?  Ridiculous.  Remove it if you have it.

    Cheers - Bob

     
    Sophos UTM Community Moderator
    Sophos Certified Architect - UTM
    Sophos Certified Engineer - XG
    Gold Solution Partner since 2005
    MediaSoft, Inc. USA
  • Outlook.com is a notorious spam haven.

    99% of emails we receive from outlook.com are spam.  Microsoft allow anything to go through it.

     

    It is almost 100% indian folks telling me they can optimize my website search results.  We block them.

    Anything that microsoft touches is garbage.

  • To each his own, man, but other than outlook.com, blocked emails included those from the Sophos Community, Discover, Mail Chimp, etc.  Also, forwards from my university alumni account and my Facebook account,

    Cheers - Bob

     
    Sophos UTM Community Moderator
    Sophos Certified Architect - UTM
    Sophos Certified Engineer - XG
    Gold Solution Partner since 2005
    MediaSoft, Inc. USA
Reply
  • To each his own, man, but other than outlook.com, blocked emails included those from the Sophos Community, Discover, Mail Chimp, etc.  Also, forwards from my university alumni account and my Facebook account,

    Cheers - Bob

     
    Sophos UTM Community Moderator
    Sophos Certified Architect - UTM
    Sophos Certified Engineer - XG
    Gold Solution Partner since 2005
    MediaSoft, Inc. USA
Children
No Data