From 1f7165ece38ae61c6126a2275b6a9ede9d9f8bbe Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sat, 7 Jan 2017 11:13:24 +0000 Subject: [PATCH] Test for emails with no subject lines --- src/freedombone-base-email | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/freedombone-base-email b/src/freedombone-base-email index ec3b7b05..1d45a34e 100755 --- a/src/freedombone-base-email +++ b/src/freedombone-base-email @@ -1088,6 +1088,13 @@ function create_procmail { echo 'LOGFILE=$HOME/log/procmail.log' >> /home/$MY_USERNAME/.procmailrc echo 'LOGABSTRACT=all' >> /home/$MY_USERNAME/.procmailrc echo '' >> /home/$MY_USERNAME/.procmailrc + echo '# Test for an empty or missing subject line' >> /home/$MY_USERNAME/.procmailrc + echo 'SUBJ_=$(formail -xSubject: \' >> /home/$MY_USERNAME/.procmailrc + echo " | expand | sed -e 's/^[ ]*//g' -e 's/[ ]*\$//g')" >> /home/$MY_USERNAME/.procmailrc + echo ':0' >> /home/$MY_USERNAME/.procmailrc + echo ' * SUBJ_ ?? ^^^^' >> /home/$MY_USERNAME/.procmailrc + echo '/dev/null' >> /home/$MY_USERNAME/.procmailrc + echo '' >> /home/$MY_USERNAME/.procmailrc echo $"# Tripwire reports which have no violations don't need to be logged" >> /home/$MY_USERNAME/.procmailrc echo ':0 BD:' >> /home/$MY_USERNAME/.procmailrc TRIPWIRE_VIOLATIONS_STR=$'Total violations found: 0'