diff --git a/astroid/scripts/move-tag.sh b/astroid/scripts/move-tag.sh index 2cffa4c..114771e 100755 --- a/astroid/scripts/move-tag.sh +++ b/astroid/scripts/move-tag.sh @@ -64,7 +64,7 @@ while read line; do # SPAM tag "spam" elif [ "$TAG" = "$SPAMTAG" ]; then debugmsg "search spam tagged mails" - HITFILES=$(notmuch search --output=files --exclude=false tag:$SPAMTAG and not path:$SPAMFOL/**) # Files which are tagged with "spam" but not in Spam folder + HITFILES=$(notmuch search --output=files --exclude=false "tag:$SPAMTAG and (not path:$SPAMFOL/**) and (not path:$ARCHFOL/**)") # Files which are tagged with "spam" but not in Spam folder FOL="$SPAMFOL" # Set destination folder to INBOX.Junk # ARCHIVE tag "archive"