Skip to content
Snippets Groups Projects
Commit 49a1c7bd authored by Bob Mottram's avatar Bob Mottram
Browse files

Wildcards

parent 7d68fe2b
No related branches found
No related tags found
No related merge requests found
......@@ -82,10 +82,10 @@ if [ ! -d "$LISTDIR" ]; then
mkdir -m 700 $LISTDIR/cur
fi
chown -R $MYUSERNAME:$MYUSERNAME $LISTDIR
if ! grep -q "From: $EMAILADDRESS" $PM; then
if ! grep -q "Email rule for $EMAILADDRESS -> $MAILINGLIST" $PM; then
echo "# Email rule for $EMAILADDRESS -> $MAILINGLIST" >> $PM
echo ":0" >> $PM
echo " * ^From: $EMAILADDRESS" >> $PM
echo " * ^From:.*$EMAILADDRESS" >> $PM
echo "$LISTDIR/new" >> $PM
echo "# End of rule" >> $PM
chown $MYUSERNAME:$MYUSERNAME $PM
......
......@@ -94,7 +94,7 @@ if [ $EMAIL_ADDRESS ]; then
if ! grep -q "Ignore rule for $EMAIL_ADDRESS" $PM; then
echo "# Ignore rule for $EMAIL_ADDRESS" >> $PM
echo ":0" >> $PM
echo " * ^From: $EMAIL_ADDRESS" >> $PM
echo " * ^From:.*$EMAIL_ADDRESS" >> $PM
echo "/dev/null" >> $PM
echo "# End of ignore rule" >> $PM
chown $MYUSERNAME:$MYUSERNAME $PM
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment