From 8d15d79d9ff7ef7028abfd1014e0ef7980b7cb82 Mon Sep 17 00:00:00 2001 From: Don Armstrong Date: Wed, 12 Feb 2014 15:54:54 -0800 Subject: [PATCH] grep to skip to address and don't have output --- learn_from_spam | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/learn_from_spam b/learn_from_spam index b843d05..0072598 100755 --- a/learn_from_spam +++ b/learn_from_spam @@ -2,13 +2,13 @@ if [ "$(basename $0)" = "learn_from_spam" ]; then for file in "$@"; do - spamassassin -r < "$file"; - spamassassin -R < "$file"; + spamassassin -r < "$file" >/dev/null; + grep -e '^From ' -e 'From: ' "$file" | spamassassin -R >/dev/null; done; elif [ "$(basename $0)" = "learn_from_ham" ]; then for file in "$@"; do - spamassassin -k < "$file"; - spamassassin -W < "$file"; + spamassassin -k < "$file" >/dev/null; + grep -e '^From ' -e 'From: ' -e 'To: ' -e 'Cc: ' "$file"|spamassassin -W>/dev/null; done; else "Called in a way this script cannot recognize"; -- 2.39.2