Bug 708367

Summary: Mail command fails
Product: [Fedora] Fedora Reporter: Jeffrey Laramie <imnotpc>
Component: logrotateAssignee: Jan Kaluža <jkaluza>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 15CC: jkaluza, tsmetana
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: logrotate-3.7.9-11.fc15 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-06-04 02:58:40 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jeffrey Laramie 2011-05-27 13:16:07 UTC
Description of problem:
When I add a custom section that uses the mail command it fails to pass the recipient name to the mail daemon.

Version-Release number of selected component (if applicable):
3.7.9 8.fc15

Steps to Reproduce:
1. Insert the following section into /etc/logrotate.d/syslog

# Custom log rotation script.
/var/log/messages /var/log/firewall {
    rotate 7
    missingok
    daily
    mailfirst
    mail root
    sharedscripts
    postrotate
        /bin/kill -HUP `cat /var/run/syslogd.pid 2> /dev/null` 2> /dev/null || true
    endscript
}

2. Run /usr/sbin/logrotate -v /etc/logrotate.conf
  
Actual results:
running postrotate script
Send options without primary recipient specified.
Usage: mail -eiIUdEFntBDNHRV~ -T FILE -u USER -h hops -r address -s SUBJECT -a FILE -q FILE -f FILE -A ACCOUNT -b USERS -c USERS -S OPTION users
error: mail command failed for /var/log/messages-20110527



Expected results:
Mail is send with no errors.

Additional Info:
I changed the selinux logrotate policy to permissive with no effect on this issue.

Comment 1 Fedora Update System 2011-05-30 14:16:19 UTC
logrotate-3.7.9-10.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/logrotate-3.7.9-10.fc15

Comment 2 Jan Kaluža 2011-05-30 14:18:06 UTC
Hi,
thanks for report, I've fixed the bug in new version of File. Please try the fixed version and let me now.

Comment 3 Jan Kaluža 2011-05-30 14:18:40 UTC
Sorry, I meant "new version of Logrotate"...

Comment 4 Jeffrey Laramie 2011-05-30 18:49:28 UTC
I can confirm the the fix works both from the command line and when run by crond. As far as I'm concerned you can close this bug. Thanks!

Comment 5 Fedora Update System 2011-05-30 22:27:10 UTC
Package logrotate-3.7.9-10.fc15:
* should fix your issue,
* was pushed to the Fedora 15 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing logrotate-3.7.9-10.fc15'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/logrotate-3.7.9-10.fc15
then log in and leave karma (feedback).

Comment 6 Fedora Update System 2011-05-31 09:29:36 UTC
logrotate-3.7.9-11.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/logrotate-3.7.9-11.fc15

Comment 7 Fedora Update System 2011-06-04 02:58:30 UTC
logrotate-3.7.9-11.fc15 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.