Spamdyke doesn’t block TLDs using something like @ru in the blacklist senders. 
It WILL block full domains (and their subdomains) but you must give the full 
domain name like “spammer.ru” for it to block everything from that domain and 
any subdomains associated with it.

 

Instead, you COULD do a regex in the header-blacklist-entry file which reads 
the headers. I’ve used headers when nothing else has worked. Spamdyke’s 
documentation gives a warning when using this option as it buffers the header 
content in memory while it is being delivered, but I haven’t had any issues as 
I think my softlimit is sufficient to handle it.

 

So you would use something like “From: [regex for .ru tld]” and put that in the 
header-blacklist-entry file. Maybe for return-path also and/or Reply-to.

 

From: Qmail <[email protected]>
Reply-To: <[email protected]>
Date: Friday, June 12, 2026 at 10:14 AM
To: <[email protected]>, Gary Bowling <[email protected]>
Subject: Re: [qmailtoaster] Blocking TLDs

 

Hey Gary.

 

I don't know if You uses fail2ban but

maybe try to search for this "fail2ban country block"

 

Cheers,

 

Finn

 

 

Den 10.06.2026 kl. 14.10 skrev Gary Bowling:

 

I have recently started blocking some top level domains to help control 

spam. What I'm doing right now is putting them in the spamdyke 

blacklist_senders file, adding a line like this.

 

@ru

 

Which would block anything coming from and .ru domain or subdomain.

 

 

Is this the right way to do this? Maybe there is a better or more 

appropriate way to block TLDs.

 

 

Thanks,

 

 

 

---------------------------------------------------------------------

To unsubscribe, e-mail: [email protected]

For additional commands, e-mail: [email protected]

 

 

Reply via email to