Received a call from a client this morning about not receiving any email for the last few days. Viewing the queue on their server showed 50,000 messages in the local queue. Tailing the logs, showed dozens of messages being received every minute to non-existent addresses to valid domains on the server. Qmail was accepting the messages only to eventually bounce them after failing to deliver locally to the fake local address. If only Qmail could check for valid email addresses in the initial SMTP connection and reject mail for addresses that do not exist.
ValidRcptTo.cdb is a patch for Qmail that does just this. There are several implementations of this functionality, but John Simpson’s version handles aliases, vpopmail and system accounts, Qmail’s .qmail-default aliases and utilizes a cdb database for speed.
Patching my existing QMR install proved to be troublesome. qmail-smtpd.c and the Makefile blew rejects. I manually worked these rejected code chunks into the QMR Qmail source and produced a new patch file to use on the other installs I manage.
For full details on using ValidRcptTo see John’s page.
Original ValidRcptTo.cdb Patch
QMR 2.2.1 ValidRcptTo.db Patch
John also maintains a bundle of other worthwhile Qmail patches at his site.
Popularity: 1%
{ 0 comments }