Patch for qmail

Any information on this page may be outdated or otherwise inaccurate. Links may be broken. It stays here for historical reasons.
This is a patch to lookup MX-records before relaying.
A friend of mine is running Exim on his server and doing seconary MX for us. Exim has a feature to check if it is inscribed as a MX at the domain it should relay to. Take a look to the documentation of Exim (look for @mx_secondary and @mx_primary). I've seen this configuration by my friend and wanted something comparable for qmail. Here it is. :-)
But… rcpthosts exists?
Yes, it does. But if you have to add/delete domains often on some/many secondaries, you maybe want to look for another solution. With this patch, you have only to add the secondaries to the mx-list of your domain (what you anyway have todo :-)) and the secondary will automatically relay to this domain.
The patch
To use this patch, it is required to patch rcpthosts.c, qmail-smtpd.c and Makefile. Because Makefiles often differs between different distributions, I provide two patches for Makefile, one for Debian and one for Gentoo.
Download
Note: Gentoo users can simply install >=qmail-1.03-r15, the patch is included in there.
| Name | Date | Comment |
|---|---|---|
| Makefile-debian-0.1.diff | Diff of Makefile for Debian. | |
| Makefile-gentoo-0.1.diff | Diff of Makefile for Gentoo. | |
| qmail-relaymxlookup-0.5.diff | 2005-11-09 | Fixed a small error in the readme file. |
| qmail-relaymxlookup-0.4.diff | 2005-01-06 | Exactly the same as version 0.3, except it’s rediffed for the new qmail ebuild. |
| qmail-relaymxlookup-0.3.diff | 2004-12-15 | Diff of rcpthosts.c and qmail-smtpd.c, version 0.3. The same as version 0.2, but with README.relaymxlookup. |
| qmail-relaymxlookup-0.2.diff | March 2004 | Diff of rcpthosts.c and qmail-smtpd.c, version 0.2. Please take version 0.3 instead. |
| qmail-relaymxlookup-0.1.diff | December 2003 | Diff of rcpthosts.c, do not use anymore. |
License
These patches are published in the public domain.