Skip to main content

Reject senders based on wildcard domain names like *.link

Comments

11 comments

  • cPanelMichael
    Hello :) The following thread should help: How to filter all email from specific TLD Thank you.
    0
  • ebizindia
    Nice one. Thanks Michael. I have applied the custom filter option and it seems to work. Do you suggest having one if with several ORs or several blocks, each with one rule?
    0
  • cPanelMichael
    You should be fine with multiple "OR" statements, but feel free to test the custom filter rule and let us know how it works. Thank you.
    0
  • ebizindia
    Ref: Exim custom filter The code below does not stop the mail from someone@gmail.com. Any clue? I restarted Exim after saving the custom filter and it is also set as the custom filter in the WHM Exim configuration. if first_delivery and ("$h_from:" contains "somename@gmail.com") then seen finish endif Edit: Typo corrected
    0
  • IGonza
    ]Hello :) The following thread should help: How to filter all email from specific TLD Thank you.

    can it be achieved with the method described here ?
    0
  • Infopro
    3 posts above yours here, is a link posted by cPanelMichael. Have a peek at that one.
    0
  • IGonza
    ]3 posts above yours here, is a link posted by cPanelMichael. Have a peek at that one.

    I saw that post and method. But I asked how to do it (if possible) with the method described here: # Inserted to block domains access # Local from blacklist: /etc/exim_blacklist reject_domains: driver = redirect # RBL Blacklist incoming hosts domains = +exim_blacklist allow_fail data = :fail: Connection rejected: SPAM source $domain is blacklisted.
    0
  • cPanelMichael
    The method in the referenced thread uses an Exim filter rule, whereas the method you posted is a modification of the Exim configuration. You are welcome to use whichever method you prefer, but you may want to test both methods to ensure they are working as intended. Thank you.
    0
  • ebizindia
    I did the following and it is not working (FWIW, I use Exim and Mailscanner both): I changed the Exim filter to cpanel_exim_filter_custom In this file, I have the following: if "$header_from:" ends ".link" or "$header_from:" ends ".rocks" then seen finish endif I had tried with $h_from also. We have also tried if "$header_from:" ends ".link" or "$header_from:" ends ".rocks" then pipe "/dev/null" endif Nothing is stopping the mail. I am assuming that Exim gets to handle the mail first and then Mailscanner takes over. Is it possible that Mailscanner is bypassing the Exim filter and therefore the filter is not having any effect? TIA
    0
  • stormy
    The problem seems to be that SpamAssassin is not processing the new TLDs correctly, as explained in uribl.com. I'm opening a separate thread about this. Edit - here's the thread:
    0
  • ebizindia
    Thanks Stormy. However please note that I have set up filters to delete these mails but the filter does not seem to work. That is my primary concern here.
    0

Please sign in to leave a comment.