procmail
[Top] [All Lists]

Re: How to get a count of processed msgs into procmail.log

2013-11-20 14:56:24
No answers to my query here so I went to comp.mail.sendmail 

Here is one possibility that I can verify does work for me.

From a poster on comp.mail.sendmail

,----
| From: Andrzej Adam Filip <anfi(_at_)onet(_dot_)eu>
| Subject: Re: Logging a running count of processed mail [procmail]
| Newsgroups: comp.mail.sendmail
| Date: Tue, 19 Nov 2013 22:19:37 +0100 (23 hours, 28 minutes, 12 seconds ago)
| Message-ID: <yjlwclgzvf(_at_)dbj2(_dot_)huge(_dot_)strangled(_dot_)net>
| 
| You may use perl with File::CounterFile module to get persistent
| counters. The module is provided by libfile-counterfile-perl module in
| Linux/Debian. 
| 
| Add the following line at begin of your procmail script. It may be
| safer to absolute path to counter file:
| 
| COUNT=`perl -MFile::CounterFile -e 'print
| File::CounterFile->new("./COUNTER")->inc'`
`----

____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)de
http://mailman.rwth-aachen.de/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>