~msapiro/mailman/mhonarc

« back to all changes in this revision

Viewing changes to contrib/mmdsr

  • Committer: Mark Sapiro
  • Date: 2018-06-16 03:47:14 UTC
  • mfrom: (1629.9.26 2.1)
  • Revision ID: mark@msapiro.net-20180616034714-qzkk7piyb0zqkq21
Merged from 2.1 branch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
207
207
#               Updated on: Sun Jun  4 17:12:54 PDT 2017
208
208
#               Added -a to default (e)grep to account for logs that may
209
209
#               have non-ascii and be seen as binary.
 
210
#
 
211
# 0.0.28        Update by Mark Sapiro <mark@msapiro.net>
 
212
#               Updated on: Fri Jun 15 20:20:36 PDT 2018
 
213
#               Added report of new security log.
 
214
#               Augmented 0.0.24 to do <letters> as well as <digits>.
210
215
 
211
216
###############################################################################
212
217
# Set up locations of standard commands, directories, etc....
275
280
# Mailman Log files to check for errors.
276
281
# No need to specify path, only log file name.
277
282
###############################################################################
278
 
ERR_LOGS="error fromusenet locks mischief post qrunner smtp-failure vette"
 
283
ERR_LOGS="error fromusenet locks mischief security post qrunner smtp-failure vette"
279
284
 
280
285
###############################################################################
281
286
# Mailman Log files to summarize.
499
504
            echo "------------------------------" >> $TMP
500
505
            $EGREP -vi '(Login failure with private rosters|Unsub attempt of non-member|Reminder attempt of non-member)' $TMPLOG | $SED 's/^.* ([0-9]*) //' | $SORT | $UNIQ -c | $SORT -nr >> $TMP
501
506
 
 
507
        elif [ "${LOG}" = "security" ] ; then
 
508
 
 
509
            echo "" >> $TMP
 
510
            $GREP 'Authorization failed' $TMPLOG | $SED 's/^.* ([0-9]*) //' | $SORT | $UNIQ -c | $SORT -nr >> $TMP
 
511
 
502
512
        elif [ "${LOG}" = "post" ] ; then
503
513
 
504
514
            $GREP -vi 'success' $TMPLOG | $SED 's/^.* ([0-9]*) //' | $SORT | $UNIQ -c | $SORT -nr >> $TMP
548
558
            echo "" >> $TMP
549
559
            echo "Banned Subscriptions" >> $TMP
550
560
            echo "------------------------------" >> $TMP
551
 
            $GREP -i 'banned subscription' $TMPLOG | $AWK '{ print $6 " " $9 }' | $SED -e 's/\+[0-9][0-9]*@/+<digits>@/' | $SORT | $UNIQ -c | $SORT -nr >> $TMP
 
561
            $GREP -i 'banned subscription' $TMPLOG | $AWK '{ print $6 " " $9 }' | $SED -e 's/\+[0-9][0-9]*@/+<digits>@/' -e 's/\+[a-z][a-z]*@/+<letters>@/' | $SORT | $UNIQ -c | $SORT -nr >> $TMP
552
562
 
553
563
            echo "" >> $TMP
554
564
            echo "DMARC lookups" >> $TMP