Bug 1291708 - mail delivery of status of cron jobs fails
mail delivery of status of cron jobs fails
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: cronie (Show other bugs)
22
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Tomas Mraz
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-12-15 08:33 EST by Przemek Klosowski
Modified: 2015-12-26 17:55 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-12-26 17:55:09 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Przemek Klosowski 2015-12-15 08:33:41 EST
Description of problem:
mail delivery of status of cron jobs fails 

Version-Release number of selected component (if applicable):
cronie-1.4.12-5.fc22.x86_64


How reproducible: every time


Steps to Reproduce:
1. run cron job that produces stdout output which is supposed to be emailed to the cron user

Actual results:
no email and the following messages in the system log:

Nov 24 22:42:01 new-host-6.home crond[1147]: mkdir: cannot create directory ‘/.esmtp_queue’: Permission denied
Nov 24 22:42:01 new-host-6.home crond[1147]: unable to create queue dir /.esmtp_queue
Nov 24 22:42:01 new-host-6.home crond[1147]: /usr/sbin/sendmail: line 83: return: can only `return' from a function or sourced script



Expected results: successful delivery of status (either by email or dbus notifications?) and no error messages


Additional info:
Comment 1 Przemek Klosowski 2015-12-15 08:35:01 EST
This may be a bad SELinux interaction and is probably related to bug 1046468
Comment 2 Tomas Mraz 2015-12-16 03:25:54 EST
Which MTA do you have installed? Either install properly functioning MTA or reassign the bug to the MTA of your preference if it does not work with crond.
I do not think crond can do much with this.
Comment 3 Przemek Klosowski 2015-12-17 11:57:31 EST
It is a default Fedora installation with a working postfix setup. When I do 

mail xyz
Subject: test
test
.
EOT

I get the message in my incoming mail stream. 

I'm afraid it's not just a MTA issue: see the crond errors in Comment 1.
Comment 4 Tomas Mraz 2015-12-17 12:18:48 EST
What does
rpm -qf /usr/sbin/sendmail
and/or
rpm -qf /usr/bin/sendmail 
print?
Comment 5 Przemek Klosowski 2015-12-17 12:26:11 EST
rpm -qf /usr/sbin/sendmail
postfix-3.0.3-1.fc22.x86_64

rpm -qf /usr/bin/sendmail
error: file /usr/bin/sendmail: No such file or directory
Comment 6 Przemek Klosowski 2015-12-26 17:54:47 EST
re Comment 3 and 5, a correction: I have two very similar systems, and this problem happened on the other one, where the local mail uses esmtp. Sorry for the confusion.

I have since upgraded to F23 and the problem does not present any more; cron does not try to use /.esmtp_queue any more, using instead files in /home/....

 rpm -qf /usr/sbin/sendmail   esmtp-1.0-14.fc23.x86_64
 rpm -qf /usr/sbin/crond      cronie-1.5.0-3.fc23.x86_64

Note You need to log in before you can comment on or make changes to this bug.