Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 437896 - mail-mta/exim-4.80 - Logrotate script should not produce output if exim service is not started
Summary: mail-mta/exim-4.80 - Logrotate script should not produce output if exim servi...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Normal minor (vote)
Assignee: Fabian Groffen
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-10-10 21:17 UTC by Anatoly
Modified: 2012-10-11 06:58 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Anatoly 2012-10-10 21:17:46 UTC
mail-mta/exim-4.80 is installed, but /etc/init.d/exim service is not started.  During rotation routine logrotate sends following error message:

>  * exim: cannot `reload' as it has not been started
> error: error running shared postrotate script for '/var/log/exim/exim*.log '

Apparently logrotate produces redundant output if exim service is not used.  Problem line in provided logrotate script (/usr/portage/mail-mta/exim/files/exim.logrotate):

/etc/init.d/exim reload > /dev/null

Proposed change to this line:

/etc/init.d/exim reload > /dev/null 2>&1 || true

Reproducible: Always

Steps to Reproduce:
1. Install mail-mta/exim-4.80, app-admin/logrotate installed.
2. Have /etc/init.d/exim service not started.
3. Make logrotate perform rotation on exim logs (/var/log/exim/exim_*.log).
Actual Results:  
Likely this very exim has delivered the error message.  If exim is not configured for actually sending mail (e.g. no /etc/exim/exim.conf file), /root/dead.letter file is created with the error message.

Expected Results:  
No mail with logrotate error message.

Work-around: use proposed fix on /etc/logrotate.d/exim file.
Comment 1 Fabian Groffen gentoo-dev 2012-10-11 06:58:57 UTC
Applied without revbump, since it IMO has minimal impact.  Thanks!