Bug 1862739
| Summary: | dnf-automatic command_email example will not work | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Jason Montleon <jmontleo> |
| Component: | dnf | Assignee: | amatej |
| Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 32 | CC: | amatej, dmach, ernelson, jmracek, jrohel, mblaha, mhatina, packaging-team-maint, pkratoch, rhel, rpm-software-management, vmukhame |
| Target Milestone: | --- | Keywords: | Triaged |
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | dnf-4.4.2-1.fc33 dnf-4.4.2-1.fc32 | Doc Type: | If docs needed, set a value |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2020-11-29 01:25:47 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
Arch wiki describes this problem as well here: https://wiki.archlinux.org/index.php/Systemd/Timers#MAILTO The PR was merged, thanks again for the report and fix. FEDORA-2020-210ee4a384 has been submitted as an update to Fedora 33. https://bodhi.fedoraproject.org/updates/FEDORA-2020-210ee4a384 FEDORA-2020-e49210967b has been submitted as an update to Fedora 32. https://bodhi.fedoraproject.org/updates/FEDORA-2020-e49210967b FEDORA-2020-210ee4a384 has been pushed to the Fedora 33 testing repository. In short time you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-210ee4a384` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-210ee4a384 See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates. FEDORA-2020-e49210967b has been pushed to the Fedora 32 testing repository. In short time you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-e49210967b` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-e49210967b See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates. FEDORA-2020-210ee4a384 has been pushed to the Fedora 33 stable repository. If problem still persists, please make note of it in this bug report. FEDORA-2020-e49210967b has been pushed to the Fedora 32 stable repository. If problem still persists, please make note of it in this bug report. |
Description of problem: /etc/dnf/automatic.conf has a command_email command_format example as follows: # command_format = "mail -s {subject} -r {email_from} {email_to}" 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. Version-Release number of selected component (if applicable): dnf-automatic-4.2.23-1.fc32.noarch How reproducible: Always. I helped someone debug this and for both of us it failed to send an email every single time. I added -v to mailx and suddenly it worked. What I learned is that -v prevents mailx from forking. To do this without verbose output you can use the `-Ssendwait` option. Steps to Reproduce: 1. Install dnf-automatic 2. Configure it to use the command_email emitter 3. Enable dnf-automatic-install.timer Actual results: Email never comes. If you look at the dnf-automatic-install.service logs you'll see '... message not sent' Expected results: Email is delivered as expected. Additional info: The default command and example in automatic.conf should be command_format = "mail -Ssendwait -s {subject} -r {email_from} {email_to}"