Bug 708367 - Mail command fails
Summary: Mail command fails
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: logrotate
Version: 15
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Jan Kaluža
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-05-27 13:16 UTC by Jeffrey Laramie
Modified: 2011-06-04 02:58 UTC (History)
2 users (show)

Fixed In Version: logrotate-3.7.9-11.fc15
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-06-04 02:58:40 UTC
Type: ---


Attachments (Terms of Use)

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.


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