Blocking whole TLDs in Exim

Problem Description

The ‘blacklist by email address’ documentation states:

To block a specific sender, add the email address to /etc/exim4/blacklist/by_sender. This also accepts wildcard addresses such as *@example.com and user@*

Are wider wildcards permitted? For example, can I block anything from *.biz? There are some TLDs which generate nothing but spam - in my case pretty much anything other than .uk, .com, .net and .org.

Environment

  • Sympl Version: 12
  • Debian Version: 12
  • Hardware Type: VPS
  • Hosted With: Mythic Beasts

Simple answer - yes. Strings like

*.tld

do work.

Thanks for the tip, I hadn’t realised that would work.