iredmail / iRedAPD

A simple Postfix policy server.
https://www.iredmail.org/
49 stars 24 forks source link

iRedAPD logrotate script generates Cron error messages #17

Closed clickbg closed 3 weeks ago

clickbg commented 1 year ago

Hi,

This is a very minor bug which unfortunately generates tickets from our systems since we monitor every cron output. Basically in https://github.com/iredmail/iRedAPD/blob/114f99384369e28933b64216584a7b9ba6f951e9/samples/logrotate.d/iredapd#L10-L12

Generates output:

/etc/cron.daily/logrotate:

Redirecting to /bin/systemctl restart rsyslog.service

Which causes our systems to log an incident since it`s not expected that a cronjob would generate unhanded messages in the error output.

Could you please change it to something like this, taken from the rsyslog logrotate job:

    postrotate
        /usr/bin/systemctl -s HUP kill rsyslog.service >/dev/null 2>&1 || true
    endscript

Since currently we have to apply this fix after every iRedAPD upgrade.

Thank you for the amazing software!

iredmail commented 1 year ago

Would you like to send a pull request? :)

clickbg commented 1 year ago

Sure, sorry for not starting with this. I have created https://github.com/iredmail/iRedAPD/pull/18

Thanks!