Bug 204126 - mail/emailrelay: can't bind when only IPv4 addresses configured
Summary: mail/emailrelay: can't bind when only IPv4 addresses configured
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: Martin Wilke
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2015-10-29 15:07 UTC by Dmitry Afanasiev
Modified: 2016-01-04 07:11 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (robertn)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dmitry Afanasiev 2015-10-29 15:07:04 UTC
On system without any IPv6 addresses emailrelay fails to start with messages:
# service emailrelay start
emailrelay: error: cannot bind the listening port: :::25
emailrelay: exception: cannot bind the listening port: :::25
/usr/local/etc/rc.d/emailrelay: WARNING: failed to start emailrelay

To make it working on my IPv4-only system I removed --enable-ipv6 from configure's args:
# svn diff /usr/ports/mail/emailrelay
Index: /usr/ports/mail/emailrelay/Makefile
===================================================================
--- /usr/ports/mail/emailrelay/Makefile (revision 399880)
+++ /usr/ports/mail/emailrelay/Makefile (working copy)
@@ -16,7 +16,7 @@
 USES=          autoreconf pkgconfig
 GNU_CONFIGURE= yes
 CONFIGURE_ENV= e_spooldir=${PREFIX}/var/spool/emailrelay
-CONFIGURE_ARGS=        --without-pam --enable-ipv6
+CONFIGURE_ARGS=        --without-pam
 USE_RC_SUBR=   ${PORTNAME}
 
 OPTIONS_DEFINE=                DOCS DOXYGEN GUI OPENSSL

But I think proper way to solve this issue is enabling IPv6 via "make config"
Comment 1 VK 2015-12-18 22:48:29 UTC
Dmitry, thanks for the patch. In the future please try to provide patches as attachments so they can benefit from various flags and diff view.
Comment 2 commit-hook freebsd_committer freebsd_triage 2016-01-04 07:10:46 UTC
A commit references this bug:

Author: miwi
Date: Mon Jan  4 07:10:15 UTC 2016
New revision: 405217
URL: https://svnweb.freebsd.org/changeset/ports/405217

Log:
  - Make IPV6 optional

  On system without any IPv6 addresses emailrelay fails to start with messages:
  # service emailrelay start
  emailrelay: error: cannot bind the listening port: :::25
  emailrelay: exception: cannot bind the listening port: :::25
  /usr/local/etc/rc.d/emailrelay: WARNING: failed to start emailrelay

  PR:		204126
  Submitted by:	Dmitry Afanasiev
  Approved by:	maintainer timeout

Changes:
  head/mail/emailrelay/Makefile
Comment 3 Martin Wilke freebsd_committer freebsd_triage 2016-01-04 07:11:10 UTC
Hi,

Thank you for your report, I made IPV6 optional which should solve the issue.