Hello. I've noticed for some time that, on Voidlinux and Artixlinux,
when my /etc/hosts file includes both 127.0.0.1 localhost and ::1
localhost, when opensmtpd (currently 7.7.0p0-3 on Artixlinux) tries to
start (at bootup), it hangs with the following in the log file:
Oct 10 07:16:32 [smtpd] info: OpenSMTPD 7.7.0-portable starting
Oct 10 07:16:33 [smtpd] dispatcher: listen: Address already in use
Oct 10 07:16:33 [smtpd] smtpd: process dispatcher socket closed
Oct 10 07:16:33 [smtpd] info: OpenSMTPD 7.7.0-portable starting
Oct 10 07:16:33 [smtpd] dispatcher: listen: Address already in use
Oct 10 07:16:33 [smtpd] smtpd: process ca socket closed
Oct 10 07:16:33 [smtpd] info: OpenSMTPD 7.7.0-portable starting
Oct 10 07:16:33 [smtpd] dispatcher: listen: Address already in use
Oct 10 07:16:33 [smtpd] smtpd: process dispatcher socket closed
Oct 10 07:16:34 [smtpd] info: OpenSMTPD 7.7.0-portable starting
Oct 10 07:16:34 [smtpd] dispatcher: listen: Address already in use
Oct 10 07:16:34 [smtpd] smtpd: process queue socket closed
Oct 10 07:16:34 [smtpd] info: OpenSMTPD 7.7.0-portable starting
Oct 10 07:16:34 [smtpd] dispatcher: listen: Address already in use
Oct 10 07:16:34 [smtpd] smtpd: process dispatcher socket closed
Oct 10 07:16:35 [smtpd] info: OpenSMTPD 7.7.0-portable starting
Oct 10 07:16:35 [smtpd] dispatcher: listen: Address already in use
Oct 10 07:16:35 [smtpd] smtpd: process dispatcher socket closed
Oct 10 07:16:35 [smtpd] info: OpenSMTPD 7.7.0-portable starting
Oct 10 07:16:35 [smtpd] dispatcher: listen: Address already in use
Oct 10 07:16:35 [smtpd] smtpd: process dispatcher socket closed
Oct 10 07:16:36 [smtpd] info: OpenSMTPD 7.7.0-portable starting
Oct 10 07:16:36 [smtpd] dispatcher: listen: Address already in use
Oct 10 07:16:36 [smtpd] smtpd: process dispatcher socket closed
Oct 10 07:16:37 [smtpd] info: OpenSMTPD 7.7.0-portable starting
Oct 10 07:16:37 [smtpd] dispatcher: listen: Address already in use
Oct 10 07:16:37 [smtpd] smtpd: process dispatcher socket closed
Oct 10 07:16:39 [smtpd] info: OpenSMTPD 7.7.0-portable starting
Oct 10 07:16:39 [smtpd] dispatcher: listen: Address already in use
Oct 10 07:16:39 [smtpd] smtpd: process dispatcher socket closed
Oct 10 07:16:40 [smtpd] info: OpenSMTPD 7.7.0-portable starting
Oct 10 07:16:40 [smtpd] dispatcher: listen: Address already in use
Oct 10 07:16:40 [smtpd] smtpd: process dispatcher socket closed
If I start fetchmail before this ends, fetchmail will error out trying
to connect to localhost and emails will fail to be fetched, presumably
because opensmtpd was not yet ready and functioning.
When I pound-out the ::1 line in /etc/hosts, then opensmtpd starts
without any of these messages in the log file. It seems that two (or
more?) localhost lines in /etc/hosts causes opensmtpd to get stuck when
starting.
Is there something I'm missing, perhaps a setting, that would allow
opensmtpd to start cleanly with both localhost lines in the hosts file?
Please advise.
ax