procmail
[Top] [All Lists]

Re: Collecting Email Traffic Stats with Procmail

2002-04-19 17:04:58
At 17:25 2002-04-19 -0600, Terrence Martin did say:
[snip]
I tried just this, but no logging. I also tried setting up a default rule

because you're not doing anything which woulc cause something to be logged.

:0
${DEFAULT}

Unfortunately this logged too much info, and it also prevented user level

Yea, because you're _delivering_ the message.  Suggestion: don't do that.

Basically I want to count the amount of data recieved for each user as it
arrives, then pass it on to the user for additional processing.

[in /etc/procmailrc]

LOGFILE=/var/log/procmail.log

# logs username and message size
# (assumes any valid message is at least 1 byte)
:0
* 1^1 > 1
{
        LOG="$LOGNAME $=
"
}

This only applies to messages delivered to local recipients - program aliases and remote user aliases won't pass through procmail. Nor will outbound messages.

I've got to wonder why you don't go to the MTA logfile and parse it (which is well outside the scope of this forum, since that's not even something you'd do with procmail).

[kersnip - previous message]

---
 Sean B. Straw / Professional Software Engineering

 Procmail disclaimer: <http://www.professional.org/procmail/disclaimer.html>
 Please DO NOT carbon me on list replies.  I'll get my copy from the list.

_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail