On 15 October 2015 at 15:38, Allyn Bottorff <[email protected]> wrote:

> Is this an environment issue rather than a boot order issue?  Does it come
>> up if you launch it from cron or batch rather than directly at the command
>> line?
>>
>>         ED.
>>
>
> This would make sense based on the fact that the network is up. When I
> start smptd myself from the command line, I'm still using systemd to do
> it.
> #systemctl start smtpd.service
>
> I would think that the environment would be the same when systemd starts
> it up at boot... but at this point I'm willing to pursue any avenue.


​I did get a strace for smtpd failing to bind. Attached below together with
logged "ip -a" output. I redacted some details but I did replace everything
with a unique placeholder so you can match the "ip -a" output with the
strace.

Some more details regarding the IP addresses IPv6-1 to 4: IPv6-4 is a link
local address (thus explaining the sin6_scope_id in the bind I think), and
IPv6-1 to 3 are all IPs in the same 64 bit subnet. The one failing (IPv6-1)
is the default one generated from the interface mac address, the other two
I added to the configuration myself.

It doesn't appear to try to bind to an IPv4 address, but I guess that would
happen after the IPv6 addresses were all bound.

I don't see anything particularly strange. The bind to local addresses are
for dkim-proxy.  I guess it's somewhat interesting that IPv6-2 and IPv6-3
are configured with a 48 bit subnet while IPv6-1 has a 64 bit subnet. Not
sure why that difference exists, but I doubt that causes the failure. Maybe
I overlooked something?

ip -a and strace output:

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group
default
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: tubes0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state
UP group default qlen 1000
    link/ether {MAC-1} brd ff:ff:ff:ff:ff:ff
    inet {IPv4-1}/24 brd {IPv4-2} scope global tubes0
       valid_lft forever preferred_lft forever
    inet6 {IPv6-1}/64 scope global mngtmpaddr dynamic
       valid_lft 2591990sec preferred_lft 604790sec
    inet6 {IPv6-2}/48 scope global
       valid_lft forever preferred_lft forever
    inet6 {IPv6-3}/48 scope global
       valid_lft forever preferred_lft forever
    inet6 {IPv6-4}/64 scope link
       valid_lft forever preferred_lft forever


set_robust_list({some pointer}, 24)     = 0
close(3)                                = 0
socket(PF_INET6, SOCK_STREAM, IPPROTO_IP) = 3
setsockopt(3, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0
bind(3, {sa_family=AF_INET6, sin6_port=htons(10028), inet_pton(AF_INET6,
"::1", &sin6_addr), sin6_flowinfo=0, sin6_scope_id=0}, 28) = 0
socket(PF_INET, SOCK_STREAM, IPPROTO_IP) = 47
setsockopt(47, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0
bind(47, {sa_family=AF_INET, sin_port=htons(10028),
sin_addr=inet_addr("127.0.0.1")}, 16) = 0
socket(PF_INET6, SOCK_STREAM, IPPROTO_IP) = 48
setsockopt(48, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0
bind(48, {sa_family=AF_INET6, sin6_port=htons(10026), inet_pton(AF_INET6,
"::1", &sin6_addr), sin6_flowinfo=0, sin6_scope_id=0}, 28) = 0
socket(PF_INET, SOCK_STREAM, IPPROTO_IP) = 49
setsockopt(49, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0
bind(49, {sa_family=AF_INET, sin_port=htons(10026),
sin_addr=inet_addr("127.0.0.1")}, 16) = 0
socket(PF_INET6, SOCK_STREAM, IPPROTO_IP) = 50
setsockopt(50, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0
bind(50, {sa_family=AF_INET6, sin6_port=htons(587), inet_pton(AF_INET6,
"{IPv6-4}", &sin6_addr), sin6_flowinfo=0,
sin6_scope_id=if_nametoindex("tubes0")}, 28) = 0
socket(PF_INET6, SOCK_STREAM, IPPROTO_IP) = 51
setsockopt(51, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0
bind(51, {sa_family=AF_INET6, sin6_port=htons(587), inet_pton(AF_INET6,
"{IPv6-3}", &sin6_addr), sin6_flowinfo=0, sin6_scope_id=0}, 28) = 0
socket(PF_INET6, SOCK_STREAM, IPPROTO_IP) = 52
setsockopt(52, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0
bind(52, {sa_family=AF_INET6, sin6_port=htons(587), inet_pton(AF_INET6,
"{IPv6-2}", &sin6_addr), sin6_flowinfo=0, sin6_scope_id=0}, 28) = 0
socket(PF_INET6, SOCK_STREAM, IPPROTO_IP) = 53
setsockopt(53, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0
bind(53, {sa_family=AF_INET6, sin6_port=htons(587), inet_pton(AF_INET6,
"{IPv6-1}", &sin6_addr), sin6_flowinfo=0, sin6_scope_id=0}, 28) = -1
EADDRNOTAVAIL (Cannot assign requested address)
sendto(4, "<18>Oct 15 22:11:05 smtpd[{pid}]: "..., 83, MSG_NOSIGNAL, NULL,
0) = 83
exit_group(1)                           = ?
+++ exited with 1 +++

Reply via email to