On 15 October 2015 at 21:40, Maarten de Vries <[email protected]> wrote:

>
>
> 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.
>
>
>
​Hmm, I did some more googling and found this:
https://www.agwa.name/blog/post/beware_the_ipv6_dad_race_condition

In a nutshell it warns that IPv6 duplicate address detection (DAD) might be
too slow for boot services to be able to successfully bind to an IPv6
address because the address is still flagged as tentative until DAD
finishes.

It looked promising although the "ip -a" output I posted doesn't show any
of the IPv6 addresses as being tentative. Looking at the logs though,
sometimes it did show some or all IPv6 addresses as tentative. So I turned
on optimistic_dad (rather than disabling DAD altogether as the article
suggests) and now smtpd now exits with status 1 without logging any error
messages. So that's something, although not much. Log output attached below.

To turn on optimistic DAD I created this file (sysctl.d may be a systemd
thing, should be fine on Arch anyway):

> $ cat /etc/sysctl.d/optimistic_dad.conf
> net.ipv6.conf.default.optimistic_dad=1
> net.ipv6.conf.all.optimistic_dad=1
>

​Alternatively, to disable DAD entirely you can change "optimistic_dad=1"
into "accept_dad=0" .

Allyn, could you see if either enabling optimistic DAD or disabling DAD
entirely fixes or changes the issue for you?

-- Maarten


$ journalctl -b -u smtpd
> Oct 16 00:17:45 redacted_hostname systemd[1]: Starting OpenSMTPD...
>
Oct 16 00:17:45 redacted_hostname smtpd[324]: debug: init ssl-tree
> Oct 16 00:17:45 redacted_hostname smtpd[324]: info: loading pki
> information for redacted.example.com
> Oct 16 00:17:45 redacted_hostname systemd[1]: Started OpenSMTPD.
> Oct 16 00:17:45 redacted_hostname smtpd[350]: debug: bounce warning after
> 4h
> Oct 16 00:17:45 redacted_hostname smtpd[350]: debug: using "fs" queue
> backend
> Oct 16 00:17:45 redacted_hostname smtpd[350]: debug: using "ramqueue"
> scheduler backend
> Oct 16 00:17:45 redacted_hostname smtpd[350]: debug: using "ram" stat
> backend
> Oct 16 00:17:45 redacted_hostname smtpd[350]: info: startup [debug mode]
> Oct 16 00:17:45 redacted_hostname smtpd[351]: queue: queue compression
> enabled
> Oct 16 00:17:45 redacted_hostname smtpd[357]: debug: init ssl-tree
> Oct 16 00:17:45 redacted_hostname smtpd[350]: libevent 2.0.22-stable
> (epoll)
> Oct 16 00:17:45 redacted_hostname systemd[1]: smtpd.service: Main process
> exited, code=exited, status=1/FAILURE
> Oct 16 00:17:45 redacted_hostname systemd[1]: smtpd.service: Unit entered
> failed state.
> Oct 16 00:17:45 redacted_hostname systemd[1]: smtpd.service: Failed with
> result 'exit-code'.
>

Reply via email to