diff --git a/fleacollar.sh b/fleacollar.sh index 186dd65..56a3ea0 100755 --- a/fleacollar.sh +++ b/fleacollar.sh @@ -107,16 +107,20 @@ add_email() { 'github.com' 'gitlab.com' 'mailto' + 'no-reply' 'noreply' 'paypal.com' 'walmart.com' ) + # Make the list into a format that works with bash regexp. + ignoreList="${ignoreList[*]}" + ignoreList="${ignoreList// /|}" # Do not add aliases with no alias-name if [[ "$alias" == "UNNAMED" ]]; then return fi # Try to filter out addresses that do not receive replies. - if [[ "<${emailAddress,,}" =~ ${ignoreList} ]]; then + if [[ "${emailAddress,,}" =~ ${ignoreList} ]]; then return fi # Do not add the same address twice.