2

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:

[email protected]        niols
[email protected]    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.

1
  • Please post OpenSMTPd's configuration file. Oct 6, 2015 at 0:38

1 Answer 1

2

Try not to listen to eth0, it might be a better idea to listen on 0.0.0.0.

listen on 0.0.0.0 port 587 tls-require pki mail.XXX.XX auth <creds>

and so on.. Change the other line with eth0 accordingly.

That has the advantage of being able to use 127.0.0.1 to send mails, and should also work, even if the network interface hasn't got any IPv4 or IPv6 adresses yet.

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .