Keep email encryption as the final step in procmail
This commit is contained in:
parent
5e37bab6be
commit
cd5291851b
|
@ -101,22 +101,19 @@ chown -R $MYUSERNAME:$MYUSERNAME $LISTDIR
|
||||||
|
|
||||||
if ! grep -q "Subject:.*()\[$SUBJECTTAG\]" $PM; then
|
if ! grep -q "Subject:.*()\[$SUBJECTTAG\]" $PM; then
|
||||||
if ! grep -q "\# encrypt" $PM; then
|
if ! grep -q "\# encrypt" $PM; then
|
||||||
echo "" >> $PM
|
filter="
|
||||||
echo "/# Email rule for $MAILINGLIST subject \[$SUBJECTTAG\]" >> $PM
|
# Email rule for $MAILINGLIST subject [$SUBJECTTAG]
|
||||||
echo ":0" >> $PM
|
|
||||||
echo " * ^Subject:.*()\[$SUBJECTTAG\]" >> $PM
|
|
||||||
echo "$LISTDIR/new" >> $PM
|
|
||||||
echo "/# End of rule" >> $PM
|
|
||||||
chown $MYUSERNAME:$MYUSERNAME $PM
|
|
||||||
else
|
|
||||||
sed -i "/\# encrypt/i
|
|
||||||
/# Email rule for $MAILINGLIST subject \[$SUBJECTTAG\]
|
|
||||||
:0
|
:0
|
||||||
* ^Subject:.*()\[$SUBJECTTAG\]
|
* ^Subject:.*()\[$SUBJECTTAG\]
|
||||||
$LISTDIR/new
|
$LISTDIR/new
|
||||||
/# End of rule
|
# End of rule
|
||||||
" $PM
|
"
|
||||||
|
echo "$filter" >> $PM
|
||||||
|
else
|
||||||
|
filter=$(echo "# Email rule for $MAILINGLIST subject [$SUBJECTTAG]\n:0\n * ^Subject:.*()\\\[$SUBJECTTAG\\\]\n$LISTDIR/new\n# End of rule\n")
|
||||||
|
sed "/# encrypt/i ${filter}" $PM
|
||||||
fi
|
fi
|
||||||
|
chown $MYUSERNAME:$MYUSERNAME $PM
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! -f "$MUTTRC" ]; then
|
if [ ! -f "$MUTTRC" ]; then
|
||||||
|
|
Loading…
Reference in New Issue