Andreas,
Thanks for your response. I agree with your assessment, this is a corner case. 
I use ssmtp instead of a MTA because I just want to send an email from a 
script. As in the case of smartd,I have smartd call my script which sends the 
test message and also the output of smartctl -H which reports the health of the 
hard drive. So upon start up I get an email reporting the health of my drives. 
So this is defiantly a local preference.

For completeness I have modified my work around to be more inline with
systemd's philosophy. Instead of coping
/lib/systemd/system/smartd.service to /etc/systemd/system, I created the
directory /etc/systemd/system/smartd.service.d. In that directory I
created the file extend.conf with the folowing contents:

[Unit]
# Added to make sure networking is up before sending mail. 
# This covers a local corner case during boot.
After=network-online.target

I wanted to add my change in case someone else had this problem.

Thanks again for your help with this.

-- 
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
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to