Bug 1381211 - Update logrotate script for clamsmtp
Summary: Update logrotate script for clamsmtp
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora EPEL
Classification: Fedora
Component: clamsmtp
Version: el6
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Nathanael Noblet
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On: 1376815
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-10-03 12:27 UTC by Nicolas Chauvet (kwizart)
Modified: 2019-07-11 16:11 UTC (History)
7 users (show)

Fixed In Version:
Clone Of: 1376815
Environment:
Last Closed: 2019-07-11 16:11:21 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Nicolas Chauvet (kwizart) 2016-10-03 12:27:40 UTC
+++ This bug was initially created as a clone of Bug #1376815 +++

Description of problem:
On every logrotate (monthly) run for clamav, the following message can be seen under certain configuration:
error: running non-shared postrotate script for /var/log/clamd.smtpd.log of '/var/log/clamd.smtpd.log'

Version-Release number of selected component (if applicable):
Current clamav in EPEL6 and later.

How reproducible:
Every month as seen in logwatch

Steps to Reproduce:
1. install clamav 
2. enable smtpd
3.

Actual results:
The error is seen in the log

Expected results:
We should see no error

Additional info:
As seen in rhbz#1249725 the fix is about to redirect the standard output.
Patch attached

--- Additional comment from Orion Poplawski on 2016-09-16 14:06:19 EDT ---

I don't quite follow.  The clamd package's logrotate script does not deal with /var/log/clamd.smtpd.log, but with /var/log/clamav/clamd.log.  You must have a custom logrotate script.

--- Additional comment from Nicolas Chauvet (kwizart) on 2016-09-16 15:28:48 EDT ---

(In reply to Orion Poplawski from comment #1)
> I don't quite follow.  The clamd package's logrotate script does not deal
> with /var/log/clamd.smtpd.log, but with /var/log/clamav/clamd.log.  You must
> have a custom logrotate script.
wrong paste then

--- Additional comment from Orion Poplawski on 2016-09-16 16:01:16 EDT ---

So you also get error messages about /var/log/clamav/clamd.log?  So there is no "clamd" process?

Comment 1 Nicolas Chauvet (kwizart) 2016-10-03 12:28:55 UTC
Seems like the bug was initially created for the wrong component.
The error comes from the logrotate file from clamsmtp project.

Comment 2 Orion Poplawski 2016-10-03 15:13:43 UTC
So why was the bug cloned instead of just changing the component?

Comment 3 Nicolas Chauvet (kwizart) 2016-10-03 20:01:31 UTC
(In reply to Orion Poplawski from comment #2)
> So why was the bug cloned instead of just changing the component?
Because the clamsmtp shoudl use the template from clamav-devel. So both clamav and clamsmtp have to be fixed.

Comment 4 Nathanael Noblet 2017-03-03 16:43:54 UTC
So I'm a little confused. The logrotate seems to output to dev/null

/var/log/clamd.clamsmtp/clamsmtpd.log {
    monthly
    notifempty
    missingok

    postrotate
        kill -HUP `cat /run/clamd.clamsmtp/clamd.pid` 2 > /dev/null || :
    endscript
}


What needs to happen with clamsmtpd?

Comment 5 Orion Poplawski 2017-03-03 16:48:10 UTC
kill -HUP `cat /run/clamd.clamsmtp/clamd.pid` > /dev/null 2>&1 || :

currently only stderr goes to /dev/null.

Comment 6 Nicolas Chauvet (kwizart) 2019-07-11 16:11:21 UTC
Seems fixed in current package


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