I just installed an OpenSMTPD server on my arch linux machine. It is working fine when I start it myself, but is failing to start when I reboot the machine.
Here is the journalctl -f _SYSTEMD_UNIT=smtpd.service
output:
-- Reboot --
Oct 05 15:14:29 campbell-kelly smtpd[260]: info: startup
Oct 05 15:14:29 campbell-kelly smtpd[265]: fatal: smtpd: bind: Cannot assign requested address
Oct 05 15:14:29 campbell-kelly smtpd[260]: warn: lost child: pony express exited abnormally
Oct 05 15:14:29 campbell-kelly smtpd[262]: info: control process exiting
Oct 05 15:14:29 campbell-kelly smtpd[263]: info: lookup agent exiting
Oct 05 15:14:29 campbell-kelly smtpd[266]: warn: ca -> control: pipe closed
Oct 05 15:14:29 campbell-kelly smtpd[264]: warn: scheduler -> control: pipe closed
I don't know where it can come from. According to my researchs on the internet, the problem could come from my network interfaces.
Here is the ip link
output right after a reboot:
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP mode DEFAULT group default qlen 1000
link/ether fa:16:3e:11:8a:b3 brd ff:ff:ff:ff:ff:ff
Here is my /etc/hosts
:
127.0.0.1 localhost
51.XXX.XXX.159 campbell-kelly.XXX.XX campbell-kelly
Thanks for trying to help me!
EDIT:
My /etc/smtpd/smtpd.conf
file:
pki mail.XXX.XX certificate "/etc/smtpd/tls/smtpd.crt"
pki mail.XXX.XX key "/etc/smtpd/tls/smtpd.key"
table creds "/etc/smtpd/creds"
table vdoms "/etc/smtpd/vdoms"
table vusers "/etc/smtpd/vusers"
listen on eth0 tls pki mail.XXX.XX
listen on eth0 port 587 tls-require pki mail.XXX.XX auth <creds>
accept from any for domain <vdoms> virtual <vusers> deliver to mbox
accept for any relay
My /etc/smtpd/creds
. The password has been obtained with echo test | smtpctl encrypt
:
niols $6$FgkfVn10xLZbDU4O$17y6Wc5YlYMGAzekSxsjZALWnCeLAH3oS4vk8VeUpe5c7l.uGxE3q.27FwXhXA/.EUz/KRVqRedaNX8.AsJw20
My /etc/smtpd/vdoms
:
XXX.XX
XXX.YY
ZZZ.XX
My /etc/smtpd/vusers
:
niols@XXX.XX niols
niols@ZZZ.XX niols
My problem is really happening only at reboot. Even a smtpd -v
does not seem to show any problem when I start it by hand.