Bug 219494 - mail/cyrus-imapd24 2.4.19 local mail delivery failure
Summary: mail/cyrus-imapd24 2.4.19 local mail delivery failure
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Hajimu UMEMOTO
Keywords: patch
Depends on:
Reported: 2017-05-24 06:52 UTC by Don Lewis
Modified: 2017-05-24 15:18 UTC (History)
0 users

See Also:

patch to fix local mail delivery problem in cyrus-imapd24-2.4.19 (1.09 KB, patch)
2017-05-24 06:52 UTC, Don Lewis
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Don Lewis freebsd_committer 2017-05-24 06:52:40 UTC
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.
Comment 1 commit-hook freebsd_committer 2017-05-24 15:10:38 UTC
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

  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

Comment 2 Hajimu UMEMOTO freebsd_committer 2017-05-24 15:18:53 UTC
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.