On 11/12/2022 10:15, Axel Braun wrote:
Hi,
I'm trying to get the recently announced systemd-status-mail to work I'm using the following configuration:
---- # cat /etc/default/systemd-status-mail
# ADDRESS is the mail account to which the status mails should be send ADDRESS=myaddress@gmx.de
# Set HOSTNAME if the system does not set it or if you need to override # the system default #HOSTNAME=myhostname
# Valid values for MAILER: "sendmail" or "mailx" MAILER="mailx -Sverbose -Ssmtp-use-starttls -Ssmtp-auth=login -Ssmtp-auth-user="myaddress@gmx.de" -Ssmtp-auth-password="TopSecret" "
# RELAYHOST specifies the mail relay used by mailx if specified RELAYHOST=smtp.gmx.net ---- So far so good, when it comes to send the mail (journalctl)
Dez 11 00:04:45 systemd[1]: transactional-update.service: Triggering OnFailure= dependencies. Dez 11 00:04:45 systemd[1]: transactional-update.service: Consumed 22.964s CPU time. Dez 11 00:04:45 systemd[1]: Starting Send status mail for transactional-update.service... Dez 11 00:04:45 systemd[1]: systemd-status-mail@transactional-update.service.service: Deactivated successfully. Dez 11 00:04:45 systemd[1]: Finished Send status mail for transactional-update.service.
That looks good, but no mail did arrive. Nothing in the journal, nor anything in /var/log that looks useful. Any idea how to nail that problem?
Thanks Axel
Try setting the binary option sendwait to the mailx command: MAILER="mailx -Ssendwait -Sverbose -Ssmtp-use-starttls -Ssmtp-auth=login -Ssmtp-auth-user="myaddress@gmx.de" -Ssmtp-auth-password="TopSecret" " ^^^^^^^^^^