Re: [exim] email count per unit time

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Ian Eiloart
Dátum:  
Címzett: Exim Users
Tárgy: Re: [exim] email count per unit time

> On 11 Sep 2015, at 10:35, John <exim-users-list@???> wrote:
>
> Hello list,
>
> Is there an easy way of measuring the number of emails handled by the server
> per unit time? Per day, week, month, ever.
>
> The server is also an smtp smarthost for a number of other servers so these
> would need to be counted as well as those sent/received locally.
>
> Many thanks,


Hi John,

If you’re looking to take some specific action based on the count, you can use the ratelimit features in the configuration. Actions taken can be all sorts, including writing data to a log file.

If you’re just looking to produce regular reports, you can use eximstats 
    eximstats [Options] mainlog1 mainlog2 ... > report.txt
        eximstats -merge [Options] report.1.txt report.2.txt ... > weekly_report.txt

To suppress everything except counts, use "-ne -nt -nr -t0 -q0 -h0" -ne and -nr remove particularly verbose elements.

Use merge like this, to make weekly reports much more efficient - avoiding the need to parse any log file more than once.

       
-merge

           This option allows eximstats to merge old eximstat reports
           together. Eg:

            eximstats mainlog.sun > report.sun.txt
            eximstats mainlog.mon > report.mon.txt
            eximstats mainlog.tue > report.tue.txt
            eximstats mainlog.wed > report.web.txt
            eximstats mainlog.thu > report.thu.txt
            eximstats mainlog.fri > report.fri.txt
            eximstats mainlog.sat > report.sat.txt
            eximstats -merge       report.*.txt > weekly_report.txt
            eximstats -merge -html report.*.txt > weekly_report.html

           *   You can merge text or html reports and output the results as
               text or html.

           *   You can use all the normal eximstat output options, but only
               data included in the original reports can be shown!

           *   When merging reports, some loss of accuracy may occur in the
               top n lists.  This will be towards the ends of the lists.

           *   The order of items in the top n lists may vary when the data
               volumes round to the same value.

-- 
Ian Eiloart
Postmaster, University of Sussex
+44 (0) 1273 87-3148