Qmail hell
I’ve been fighting a bit lately with Qmail, and some bits are recurring that might not seem obvious. The most common one to me was having bounced emails after moving email from an older server to a newer one.
The test accounts worked fine, however after moving nothing worked. After recompiling the whole system in vain, it turned out it had to do with an old .qmail-default
lingering around.
This short article will try to show the effects what it can have and how you could probably solve it.
You could ‘suddenly’ get one of these, I rsync’d an email account over and suddenly I got a beautiful bounce message:
Delivery to the following recipient failed permanently:
twisted@itadvice.de
Technical details of permanent failure:
Google tried to deliver your message, but it was rejected by the server for the recipient domain itadvice.de by mail.itadvice.de. [5.10.192.115].
The error that the other server returned was:
553 sorry, this recipient is not in my validrcptto list (#5.7.1)
There are many reasons you can get this error, it could even be expected behaviour. Let’s assume you DID NOT EXPECT THIS.
.qmail-default
By the love of everything you hold dear, check the following file: domainname/.qmail-default
It could say:
|bouncesaying This\ address\ no\ longer\ accepts\ mail.
Or something similar, it should however say (if you followed this guide: http://qmailrocks.thibs.com/)
| /home/vpopmail/bin/vdelivermail '' bounce-no-mailbox
Restart Qmail qmailctl restart
and retry.
Regenerate validrcptto.cdb
If the previous did not help you can try:
(taken from: http://qmailrocks.thibs.com/validrcptto.php)
cd /etc/qmail
mkvalidrcptto > validrcptto.txt
cdbmake-12 validrcptto.cdb validrcptto.tmp < validrcptto.txt
And restart Qmail qmailctl restart
and try.