File: cron.daily.patch

package info (click to toggle)
mailscanner 4.79.11-2.2
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 5,820 kB
  • ctags: 1,309
  • sloc: perl: 25,655; sh: 2,666; xml: 624; makefile: 242
file content (43 lines) | stat: -rw-r--r-- 2,728 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
--- /etc/cron.daily/exim4-outgoing	2008-09-28 13:17:08.000000000 +0200
+++ /etc/cron.daily/exim4-outgoing	2009-01-20 22:19:28.000000000 +0100
@@ -24,7 +24,7 @@
 
 [ -f /etc/default/exim4 ] && . /etc/default/exim4
 
-SPOOLDIR="$(exim4 -bP spool_directory | sed 's/.*=[[:space:]]\(.*\)/\1/')"
+SPOOLDIR="$(exim4 -DOUTGOING -bP spool_directory | sed 's/.*=[[:space:]]\(.*\)/\1/')"
 
 # The log processing code used in this cron script is not very
 # sophisticated. It relies on this cron job being executed earlier than
@@ -40,8 +40,8 @@
 
 if [ -n "$E4BCD_DAILY_REPORT_TO" ]; then
   if [ -x "$(command -v eximstats)" ] && [ -x "$(command -v mail)" ]; then
-    if [ "$(< /var/log/exim4/mainlog grep -v "$E4BCD_MAINLOG_NOISE" | wc -l)" -gt "0" ]; then
-      < /var/log/exim4/mainlog grep -v "$E4BCD_MAINLOG_NOISE" \
+    if [ "$(< /var/log/exim4_outgoing/mainlog grep -v "$E4BCD_MAINLOG_NOISE" | wc -l)" -gt "0" ]; then
+      < /var/log/exim4_outgoing/mainlog grep -v "$E4BCD_MAINLOG_NOISE" \
                 | eximstats $E4BCD_DAILY_REPORT_OPTIONS \
                 | mail $E4BCD_DAILY_REPORT_TO -s"$(hostname --fqdn) Daily e-mail activity report"
     else
@@ -64,15 +64,15 @@
 }
 
 if [ "$E4BCD_WATCH_PANICLOG" != "no" ]; then
-  if [ -s "/var/log/exim4/paniclog" ]; then
+  if [ -s "/var/log/exim4_outgoing/paniclog" ]; then
     if [ -x "/usr/local/lib/exim4/nonzero_paniclog_hook" ]; then
       /usr/local/lib/exim4/nonzero_paniclog_hook
     fi
-    if [ -z "$E4BCD_PANICLOG_NOISE" ] || grep -vq "$E4BCD_PANICLOG_NOISE" /var/log/exim4/paniclog; then
-      log_this "ALERT: exim paniclog /var/log/exim4/paniclog has non-zero size, mail system possibly broken"
-      if ! printf "Subject: exim paniclog on %s has non-zero size\nTo: root\n\nexim paniclog /var/log/exim4/paniclog on %s has non-zero size, mail system might be broken. The last ${E4BCD_PANICLOG_LINES} lines are quoted below.\n\n%s\n" \
+    if [ -z "$E4BCD_PANICLOG_NOISE" ] || grep -vq "$E4BCD_PANICLOG_NOISE" /var/log/exim4_outgoing/paniclog; then
+      log_this "ALERT: exim paniclog /var/log/exim4_outgoing/paniclog has non-zero size, mail system possibly broken"
+      if ! printf "Subject: exim paniclog on %s has non-zero size\nTo: root\n\nexim paniclog /var/log/exim4_outgoing/paniclog on %s has non-zero size, mail system might be broken. The last ${E4BCD_PANICLOG_LINES} lines are quoted below.\n\n%s\n" \
       "$(hostname --fqdn)" "$(hostname --fqdn)" \
-      "$(tail -n "${E4BCD_PANICLOG_LINES}" /var/log/exim4/paniclog)" \
+      "$(tail -n "${E4BCD_PANICLOG_LINES}" /var/log/exim4_outgoing/paniclog)" \
       | exim4 root; then
         log_this "PANIC: sending out e-mail warning has failed, exim has non-zero return code"
       fi