path: root/tools/mail-scan.c
diff options
authorJohn Denker <>2012-07-31 04:32:30 (GMT)
committerJohn Denker <>2012-07-31 04:32:30 (GMT)
commita82ac7877c4b437c3a3636fcc9694a1d4b2dfc18 (patch)
tree4dd3ff189ba0dd45a5016416f3436ae9b5a59cf2 /tools/mail-scan.c
parentc4cc2f1913b5b7d79ca2740bad6295a252017dea (diff)
repair usage message
Diffstat (limited to 'tools/mail-scan.c')
1 files changed, 5 insertions, 11 deletions
diff --git a/tools/mail-scan.c b/tools/mail-scan.c
index b0c4137..3c53b2b 100644
--- a/tools/mail-scan.c
+++ b/tools/mail-scan.c
@@ -37,19 +37,17 @@ using namespace std;
void usage(const int sts){
(sts ? cerr : cout) <<
-"Usage: skrewt [options]\n"
+"Usage: mail-scan [options] filename [more filenames]\n"
-" Scrutinizes email. Reads stdin, copies it to stdout.\n"
-" Exit result 0 means good, 1 means rejection (spam).\n"
-" Writes reason for rejection to stderr.\n"
-" Typically used as a filter in a pipeline, along with spamc -E\n"
" Options\n"
" -help print this msg (and exit immediately).\n"
-" -maxsize ii msg size in bytes; anything bigger will be rejected.\n"
" -vert invert: print only if *no* match.\n"
" -l print filename only, not matching text.\n"
" -group print a blank line after every match.\n"
+" -multi print multi-line records on multiple lines\n"
+" (as opposed to smashing them all onto one long line\n"
+" -addr assume field contains somebody <>; print just\n"
" Messages containing the string '-please-bounce-this-' will be rejected.\n"
" Messages with no date will be rejected.\n"
@@ -300,10 +298,6 @@ int main(int _argc, const char** _argv){
} else /* addr_mode */{
boost::smatch matches;
-//// boost::match_flag_type flg;
-//// boost::regex_search(header, matches, addr_filter);
-//// boost::regex_search(header.begin(), header.end(), matches, addr_filter, flg);
-/// boost::regex_search(header, matches, addr_filter);
if (boost::regex_search(header, matches, addr_filter)){
cout << string(matches[1].first, matches[1].second) << endl;
} else {