Bug 1291708 - mail delivery of status of cron jobs fails
Summary: mail delivery of status of cron jobs fails
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: cronie
Version: 22
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Tomas Mraz
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-12-15 13:33 UTC by Przemek Klosowski
Modified: 2015-12-26 22:55 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2015-12-26 22:55:09 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Przemek Klosowski 2015-12-15 13:33:41 UTC
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 13:35:01 UTC
This may be a bad SELinux interaction and is probably related to bug 1046468

Comment 2 Tomas Mraz 2015-12-16 08:25:54 UTC
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 16:57:31 UTC
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 17:18:48 UTC
What does
rpm -qf /usr/sbin/sendmail
and/or
rpm -qf /usr/bin/sendmail 
print?

Comment 5 Przemek Klosowski 2015-12-17 17:26:11 UTC
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 22:54:47 UTC
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.