aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Landauer <matthew@openaustralia.org>2012-10-10 16:38:38 +1100
committerMatthew Landauer <matthew@openaustralia.org>2012-10-10 16:38:38 +1100
commitf4dcfa9604fa28745c350972f6cf174363d122db (patch)
tree12fd0abe11aa83d46440a0e70df7e732a3e2fcfe
parent1ad44c41e26a26bff20b37ceef1177c27afc5a06 (diff)
New configuration for path to mailer (MTA) log files
-rw-r--r--config/general.yml-example3
-rwxr-xr-xscript/load-exim-logs6
2 files changed, 8 insertions, 1 deletions
diff --git a/config/general.yml-example b/config/general.yml-example
index b457b5ed6..6f121190d 100644
--- a/config/general.yml-example
+++ b/config/general.yml-example
@@ -172,3 +172,6 @@ GA_CODE: ''
# Search path for external commandline utilities (such as pdftohtml, pdftk, unrtf)
UTILITY_SEARCH_PATH: ["/usr/bin", "/usr/local/bin"]
+
+# Path to your exim or postfix log files that will get sucked up by script/load-exim-logs
+MTA_LOG_PATH: '/var/log/exim4/exim-mainlog-*'
diff --git a/script/load-exim-logs b/script/load-exim-logs
index 00b6b9825..66de207be 100755
--- a/script/load-exim-logs
+++ b/script/load-exim-logs
@@ -2,6 +2,10 @@
LOC=`dirname "$0"`
+cd "$LOC"/..
+source commonlib/shlib/deployfns
+read_conf config/general
+
# Specific file if specified
if [ x$1 != x ]
then
@@ -16,7 +20,7 @@ fi
# Load in last three days worth of logs (if they've been modified)
cd "$LOC"
-LATEST=$( ls /var/log/exim4/exim-mainlog-* 2>/dev/null | sort | tail -3 )
+LATEST=$( ls $OPTION_MTA_LOG_PATH 2>/dev/null | sort | tail -3 )
for X in $LATEST
do
bundle exec ./runner 'EximLog.load_file("'$X'")'