Sendmail Top X Email Recipients issue [CVS Commit sendmail]

Mike Tremaine <[email protected]>
Newsgroups gmane.comp.log.logwatch.devel
Message-ID <[email protected]>
I noticed that my counts are high when I forward off mail through a 
.procmailrc setup so I made a small commited which seems to fix this.

[mgt@dwarfstar services]$ cvs diff sendmail
Index: sendmail
===================================================================
RCS file: /var/cvs/logwatch/scripts/services/sendmail,v
retrieving revision 1.93
diff -r1.93 sendmail
632c632
<          if ($CleanTo =~ m/\w+\@.+\,\w+/) {
---
 >          if (($CleanTo =~ m/\w+\@.+\,\w+/) && ($RelayName !~ 
m/\[127\.0\.0\.1\]/)) {
637c637
<          } elsif ($CleanTo =~ m/\w+\@[\w\.]+/) {
---
 >          } elsif  (($CleanTo =~ m/\w+\@[\w\.]+/) && ($RelayName !~ 
m/\[127\.0\.0\.1\]/)) {


Now localhost is not counted [ I was getting double counts ] here is a 
sample of what it looked like.

Jul 14 11:05:05 bell sendmail[2798]: l6EI54fE002798: 
[email protected], ctladdr=spam_filter (503/503), delay=00:00:01, 
xdelay=00:00:01, mailer=relay, pri=38106, relay=[127.0.0.1] [127.0.0.1], 
dsn=2.0.0, stat=Sent (l6EI54ro002799 Message accepted for delivery)
Jul 14 11:05:09 bell sendmail[2815]: l6EI54ro002799: 
to=<[email protected]>, ctladdr=<[email protected]> 
(503/503), delay=00:00:05, xdelay=00:00:00, mailer=esmtp, pri=128225, 
relay=.relay.domain.com. [192.168.0.7], dsn=2.0.0, stat=Sent ( 
<[email protected]> Queued mail for delivery)

So now the first one is not counted.

-Mike
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.