Only add rules if they don't already exist
This commit is contained in:
parent
11d451742f
commit
8d1240017b
|
@ -73,11 +73,13 @@ if [ ! -d "$LISTDIR" ]; then
|
|||
mkdir -m 700 $LISTDIR/cur
|
||||
fi
|
||||
chown -R $MYUSERNAME:$MYUSERNAME $LISTDIR
|
||||
echo "" >> $PM
|
||||
echo ":0" >> $PM
|
||||
echo " * ^From: $EMAILADDRESS" >> $PM
|
||||
echo "$LISTDIR/new" >> $PM
|
||||
chown $MYUSERNAME:$MYUSERNAME $PM
|
||||
if ! grep -q "From: $EMAILADDRESS" $PM; then
|
||||
echo "" >> $PM
|
||||
echo ":0" >> $PM
|
||||
echo " * ^From: $EMAILADDRESS" >> $PM
|
||||
echo "$LISTDIR/new" >> $PM
|
||||
chown $MYUSERNAME:$MYUSERNAME $PM
|
||||
fi
|
||||
if [ ! -f "$MUTTRC" ]; then
|
||||
cp /etc/Muttrc $MUTTRC
|
||||
chown $MYUSERNAME:$MYUSERNAME $MUTTRC
|
||||
|
|
|
@ -79,7 +79,7 @@ if [ ! -d "$LISTDIR" ]; then
|
|||
fi
|
||||
|
||||
chown -R $MYUSERNAME:$MYUSERNAME $LISTDIR
|
||||
if ! grep -q "$LISTDIR/new" $PM; then
|
||||
if ! grep -q "Subject:.*()\[$SUBJECTTAG\]" $PM; then
|
||||
echo "" >> $PM
|
||||
echo ":0" >> $PM
|
||||
echo " * ^Subject:.*()\[$SUBJECTTAG\]" >> $PM
|
||||
|
|
Loading…
Reference in New Issue