From c572fbcbc16c89313a3cfbe6bbafea9481380184 Mon Sep 17 00:00:00 2001 From: Storm Dragon Date: Sat, 16 Jan 2021 16:33:00 -0500 Subject: [PATCH] Update the automatic address script. --- fleacollar.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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.