Public bug reported: lsb_release -rd Description: Ubuntu 18.04.1 LTS Release: 18.04
apt-cache policy smartmontools smartmontools: Installed: 6.5+svn4324-1 Candidate: 6.5+svn4324-1 Version table: *** 6.5+svn4324-1 500 500 http://us.archive.ubuntu.com/ubuntu bionic/main amd64 Packages 100 /var/lib/dpkg/status Expected behavior: smartd sends a test email on boot. What happens: No mail is recieved. sSMTP logs "Unable to locate Mail server" and "cannot open mailserver:25". I'm using the same smartd.conf and my script smartd calls that I used on 14.04, which worked flawlessly. Work around: I had my script sleep 5 seconds before sending the mail. This worked fine leading me to believe smartd is calling my script before networking is up. But this is not an elegant solution. So I copied /lib/systemd/system/smartd.service to /etc/systemd/system/smartd.service and add the line "After=network-online.target"This worked fine. So the full smartd.sevice unit is: [Unit] Description=Self Monitoring and Reporting Technology (SMART) Daemon Documentation=man:smartd(8) man:smartd.conf(5) After=network-online.target [Service] EnvironmentFile=-/etc/default/smartmontools ExecStart=/usr/sbin/smartd -n $smartd_opts ExecReload=/bin/kill -HUP $MAINPID StandardOutput=syslog [Install] WantedBy=multi-user.target I haven't got any other machines to test this on. So I hope the report will help some one else ** Affects: smartmontools (Ubuntu) Importance: Undecided Status: New -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1784191 Title: smartd sends mail before network is up on boot To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/smartmontools/+bug/1784191/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs