Created attachment 182851 [details]
patch to fix local mail delivery problem in cyrus-imapd24-2.4.19
When attempting local mail delivery, lmptd in cyrus-imapd24-2.4.19 logs this error to /var/log/messages:
lmtpunix: getaddrinfo(<binary garbage>) failed: servname not supported for ai_socktype
and returns this error to the MTA over the lmtp socket:
451 4.4.3 Remote server unavailable
The problem is that when doing delivery to a local mailbox, mlookup() does not
set *server to NULL, which causes deliver() to think it is doing a proxy delivery and attempt to use the uninitialized server pointer as the server name.
The attached patch restores a line of code deleted from mlookup() between 2.4.18 and 2.4.19 that sets *server to NULL at the top of the function.
A fix for this problem is being discussed upstream, but the user who first reported this bug had success with this patch.
A commit references this bug:
Date: Wed May 24 15:09:56 UTC 2017
New revision: 441604
Fix delivering the messages into the local mailbox by lmtpd.
Obtained from: http://asg.andrew.cmu.edu/archive/message.php?mailbox=archive.info-cyrus&msg=57396
Thanks for your report.
I've tried the patch you attached in this PR without success. It seems the patch is insufficient to me.
This is on going issue at info-cyrus list, and the better patch was posted. Since it seems fixes the issue, I committed it.