Your message dated Mon, 24 Dec 2012 14:09:38 +0100
with message-id <[email protected]>
and subject line Re: Bug#607630: [patch] exim4-base cronjob
has caused the Debian Bug report #607630,
regarding [patch] exim4-base cronjob
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
607630: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=607630
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: exim4-base
Version: 4.71-3ubuntu1
Severity: minor
Tags: patch

Hi,

Because there's a request for patches in /etc/cron.daily/exim4-base
regarding rotated logs attached is  my take on this. It's been written
on Ubuntu but (hence the version) but I hope there's not too much
difference.

Please note that I've moved exim4-base from /etc/cron.daily to
/etc/cron.weekly as I've got no interest in daily exim logs, which is
also the reason for the `seq 1 7`.

If you apply this patch to the package, please consider leaving the
for-loop (with `seq 1 1`) in so that people with weekly logs can easily
patch it.

thanks,
Mrten.
--- exim4-base-old      2010-12-20 10:39:55.000000000 +0100
+++ exim4-base  2010-12-20 12:33:44.000000000 +0100
@@ -40,8 +40,10 @@

 if [ -n "$E4BCD_DAILY_REPORT_TO" ]; then
   if [ -x "$(command -v eximstats)" ] && [ -x "$(command -v mail)" ]; then
-    if [ "$(< /var/log/exim4/mainlog.1 grep -v "$E4BCD_MAINLOG_NOISE" | wc 
-l)" -gt "0" ]; then
-      < /var/log/exim4/mainlog.1 grep -v "$E4BCD_MAINLOG_NOISE" \
+
+    if [  "$(for i in `seq 1 7`; do date +%Y-%m-%d -d "$i days ago" | grep 
-shf- /var/log/exim4/mainlog /var/log/exim4/mainlog.1 ; done | grep -v 
"$E4BCD_MAINLOG_NOISE" | wc -l)" -gt "0" ]; then
+       for i in `seq 1 7`; do date +%Y-%m-%d -d "$i days ago" | grep -shf- 
/var/log/exim4/mainlog /var/log/exim4/mainlog.1 ; done \
+                | grep -v "$E4BCD_MAINLOG_NOISE" \
                 | eximstats $E4BCD_DAILY_REPORT_OPTIONS \
                 | mail $E4BCD_DAILY_REPORT_TO -s"$(hostname --fqdn) Daily 
e-mail activity report"
     else

--- End Message ---
--- Begin Message ---
On 2010-12-20 Mrten <[email protected]> wrote:
> Package: exim4-base
> Version: 4.71-3ubuntu1
> Severity: minor
> Tags: patch

> Hi,

> Because there's a request for patches in /etc/cron.daily/exim4-base
> regarding rotated logs attached is  my take on this. It's been written
> on Ubuntu but (hence the version) but I hope there's not too much
> difference.

> Please note that I've moved exim4-base from /etc/cron.daily to
> /etc/cron.weekly as I've got no interest in daily exim logs, which is
> also the reason for the `seq 1 7`.

> If you apply this patch to the package, please consider leaving the
> for-loop (with `seq 1 1`) in so that people with weekly logs can easily
> patch it.
[...]

Hello,
The suggested patch lets eximstats run once week instead of daily. 

I am closing this bug as a denied wshlist request. Whether one wants
to run this daily or weekly or not at all is a just a matter of
personal preference. Neither one is inherently better. We provide a
simple default, and people can adapt it to their personal preference.
These are dpkg conffiles for a good reason.

cu andreas

--- End Message ---

Reply via email to