Test for emails with no subject lines

This commit is contained in:
Bob Mottram 2017-01-07 11:13:24 +00:00
parent bf40e04c80
commit 1f7165ece3
1 changed files with 7 additions and 0 deletions

View File

@ -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'