Greylisting .. nice ..
james at grayonline.id.au
Wed Nov 8 00:14:10 GMT 2006
-----BEGIN PGP SIGNED MESSAGE-----
On 08/11/2006, at 7:12 AM, mikea wrote:
> $ grep graylist /var/log/maillog | wc -l
> $ grep "accepted for delivery" /var/log/maillog | wc -l
> Just now, at 1409 local:
> grep "accepted for delivery" /var/log/maillog | wc -l && grep
> graylist /var/log/maillog | wc -l
Just a quick observation that has nothing to do with grey listing :)
Most *nix admins I know have broken old habits and no longer do the
old (and unnecessary) "cat <file> | less" in lieu of the more terse
"less <file>" along with other redundant pipes. Similarly "grep" can
count matching lines without the need of piping through "wc" (at
least I can confirm this with Gnu grep...not sure of the others).
grep <pattern> <file> | wc -l
is effectively the same as
grep -c <pattern> <file>
"man grep" reveals:
- -c, --count
Suppress normal output; instead print a count of matching lines
for each input file. With the -v, --invert-match option (see
below), count non-matching lines.
Not sure how BSD/Solaris/AIX/etc grep does things, but the "-c"
option has been around for ages in Gnu-land and gnu-grep is the
standard on Mac OSX along with all the Linuxes.
Usual disclaimers apply and YYMV :)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (Darwin)
-----END PGP SIGNATURE-----
More information about the MailScanner