projects
/
feisty_meow.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
7376207
)
made the output file nicer, and time stamped it.
author
Chris Koeritz
<fred@gruntose.com>
Mon, 13 Feb 2012 15:56:45 +0000
(07:56 -0800)
committer
Chris Koeritz
<fred@gruntose.com>
Mon, 13 Feb 2012 15:56:45 +0000
(07:56 -0800)
scripts/email/move_spams_and_check.sh
patch
|
blob
|
history
diff --git
a/scripts/email/move_spams_and_check.sh
b/scripts/email/move_spams_and_check.sh
index 9c69c9bef6aeec3ba9f1c1ae59c00bd9340d3515..036e8274eb4ec48e9a3b1defd7f93fc8c1c516f7 100644
(file)
--- a/
scripts/email/move_spams_and_check.sh
+++ b/
scripts/email/move_spams_and_check.sh
@@
-6,6
+6,8
@@
# after the spam is all snagged, it is scanned for any untoward presence
# of non-spam folks using the user's valid email list.
# after the spam is all snagged, it is scanned for any untoward presence
# of non-spam folks using the user's valid email list.
+source "$FEISTY_MEOW_SCRIPTS/core/functions.sh"
+
# the storage area that the spam catcher tool puts the suspected spam into.
SPAM_SPOOL="/var/spool/sa-exim"
# a temporary directory where we'll move all the spam for analysis.
# the storage area that the spam catcher tool puts the suspected spam into.
SPAM_SPOOL="/var/spool/sa-exim"
# a temporary directory where we'll move all the spam for analysis.
@@
-14,7
+16,7
@@
SPAM_HOLD="$HOME/spamcrud"
# probably never send spam. it should be formatted one address to a line.
EMAIL_WHITE_LIST="$HOME/quartz/database/email_addresses.txt"
# we'll save a report of the spam checks in the file below.
# probably never send spam. it should be formatted one address to a line.
EMAIL_WHITE_LIST="$HOME/quartz/database/email_addresses.txt"
# we'll save a report of the spam checks in the file below.
-REPORT_FILE="$HOME/spam_check_report.txt"
+REPORT_FILE="$HOME/spam_check_report
_$(date_stringer)
.txt"
if [ ! -d "$SPAM_HOLD" ]; then
mkdir "$SPAM_HOLD"
if [ ! -d "$SPAM_HOLD" ]; then
mkdir "$SPAM_HOLD"
@@
-28,8
+30,9
@@
fi
echo "Setting the directory back to user's ownership..."
sudo chown -R $USER "$SPAM_HOLD"
sudo chgrp -R $USER "$SPAM_HOLD"
echo "Setting the directory back to user's ownership..."
sudo chown -R $USER "$SPAM_HOLD"
sudo chgrp -R $USER "$SPAM_HOLD"
-echo "
Running checker for false-positive spams...
"
+echo "
Checking for false-positive spams..." | tee "$REPORT_FILE
"
bash "$FEISTY_MEOW_SCRIPTS/email/scan_spam.sh" "$SPAM_HOLD" "$EMAIL_WHITE_LIST" 2>&1 \
bash "$FEISTY_MEOW_SCRIPTS/email/scan_spam.sh" "$SPAM_HOLD" "$EMAIL_WHITE_LIST" 2>&1 \
- | tee "$REPORT_FILE"
+ | tee -a "$REPORT_FILE"
+echo "Done checking for false-positive spams." | tee -a "$REPORT_FILE"