On 7/29/20 9:43 PM, Gunnar Niels wrote:
Hello, I'm trying to configure dnf-automatic to automatically upgrade my system on a daily basis and send me a summary via mailx using my mailgun account. I have mailx configured and functioning as expected; I can use the 'mail' cmd to send mail, and have other services using it to send mail. The following gist[1] has my /etc/dnf/automatic.conf; all I've really changed about it is to specify to use 'command_email' and uncommented the default 'command_format' and 'stdin_format', along with setting the from/to emails. I've dropped some debug logs into the python it runs, and I can see it gets to the emitter fine. I was even able to send an example email with the emmitter that was constructed by manually setting the subject and body and running `emitters[0].commit()`[2]! The error I'm seeing in the dnf-automatic.service logs is: Jul 29 06:45:16 <host>dnf-automatic[6226]: . . . message not sent. Is this is a bug or do I have something misconfigured? Would be much appreciated if someone could point me in the right direction. [1] https://gist.githubusercontent.com/gunnarniels/7e29720adf654fee698c33d9315647b0/raw/64b515f733428f8895739e407c0644e1ee95b313/gistfile1.txt [2] https://github.com/rpm-software-management/dnf/blob/4.2.23/dnf/automatic/main.py#L277 -GN
Hi folks. Wanted to follow up because we found it is a bug in the example command, see: https://bugzilla.redhat.com/show_bug.cgi?id=1862739 "This will not ever work with systemd. All you'll see is ". . . message not sent" in the dnf-automatic service status and no email will be delivered. The reason for this is that mailx will fork, dnf-automatic will exit, and systemd will kill the mail process." The solution is to add "-Ssendwait", which prevents mailx from forking. I've confirmed the fix and applied to my systems. -GN _______________________________________________ users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/users@xxxxxxxxxxxxxxxxxxxxxxx