Professional Software Engineering wrote:
Here's an alternative version of what I posted earlier. This would ensure
that the received: header which it is operating on is the TOPMOST (i.e.
where it relayed to your server):
# you might rather anchor the second condition to the beginning of the
# variable, or prefix the match operator with a word delimiter regexp if you
# want to match multiple hosts at a given domain)
:0
* 9876543210^0 ^Received: from \/[^ ]*
* MATCH ?? ()\/(server\.tld|server2\.tld)
{
:0
* 1^1 H ?? > 1
* 1^1 B ?? > 1
{
PM_SCORE=$=
IGNORE=`echo " Folder: $MATCH $PM_SCORE" >> stats.log`
}
}
Thanks again for your solutions. they both work fine.
Unfortunately I described my situation not exactly so that there is a little
problem.
On my mailserver I get mail for two domains. The MX record for the first domain
points to my mailserver. The MX record for the second domain points to a mail
relay.
Your script works fine for the latter situation but not for the former one.
On the mailserver there is also the internal traffic which I don't want to
count or which should
be summarized also separately.
Finally I want to summarize the size of mails comming from the mail relay and
the size of mails
coming from outside directly to my server each in a separate sum.
I apologize for my missleading first description.
Could you please help me once more.
Thanks in advance
Michael
---
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
--
+-- Michael Meltzer -------------+-----------------------------------------+
| AED-SICAD Aktiengesellschaft | EMail :
Michael(_dot_)Meltzer(_at_)aed-sicad(_dot_)de |
| Lilienthal-Str. 7 | Phone : +49-89-45026-108 |
| 85579 Neubiberg | Fax : +49-89-45026-113 |
+--------------------------------+-----------------------------------------+
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail