tomclegg.net


Diary
Examples
Hire Tom
Mostly Mozart
Patches
School
Scrapbook
Software
    allaboutme
    byteswap
    checksocks
    djbdns-ipv6
    dsprec
    fresnel
    fresnel
    logger
    mail-transport-agent
    maildirpop3d
    mp3cat
  >qmail-bmf-wildcard<
    rawrms
    stationbreak
Telephones




colocation
comments
davidireland
edsgranola
faq
funsites
goodlooking
goodmovies
google-earth-saucy-amd64
houserules
liberating
resume
resume2
scratch
shopping
snacks
todo
university
warisbogus

qmail-badmailfrom-wildcard patch
Posted April 27, 2003

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
fetch http://tomclegg.net/software/patch-qmail
-badmailfrom-wildcard
patch < qmail-badmailfrom-wildcard.patch
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.