If you want to block all ‘.info’ domains on a server running netqmail-1.06
I can confirm the badmailfrom wildcard functionality is not included in netqmail-1.06
Use the badmailfrom-wildcard patch http://tomclegg.net/qmail-bmf-wildcard
even though it makes no mention of netqmail-1.06, it works.
Saved below for posterity;
If (like me) you’re getting lots of unreturnable spam from addresses like “opt-in@mtsopt21.email-info.net”, you want “.email-info.net” in controls/badmailfrom.
Without this patch, you would have to list “@mtsopt21.email-info.net”, “@mtsopt22.email-info.net”, etc. separately.
To install:
cd /src/qmail-1.03
wget http://www.omniweb.com/wordpress/wp-content/uploads/patch-qmail-badmailfrom-wildcard
patch < patch-qmail-badmailfrom-wildcard
make qmail-smtpd
install -m 755 qmail-smtpd /var/qmail/bin/qmail-smtpd
To refuse mail from any sender which ends with ".example.com":
echo ".example.com" >>/var/qmail/control/badmailfrom
You will still accept mail from foo@example.com unless you add “@example.com” as well:
echo “@example.com” >>/var/qmail/control/badmailfrom
The wildcard does not apply to the sender’s local part. “.spam@example.com” will not block mail from example-spam@example.com. It will only block “.spam@example.com” which is probably not what you want.