[exim] eximstats - counting "=>" but not "->"

Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: Karl Fischer
Ημερομηνία:  
Προς: exim-users
Αντικείμενο: [exim] eximstats - counting "=>" but not "->"

Hi Exim users,

I'm fairly new to exim(4) and I'm still learning (who isn't?), so
please excuse me if you find this a stupid request ...

I just found out about the eximstats utility, which is a GREAT tool,
however, I've been confused with the numbers it showed me compared
to my own statistics, until I found out that it only counts the "=>"
for the "Top <n> (local|host) destinations by (volume|message count)"

So a mail sent to user1@domain and user2@domain and user3@domain will
result in:

2006-02-04 15:18:15 1F5OEx-0004Z0-Fi <= test@domain U=test P=local S=722
2006-02-04 15:18:15 1F5OEx-0004Z0-Fi => user1 <user1@domain>
2006-02-04 15:18:15 1F5OEx-0004Z0-Fi -> user2 <user3@domain>
2006-02-04 15:18:15 1F5OEx-0004Z0-Fi -> user3 <user2@domain>
2006-02-04 15:18:15 1F5OEx-0004Z0-Fi Completed

In the stats from eximstat it seems like only user1 has received mail,
while it is not counted for user2 & user3

This makes perfectly sense for the overall transport statistices in
terms of traffic, but it messes up my local statistics ...

So in my eximstats "v 1.6 2005/02/17 11:58:26 ph10" I've changed the
corresponding line (#1560 in my file) as follows:

*** 1557,1563 ****
         #ENDIF ($hist_opt > 0)
       }


!     elsif ($flag eq "=>") {
         $size = $size{$id} || 0;
         if ($host ne "local") {
           $remote_delivered{$id} = 1;
--- 1557,1563 ----
         #ENDIF ($hist_opt > 0)
       }


!     elsif ($flag eq "->" || $flag eq "=>") {
         $size = $size{$id} || 0;
         if ($host ne "local") {
           $remote_delivered{$id} = 1;


However, this also changes the numbers in the 'Grand total summary' and
the 'Deliveries by transport' and so on, which may not be wanted ...

Perhaps someone can make this behavior optional (and not affecting the
Grand totals) by adding a cmdline flag (and the corresponding routine)
to eximstats - I think my perl knowledge isn't good enough to find my
way through ~3000 lines of existing code in a reasonable time.


comments welcome ...

Rgds

- Karl