Why this patch

This is a copy of Jay Soffian’s RCPTCHECK patch, rebased onto netqmail 1.06 with Frederik Vermeulen’s TLS 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-20160918-rcptcheck-20181022.patch.

(Generated with git diff netqmail-1.06-tls-20160918 netqmail-1.06-tls-20160918-rcptcheck-20181022.)

Improve this patch

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