Mfcheck

From Ye Ole Stash
Jump to: navigation, search

The qmail-1.03-mfcheck.3.patch patch causes qmail-smtpd to reject messages where the domain portion of the envelope sender is not a valid domain (i.e. it has an MX record.) When combined with a mechanism to make certain domain names appear to not exist, it can make for an effective way to reduce the amount of spam received by rejecting messages which claim to be from certain domain names.

To use this check, create a /var/qmail/control/mfcheck file which contains "1" (or any non-zero number) to enable the check, or "0" to disable it (the default is disabled.) You can also create an environment variable MFCHECK which contains either "1" or "0", and this number will override the control file.

With the "6c2" or later version of the combined patch, the environment variable will be re-read if the client sends a successful AUTH command. This means that you could set an AUTH_SET_MFCHECK variable whose value would override the control file and/or the original environment variable whenever a client authenticates.

With the "6c6" or later version of the combined patch, using a value of 2 or higher will cause all non-successful checks to be logged, and using a value of 3 or higher will cause successful checks to be logged as well.

Personal tools