Bug 255406 - mail/emailrelay: only listening on IPv6 ports and won't accept IPv4 address parameters
Summary: mail/emailrelay: only listening on IPv6 ports and won't accept IPv4 address p...
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Only Me
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-04-26 03:39 UTC by Andrew MacIntyre
Modified: 2021-04-26 03:39 UTC (History)
1 user (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 Andrew MacIntyre 2021-04-26 03:39:18 UTC
System: 12.2 RELEASE amd64 with 2 ethernet interfaces both with IPv4 addresses but IPv6 disabled; loopback interface still has IPv4 and IPv6.  Port installed as package (emailrelay-1.9_6).

Problem: any attempt to configure an interface with only an IPv4 address for the --listen option results in:

(for IPv4 address)
emailrelay: error: invalid ip address string: invalid format: 192.168.10.2
emailrelay: exception: invalid ip address string: invalid format: 192.168.10.2

(for interface name)
emailrelay: error: invalid ip address string: invalid format: em0
emailrelay: exception: invalid ip address string: invalid format: em0

using "emailrelay --interface <address> --port 10025 --as-proxy localhost 25"

If the interface isn't specified so emailrelay should listen on all interfaces for port 10025 (i.e. "emailrelay --port 10025 --as-proxy localhost:25"), sockstat reports:
  daemon emailrelay <pid> 3 tcp6 *:10025 *:*

which suggests that emailrelay is only listening on IPv6 addresses as proto would be tcp46 if listening on both -4 and -6 addresses.

PR 204126 seems to have been related but a long time ago.  I note from the port commit log that the IPv6 configuration was changed relatively recently.  The emailrelay documentation suggests that mixed IPv4 & IPv6 operation should be supported.