aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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'")'