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[23085]: 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. <http://asg.andrew.cmu.edu/archive/message.php?mailbox=archive.info-cyrus&msg=57376>
A commit references this bug: Author: ume Date: Wed May 24 15:09:56 UTC 2017 New revision: 441604 URL: https://svnweb.freebsd.org/changeset/ports/441604 Log: Fix delivering the messages into the local mailbox by lmtpd. PR: 219494 Obtained from: http://asg.andrew.cmu.edu/archive/message.php?mailbox=archive.info-cyrus&msg=57396 Changes: head/mail/cyrus-imapd24/files/patch-imap__lmtpd.c
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.