Why this patch

This is a copy of Jay Soffian’s RCPTCHECK patch, adjusted to apply atop netqmail 1.06 with the TLS + SMTP AUTH combo patch.

If you want to flexibly SMTP-reject envelope recipients or senders, and Jay’s original patch doesn’t apply cleanly to your source tree, this patch may be useful to you.

Without this patch

To reject envelope senders, add them to control/badmailfrom. To reject envelope recipients, patch qmail-smtpd, or turn on qmail-qfilter and write a filter. (It won’t run until after DATA.)

With this patch

In addition to control/badmailfrom, to reject according to arbitrary criteria, write a RCPTCHECK-compatible program and set RCPTCHECK=/path/to/your/program in qmail-smtpd’s environment. It’ll run on RCPT TO to determine whether to allow DATA.

Several useful RCPTCHECK-compatible programs are provided in the rejectutils patch.

Get this patch

Download and apply netqmail-1.06-tls-smtpauth-20070417-rcptcheck-20170716.patch.

(Generated with git diff netqmail-1.06-tls-smtpauth-20070417 netqmail-1.06-tls-smtpauth-20070417-rcptcheck-20170716.)

Improve this patch

If you see a simpler way to do it, I’d love to know.