Re: calculation of mail traffic
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 El Jueves, 20 de Marzo de 2003 02:50, [EMAIL PROTECTED] escribió: > [EMAIL PROTECTED] said: > > Well.. I can also grep "From:" to see wich addresses are sending more > > mails than usual, don't I? > > You're joking, right? From: is easily faked, and any bulk spammer fakes it. Yes, "From:" is easily faked, but if I see an IP that uses many differents "From:"s I can block it, and if I see a "From:" that should not be allowed, I can block it, too... > > Unless you block your clients from sending on port 25, you can't tell what > mail they're sending. I think I've not said outgoing mail server and incoming mail server are two different computers... > If you do block port 25, I wouldn't expect your commercial clients to be > happy. I would never block port 25... why? > > If you force (by firewall rules or otherwise) them to use mail.bigisp.com > as their outgoing relay, they might feel you're invading their privacy. > Would you want someone checking your phone calls (for other than billing > purposes)? I'm sorry but I think we're not talking about the same... -BEGIN PGP SIGNATURE- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQE+eX0cGOU6HQZ81TcRAoJAAKCukO5Qj67riCKUtIceFYhmVT+6RwCgh+KI 8lwYGR5xGtd+iZiZiTTQr6k= =0muG -END PGP SIGNATURE-
Re: calculation of mail traffic
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 El Jueves, 20 de Marzo de 2003 02:50, [EMAIL PROTECTED] escribió: > [EMAIL PROTECTED] said: > > Well.. I can also grep "From:" to see wich addresses are sending more > > mails than usual, don't I? > > You're joking, right? From: is easily faked, and any bulk spammer fakes it. Yes, "From:" is easily faked, but if I see an IP that uses many differents "From:"s I can block it, and if I see a "From:" that should not be allowed, I can block it, too... > > Unless you block your clients from sending on port 25, you can't tell what > mail they're sending. I think I've not said outgoing mail server and incoming mail server are two different computers... > If you do block port 25, I wouldn't expect your commercial clients to be > happy. I would never block port 25... why? > > If you force (by firewall rules or otherwise) them to use mail.bigisp.com > as their outgoing relay, they might feel you're invading their privacy. > Would you want someone checking your phone calls (for other than billing > purposes)? I'm sorry but I think we're not talking about the same... -BEGIN PGP SIGNATURE- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQE+eX0cGOU6HQZ81TcRAoJAAKCukO5Qj67riCKUtIceFYhmVT+6RwCgh+KI 8lwYGR5xGtd+iZiZiTTQr6k= =0muG -END PGP SIGNATURE- -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: calculation of mail traffic
[EMAIL PROTECTED] said: > Well.. I can also grep "From:" to see wich addresses are sending more > mails than usual, don't I? You're joking, right? From: is easily faked, and any bulk spammer fakes it. Unless you block your clients from sending on port 25, you can't tell what mail they're sending. If you do block port 25, I wouldn't expect your commercial clients to be happy. If you force (by firewall rules or otherwise) them to use mail.bigisp.com as their outgoing relay, they might feel you're invading their privacy. Would you want someone checking your phone calls (for other than billing purposes)?
Re: calculation of mail traffic
[EMAIL PROTECTED] said: > Well.. I can also grep "From:" to see wich addresses are sending more > mails than usual, don't I? You're joking, right? From: is easily faked, and any bulk spammer fakes it. Unless you block your clients from sending on port 25, you can't tell what mail they're sending. If you do block port 25, I wouldn't expect your commercial clients to be happy. If you force (by firewall rules or otherwise) them to use mail.bigisp.com as their outgoing relay, they might feel you're invading their privacy. Would you want someone checking your phone calls (for other than billing purposes)? -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: calculation of mail traffic
isoqlog Description: Mail Transport Agent log analysis program. Isoqlog is an MTA log analysis program written in C. It designed to scan qmail, postfix, sendmail logfile and produce usage statistics in HTML format for viewing through a browser. It produces Top domains output according to Sender, Receiver, Total mails and bytes; it keeps your main domain mail statistics with regard to Days Top Domain, Top Users values for per day, per month and years. Very pretty. :) Regards, Brad Lay ([EMAIL PROTECTED]) On Mon, 17 Mar 2003, Markus Welsch wrote: > Hi all, > > I'd like to calculate mail traffic on a per domain base. Calculation should > include mail sent and mail received. I've been thinking of using the message > id > as some sort of "key" for everything since it's supposed to be unique, right ? > > I've been searching for a ready made solution and haven't come accross > something, so I started working on a solution. > > > My current ideas: > - calculate traffic for each day (via cronjob) with traffic in/out per domain > - domains which this calculation should be done for are listed in > accounting_domains > > I've built a small example program (attached as example.pl) an example log > file > is also attached. > > > My knowledge of Perl is not quite well so I'm looking for help to archive the > goal of doing this calculation. Anybody out there for help ? :-) > > > > Kind Regards, > > Markus Welsch >
Re: calculation of mail traffic
isoqlog Description: Mail Transport Agent log analysis program. Isoqlog is an MTA log analysis program written in C. It designed to scan qmail, postfix, sendmail logfile and produce usage statistics in HTML format for viewing through a browser. It produces Top domains output according to Sender, Receiver, Total mails and bytes; it keeps your main domain mail statistics with regard to Days Top Domain, Top Users values for per day, per month and years. Very pretty. :) Regards, Brad Lay ([EMAIL PROTECTED]) On Mon, 17 Mar 2003, Markus Welsch wrote: > Hi all, > > I'd like to calculate mail traffic on a per domain base. Calculation should > include mail sent and mail received. I've been thinking of using the message id > as some sort of "key" for everything since it's supposed to be unique, right ? > > I've been searching for a ready made solution and haven't come accross > something, so I started working on a solution. > > > My current ideas: > - calculate traffic for each day (via cronjob) with traffic in/out per domain > - domains which this calculation should be done for are listed in accounting_domains > > I've built a small example program (attached as example.pl) an example log file > is also attached. > > > My knowledge of Perl is not quite well so I'm looking for help to archive the > goal of doing this calculation. Anybody out there for help ? :-) > > > > Kind Regards, > > Markus Welsch > -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: calculation of mail traffic
This one looks really impressive :-) Thanks for suggesting this nice program! We currently use lire ( www.logreport.org ) and are totally satisfied with it. It processes many log formats ( mail, www, firewall, ... ) and generates good reports. Regards, JB Regards, Markus
Re: calculation of mail traffic
Hi All, Le lundi 17 mars 2003 à 13:58, Tomàs Núñez Lirola a écrit: > > > On Mon, 2003-03-17 at 10:30, Tomàs Núñez Lirola wrote: > > > -BEGIN PGP SIGNED MESSAGE- > > > Hash: SHA1 > > > > > > I also looked for mail stats recently. I've not used any, but I found > > > some software for mail stats. > > > > > > http://www.reedmedia.net/software/sendmail_stats/ (building) > > > http://www.sawmill.net/formats/UNIX_Sendmail.html > > > > additionally Ollie cook's eximstate might be > > useful..http://www.olliecook.net/projects/eximstate/ > > it takes the stats of an exim server, and draws graphs > > of the mail from the server, enabling one to easily see > > if there are frozen mails or bounce mails in the queue > > or whatever. > > We currently use lire ( www.logreport.org ) and are totally satisfied with it. It processes many log formats ( mail, www, firewall, ... ) and generates good reports. Regards, JB pgpPY1DxD3jqb.pgp Description: PGP signature
Re: calculation of mail traffic
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Well.. I can also grep "From:" to see wich addresses are sending more mails than usual, don't I? Anyway I think some mail stats would give me this information and some more interesting information... El Lunes, 17 de Marzo de 2003 13:40, escribió: > Hi There, > > On Mon, 2003-03-17 at 10:30, Tomàs Núñez Lirola wrote: > > -BEGIN PGP SIGNED MESSAGE- > > Hash: SHA1 > > > > I also looked for mail stats recently. I've not used any, but I found > > some software for mail stats. > > > > http://www.reedmedia.net/software/sendmail_stats/ (building) > > http://www.sawmill.net/formats/UNIX_Sendmail.html > > additionally Ollie cook's eximstate might be > useful..http://www.olliecook.net/projects/eximstate/ > it takes the stats of an exim server, and draws graphs > of the mail from the server, enabling one to easily see > if there are frozen mails or bounce mails in the queue > or whatever. > > > I'm very insterested in some way to check if any of the users is doing > > spam, and I thought some mail stats would help. How do you watch if your > > users spam? > > interesting question.. > > in an ideal world, you'd have every one who you let relay through your > server authenticate against it, and then you could come up with some > stats on how many mails each user has sent. > (for i in `cat ` ; do grep -c $i ; done) > or similar. If any user's sent an abnormally large amount of mails, they > could then be loked into. > > without this, I guess the best way of figuring is to do it on a per ip > which you relay for. > > if its local users on the system, then my first suggestion might still > help, and rmuser anyone who sends spam :) > > thanks > > Andy > > > El Lunes, 17 de Marzo de 2003 09:47, Markus Welsch escribió: > > > Hi all, > > > > > > I'd like to calculate mail traffic on a per domain base. Calculation > > > should include mail sent and mail received. I've been thinking of using > > > the message id as some sort of "key" for everything since it's supposed > > > to be unique, right ? > > > > > > I've been searching for a ready made solution and haven't come accross > > > something, so I started working on a solution. > > > > > > > > > My current ideas: > > > - calculate traffic for each day (via cronjob) with traffic in/out per > > > domain - domains which this calculation should be done for are listed > > > in accounting_domains > > > > > > I've built a small example program (attached as example.pl) an example > > > log file is also attached. > > > > > > > > > My knowledge of Perl is not quite well so I'm looking for help to > > > archive the goal of doing this calculation. Anybody out there for help > > > ? :-) > > > > > > > > > > > > Kind Regards, > > > > > > Markus Welsch > > > > -BEGIN PGP SIGNATURE- > > Version: GnuPG v1.2.1 (GNU/Linux) > > > > iD8DBQE+daPXGOU6HQZ81TcRAlosAJ96QyhG9sX87J9IZGcqNnpAvLkkqgCeNaBI > > xaPO1Gt56xeEo7WjLlfMMWE= > > =02nl > > -END PGP SIGNATURE- -BEGIN PGP SIGNATURE- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQE+dcaHGOU6HQZ81TcRAgBLAJ4gbJEFBlHQ6H5s5kkqZb6O62OCnQCeP7CV KSNKfNr0ihDgOa3EhoV9i9k= =987m -END PGP SIGNATURE-
Re: calculation of mail traffic
This one looks really impressive :-) Thanks for suggesting this nice program! We currently use lire ( www.logreport.org ) and are totally satisfied with it. It processes many log formats ( mail, www, firewall, ... ) and generates good reports. Regards, JB Regards, Markus -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: calculation of mail traffic
Hi All, Le lundi 17 mars 2003 à 13:58, Tomàs Núñez Lirola a écrit: > > > On Mon, 2003-03-17 at 10:30, Tomàs Núñez Lirola wrote: > > > -BEGIN PGP SIGNED MESSAGE- > > > Hash: SHA1 > > > > > > I also looked for mail stats recently. I've not used any, but I found > > > some software for mail stats. > > > > > > http://www.reedmedia.net/software/sendmail_stats/ (building) > > > http://www.sawmill.net/formats/UNIX_Sendmail.html > > > > additionally Ollie cook's eximstate might be > > useful..http://www.olliecook.net/projects/eximstate/ > > it takes the stats of an exim server, and draws graphs > > of the mail from the server, enabling one to easily see > > if there are frozen mails or bounce mails in the queue > > or whatever. > > We currently use lire ( www.logreport.org ) and are totally satisfied with it. It processes many log formats ( mail, www, firewall, ... ) and generates good reports. Regards, JB pgp0.pgp Description: PGP signature
Re: calculation of mail traffic
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I forgot! I also read that qmailanalog can use sendmail logs. There is a script in qmailanalog (zsendmail) that make sendmail logs readable for qmailanalog. I read it, but I have not tried it. I'll send you comments when I try it. El Lunes, 17 de Marzo de 2003 11:30, Tomàs Núñez Lirola escribió: > I also looked for mail stats recently. I've not used any, but I found some > software for mail stats. > > http://www.reedmedia.net/software/sendmail_stats/ (building) > http://www.sawmill.net/formats/UNIX_Sendmail.html > > I'm very insterested in some way to check if any of the users is doing > spam, and I thought some mail stats would help. How do you watch if your > users spam? > > El Lunes, 17 de Marzo de 2003 09:47, Markus Welsch escribió: > > Hi all, > > > > I'd like to calculate mail traffic on a per domain base. Calculation > > should include mail sent and mail received. I've been thinking of using > > the message id as some sort of "key" for everything since it's supposed > > to be unique, right ? > > > > I've been searching for a ready made solution and haven't come accross > > something, so I started working on a solution. > > > > > > My current ideas: > > - calculate traffic for each day (via cronjob) with traffic in/out per > > domain - domains which this calculation should be done for are listed in > > accounting_domains > > > > I've built a small example program (attached as example.pl) an example > > log file is also attached. > > > > > > My knowledge of Perl is not quite well so I'm looking for help to archive > > the goal of doing this calculation. Anybody out there for help ? :-) > > > > > > > > Kind Regards, > > > > Markus Welsch -BEGIN PGP SIGNATURE- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQE+da8DGOU6HQZ81TcRAoJ6AJ4w/HLUsGeaIKbsDvX3yfhxpZrZsgCdH9Li y+OH+D5K+bVjUpnANKb1eAU= =Vo/7 -END PGP SIGNATURE-
Re: calculation of mail traffic
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Well.. I can also grep "From:" to see wich addresses are sending more mails than usual, don't I? Anyway I think some mail stats would give me this information and some more interesting information... El Lunes, 17 de Marzo de 2003 13:40, escribió: > Hi There, > > On Mon, 2003-03-17 at 10:30, Tomàs Núñez Lirola wrote: > > -BEGIN PGP SIGNED MESSAGE- > > Hash: SHA1 > > > > I also looked for mail stats recently. I've not used any, but I found > > some software for mail stats. > > > > http://www.reedmedia.net/software/sendmail_stats/ (building) > > http://www.sawmill.net/formats/UNIX_Sendmail.html > > additionally Ollie cook's eximstate might be > useful..http://www.olliecook.net/projects/eximstate/ > it takes the stats of an exim server, and draws graphs > of the mail from the server, enabling one to easily see > if there are frozen mails or bounce mails in the queue > or whatever. > > > I'm very insterested in some way to check if any of the users is doing > > spam, and I thought some mail stats would help. How do you watch if your > > users spam? > > interesting question.. > > in an ideal world, you'd have every one who you let relay through your > server authenticate against it, and then you could come up with some > stats on how many mails each user has sent. > (for i in `cat ` ; do grep -c $i ; done) > or similar. If any user's sent an abnormally large amount of mails, they > could then be loked into. > > without this, I guess the best way of figuring is to do it on a per ip > which you relay for. > > if its local users on the system, then my first suggestion might still > help, and rmuser anyone who sends spam :) > > thanks > > Andy > > > El Lunes, 17 de Marzo de 2003 09:47, Markus Welsch escribió: > > > Hi all, > > > > > > I'd like to calculate mail traffic on a per domain base. Calculation > > > should include mail sent and mail received. I've been thinking of using > > > the message id as some sort of "key" for everything since it's supposed > > > to be unique, right ? > > > > > > I've been searching for a ready made solution and haven't come accross > > > something, so I started working on a solution. > > > > > > > > > My current ideas: > > > - calculate traffic for each day (via cronjob) with traffic in/out per > > > domain - domains which this calculation should be done for are listed > > > in accounting_domains > > > > > > I've built a small example program (attached as example.pl) an example > > > log file is also attached. > > > > > > > > > My knowledge of Perl is not quite well so I'm looking for help to > > > archive the goal of doing this calculation. Anybody out there for help > > > ? :-) > > > > > > > > > > > > Kind Regards, > > > > > > Markus Welsch > > > > -BEGIN PGP SIGNATURE- > > Version: GnuPG v1.2.1 (GNU/Linux) > > > > iD8DBQE+daPXGOU6HQZ81TcRAlosAJ96QyhG9sX87J9IZGcqNnpAvLkkqgCeNaBI > > xaPO1Gt56xeEo7WjLlfMMWE= > > =02nl > > -END PGP SIGNATURE- -BEGIN PGP SIGNATURE- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQE+dcaHGOU6HQZ81TcRAgBLAJ4gbJEFBlHQ6H5s5kkqZb6O62OCnQCeP7CV KSNKfNr0ihDgOa3EhoV9i9k= =987m -END PGP SIGNATURE- -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: calculation of mail traffic
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I also looked for mail stats recently. I've not used any, but I found some software for mail stats. http://www.reedmedia.net/software/sendmail_stats/ (building) http://www.sawmill.net/formats/UNIX_Sendmail.html I'm very insterested in some way to check if any of the users is doing spam, and I thought some mail stats would help. How do you watch if your users spam? El Lunes, 17 de Marzo de 2003 09:47, Markus Welsch escribió: > Hi all, > > I'd like to calculate mail traffic on a per domain base. Calculation should > include mail sent and mail received. I've been thinking of using the > message id as some sort of "key" for everything since it's supposed to be > unique, right ? > > I've been searching for a ready made solution and haven't come accross > something, so I started working on a solution. > > > My current ideas: > - calculate traffic for each day (via cronjob) with traffic in/out per > domain - domains which this calculation should be done for are listed in > accounting_domains > > I've built a small example program (attached as example.pl) an example log > file is also attached. > > > My knowledge of Perl is not quite well so I'm looking for help to archive > the goal of doing this calculation. Anybody out there for help ? :-) > > > > Kind Regards, > > Markus Welsch -BEGIN PGP SIGNATURE- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQE+daPXGOU6HQZ81TcRAlosAJ96QyhG9sX87J9IZGcqNnpAvLkkqgCeNaBI xaPO1Gt56xeEo7WjLlfMMWE= =02nl -END PGP SIGNATURE-
Re: calculation of mail traffic
pflogsumm.pl looks like it's analyze result could be used for further analysis work. So I just have to run it once a day and over the result of pflogsumm.pl use a customized script :-) Thanks for your help! If you use postfix u can try pflogsumm ;)
Re: calculation of mail traffic
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I forgot! I also read that qmailanalog can use sendmail logs. There is a script in qmailanalog (zsendmail) that make sendmail logs readable for qmailanalog. I read it, but I have not tried it. I'll send you comments when I try it. El Lunes, 17 de Marzo de 2003 11:30, Tomàs Núñez Lirola escribió: > I also looked for mail stats recently. I've not used any, but I found some > software for mail stats. > > http://www.reedmedia.net/software/sendmail_stats/ (building) > http://www.sawmill.net/formats/UNIX_Sendmail.html > > I'm very insterested in some way to check if any of the users is doing > spam, and I thought some mail stats would help. How do you watch if your > users spam? > > El Lunes, 17 de Marzo de 2003 09:47, Markus Welsch escribió: > > Hi all, > > > > I'd like to calculate mail traffic on a per domain base. Calculation > > should include mail sent and mail received. I've been thinking of using > > the message id as some sort of "key" for everything since it's supposed > > to be unique, right ? > > > > I've been searching for a ready made solution and haven't come accross > > something, so I started working on a solution. > > > > > > My current ideas: > > - calculate traffic for each day (via cronjob) with traffic in/out per > > domain - domains which this calculation should be done for are listed in > > accounting_domains > > > > I've built a small example program (attached as example.pl) an example > > log file is also attached. > > > > > > My knowledge of Perl is not quite well so I'm looking for help to archive > > the goal of doing this calculation. Anybody out there for help ? :-) > > > > > > > > Kind Regards, > > > > Markus Welsch -BEGIN PGP SIGNATURE- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQE+da8DGOU6HQZ81TcRAoJ6AJ4w/HLUsGeaIKbsDvX3yfhxpZrZsgCdH9Li y+OH+D5K+bVjUpnANKb1eAU= =Vo/7 -END PGP SIGNATURE- -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: calculation of mail traffic
> Hi all, > > I'd like to calculate mail traffic on a per domain base. Calculation should > include mail sent and mail received. I've been thinking of using the message > id > as some sort of "key" for everything since it's supposed to be unique, right ? > > I've been searching for a ready made solution and haven't come accross > something, so I started working on a solution. > > > My current ideas: > - calculate traffic for each day (via cronjob) with traffic in/out per domain > - domains which this calculation should be done for are listed in > accounting_domains > > I've built a small example program (attached as example.pl) an example log > file > is also attached. > > > My knowledge of Perl is not quite well so I'm looking for help to archive the > goal of doing this calculation. Anybody out there for help ? :-) > > > > Kind Regards, > > Markus Welsch > If you use postfix u can try pflogsumm ;) -- Konstantin Kostadinov Fadata Ltd. --- Public PGP : http://www.fadata.bg/pgp/kostaspgp.asc --- pgpucc4WgH2D7.pgp Description: PGP signature
calculation of mail traffic
Hi all, I'd like to calculate mail traffic on a per domain base. Calculation should include mail sent and mail received. I've been thinking of using the message id as some sort of "key" for everything since it's supposed to be unique, right ? I've been searching for a ready made solution and haven't come accross something, so I started working on a solution. My current ideas: - calculate traffic for each day (via cronjob) with traffic in/out per domain - domains which this calculation should be done for are listed in accounting_domains I've built a small example program (attached as example.pl) an example log file is also attached. My knowledge of Perl is not quite well so I'm looking for help to archive the goal of doing this calculation. Anybody out there for help ? :-) Kind Regards, Markus Welsch Mar 17 07:11:43 box postfix/pickup[489]: 2C2C7C0A8: uid=1000 from= Mar 17 07:11:43 box postfix/cleanup[493]: 2C2C7C0A8: message-id=<[EMAIL PROTECTED]> Mar 17 07:11:43 box postfix/qmgr[451]: 2C2C7C0A8: from=<[EMAIL PROTECTED]>, size=435, nrcpt=7 (queue active) Mar 17 07:11:44 box postfix/smtp[495]: 2C2C7C0A8: to=<[EMAIL PROTECTED]>, relay=XXX.XXX.net[XXX.XXX.XXX.XXX], delay=1, status=sent (250 2.0.0 h2H72LG00567 Message accepted for delivery) Mar 17 07:11:44 box postfix/smtp[495]: 2C2C7C0A8: to=<[EMAIL PROTECTED]>, relay=XXX.XXX.net[XXX.XXX.XXX.XXX], delay=1, status=sent (250 2.0.0 h2H72LG00567 Message accepted for delivery) Mar 17 07:11:44 box postfix/smtp[494]: 2C2C7C0A8: to=<[EMAIL PROTECTED]>, relay=XXX.XXX.net[XXX.XXX.XXX.XXX], delay=1, status=sent (250 2.0.0 h2H72LG00566 Message accepted for delivery) Mar 17 07:11:44 box postfix/smtp[494]: 2C2C7C0A8: to=<[EMAIL PROTECTED]>, relay=XXX.XXX.net[XXX.XXX.XXX.XXX], delay=1, status=sent (250 2.0.0 h2H72LG00566 Message accepted for delivery) Mar 17 07:11:44 box postfix/smtp[494]: 2C2C7C0A8: to=<[EMAIL PROTECTED]>, relay=XXX.XXX.net[XXX.XXX.XXX.XXX], delay=1, status=sent (250 2.0.0 h2H72LG00566 Message accepted for delivery) Mar 17 07:11:44 box postfix/smtp[494]: 2C2C7C0A8: to=<[EMAIL PROTECTED]>, relay=XXX.XXX.net[XXX.XXX.XXX.XXX], delay=1, status=sent (250 2.0.0 h2H72LG00566 Message accepted for delivery) Mar 17 07:11:44 box postfix/smtp[494]: 2C2C7C0A8: to=<[EMAIL PROTECTED]>, relay=XXX.XXX.net[XXX.XXX.XXX.XXX], delay=1, status=sent (250 2.0.0 h2H72LG00566 Message accepted for delivery) #!/usr/bin/perl -w use strict; # Mar 5 13:47:15 box postfix/smtpd[873]: 8859A1FFB0: client=ns.suk.net[195.126.239.3] # Mar 5 13:47:15 box postfix/qmgr[741]: 8859A1FFB0: from=<[EMAIL PROTECTED]>, size=1987, nrcpt=1 (queue # active) # Mar 5 13:47:16 box postfix/virtual[879]: 8859A1FFB0: to=<[EMAIL PROTECTED]>, relay=virtual, delay=1, status=sent # (maildir) my $client_ip; my $mail_from; my $mail_to; my $message_id; my $message_size; my $message_time; my $nr_recipient; my %messages; open(FILE, "mail.log") or die "Couldn't open mail.log: $!; aborting"; while () { if ($_ =~ /(\S+ .* \d+:\d+:\d+) .* postfix\/smtpd\[.*\]: (\S+): client=.*\[(\d+\.\d+\.\d+\.\d+)\]$/) { $message_time = $1; $message_id = $2; $client_ip = $3; print "Message-ID: \t", $message_id,"\n"; print "Message-Time: \t", $message_time,"\n"; print "Client-IP: \t", $client_ip,"\n\n"; } elsif ($_ =~ /.* postfix\/qmgr\[.*\]: (\S+): from=<(\S+)>, size=(\d+), nrcpt=(\d+)/) { $message_id = $1; $mail_from = $2; $message_size = $3; $nr_recipient = $4; print "Message-ID: \t", $message_id,"\n"; print "Mail from: \t", $mail_from, "\n"; print "Messagesize: \t",$message_size, "\n"; print "No recipients:\t", $nr_recipient, "\n\n"; } elsif ($_ =~ /.* postfix\/.*: (\S+): to=<(\S+)>/) { $message_id = $1; $mail_to = $2; print "Message-ID: \t", $message_id,"\n"; print "Mail to: \t",$mail_to, "\n\n"; } } close(FILE);
Re: calculation of mail traffic
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I also looked for mail stats recently. I've not used any, but I found some software for mail stats. http://www.reedmedia.net/software/sendmail_stats/ (building) http://www.sawmill.net/formats/UNIX_Sendmail.html I'm very insterested in some way to check if any of the users is doing spam, and I thought some mail stats would help. How do you watch if your users spam? El Lunes, 17 de Marzo de 2003 09:47, Markus Welsch escribió: > Hi all, > > I'd like to calculate mail traffic on a per domain base. Calculation should > include mail sent and mail received. I've been thinking of using the > message id as some sort of "key" for everything since it's supposed to be > unique, right ? > > I've been searching for a ready made solution and haven't come accross > something, so I started working on a solution. > > > My current ideas: > - calculate traffic for each day (via cronjob) with traffic in/out per > domain - domains which this calculation should be done for are listed in > accounting_domains > > I've built a small example program (attached as example.pl) an example log > file is also attached. > > > My knowledge of Perl is not quite well so I'm looking for help to archive > the goal of doing this calculation. Anybody out there for help ? :-) > > > > Kind Regards, > > Markus Welsch -BEGIN PGP SIGNATURE- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQE+daPXGOU6HQZ81TcRAlosAJ96QyhG9sX87J9IZGcqNnpAvLkkqgCeNaBI xaPO1Gt56xeEo7WjLlfMMWE= =02nl -END PGP SIGNATURE- -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: calculation of mail traffic
pflogsumm.pl looks like it's analyze result could be used for further analysis work. So I just have to run it once a day and over the result of pflogsumm.pl use a customized script :-) Thanks for your help! If you use postfix u can try pflogsumm ;) -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: calculation of mail traffic
> Hi all, > > I'd like to calculate mail traffic on a per domain base. Calculation should > include mail sent and mail received. I've been thinking of using the message id > as some sort of "key" for everything since it's supposed to be unique, right ? > > I've been searching for a ready made solution and haven't come accross > something, so I started working on a solution. > > > My current ideas: > - calculate traffic for each day (via cronjob) with traffic in/out per domain > - domains which this calculation should be done for are listed in accounting_domains > > I've built a small example program (attached as example.pl) an example log file > is also attached. > > > My knowledge of Perl is not quite well so I'm looking for help to archive the > goal of doing this calculation. Anybody out there for help ? :-) > > > > Kind Regards, > > Markus Welsch > If you use postfix u can try pflogsumm ;) -- Konstantin Kostadinov Fadata Ltd. --- Public PGP : http://www.fadata.bg/pgp/kostaspgp.asc --- pgp0.pgp Description: PGP signature
calculation of mail traffic
Hi all, I'd like to calculate mail traffic on a per domain base. Calculation should include mail sent and mail received. I've been thinking of using the message id as some sort of "key" for everything since it's supposed to be unique, right ? I've been searching for a ready made solution and haven't come accross something, so I started working on a solution. My current ideas: - calculate traffic for each day (via cronjob) with traffic in/out per domain - domains which this calculation should be done for are listed in accounting_domains I've built a small example program (attached as example.pl) an example log file is also attached. My knowledge of Perl is not quite well so I'm looking for help to archive the goal of doing this calculation. Anybody out there for help ? :-) Kind Regards, Markus Welsch Mar 17 07:11:43 box postfix/pickup[489]: 2C2C7C0A8: uid=1000 from= Mar 17 07:11:43 box postfix/cleanup[493]: 2C2C7C0A8: message-id=<[EMAIL PROTECTED]> Mar 17 07:11:43 box postfix/qmgr[451]: 2C2C7C0A8: from=<[EMAIL PROTECTED]>, size=435, nrcpt=7 (queue active) Mar 17 07:11:44 box postfix/smtp[495]: 2C2C7C0A8: to=<[EMAIL PROTECTED]>, relay=XXX.XXX.net[XXX.XXX.XXX.XXX], delay=1, status=sent (250 2.0.0 h2H72LG00567 Message accepted for delivery) Mar 17 07:11:44 box postfix/smtp[495]: 2C2C7C0A8: to=<[EMAIL PROTECTED]>, relay=XXX.XXX.net[XXX.XXX.XXX.XXX], delay=1, status=sent (250 2.0.0 h2H72LG00567 Message accepted for delivery) Mar 17 07:11:44 box postfix/smtp[494]: 2C2C7C0A8: to=<[EMAIL PROTECTED]>, relay=XXX.XXX.net[XXX.XXX.XXX.XXX], delay=1, status=sent (250 2.0.0 h2H72LG00566 Message accepted for delivery) Mar 17 07:11:44 box postfix/smtp[494]: 2C2C7C0A8: to=<[EMAIL PROTECTED]>, relay=XXX.XXX.net[XXX.XXX.XXX.XXX], delay=1, status=sent (250 2.0.0 h2H72LG00566 Message accepted for delivery) Mar 17 07:11:44 box postfix/smtp[494]: 2C2C7C0A8: to=<[EMAIL PROTECTED]>, relay=XXX.XXX.net[XXX.XXX.XXX.XXX], delay=1, status=sent (250 2.0.0 h2H72LG00566 Message accepted for delivery) Mar 17 07:11:44 box postfix/smtp[494]: 2C2C7C0A8: to=<[EMAIL PROTECTED]>, relay=XXX.XXX.net[XXX.XXX.XXX.XXX], delay=1, status=sent (250 2.0.0 h2H72LG00566 Message accepted for delivery) Mar 17 07:11:44 box postfix/smtp[494]: 2C2C7C0A8: to=<[EMAIL PROTECTED]>, relay=XXX.XXX.net[XXX.XXX.XXX.XXX], delay=1, status=sent (250 2.0.0 h2H72LG00566 Message accepted for delivery) #!/usr/bin/perl -w use strict; # Mar 5 13:47:15 box postfix/smtpd[873]: 8859A1FFB0: client=ns.suk.net[195.126.239.3] # Mar 5 13:47:15 box postfix/qmgr[741]: 8859A1FFB0: from=<[EMAIL PROTECTED]>, size=1987, nrcpt=1 (queue # active) # Mar 5 13:47:16 box postfix/virtual[879]: 8859A1FFB0: to=<[EMAIL PROTECTED]>, relay=virtual, delay=1, status=sent # (maildir) my $client_ip; my $mail_from; my $mail_to; my $message_id; my $message_size; my $message_time; my $nr_recipient; my %messages; open(FILE, "mail.log") or die "Couldn't open mail.log: $!; aborting"; while () { if ($_ =~ /(\S+ .* \d+:\d+:\d+) .* postfix\/smtpd\[.*\]: (\S+): client=.*\[(\d+\.\d+\.\d+\.\d+)\]$/) { $message_time = $1; $message_id = $2; $client_ip = $3; print "Message-ID: \t", $message_id,"\n"; print "Message-Time: \t", $message_time,"\n"; print "Client-IP: \t", $client_ip,"\n\n"; } elsif ($_ =~ /.* postfix\/qmgr\[.*\]: (\S+): from=<(\S+)>, size=(\d+), nrcpt=(\d+)/) { $message_id = $1; $mail_from = $2; $message_size = $3; $nr_recipient = $4; print "Message-ID: \t", $message_id,"\n"; print "Mail from: \t", $mail_from, "\n"; print "Messagesize: \t",$message_size, "\n"; print "No recipients:\t", $nr_recipient, "\n\n"; } elsif ($_ =~ /.* postfix\/.*: (\S+): to=<(\S+)>/) { $message_id = $1; $mail_to = $2; print "Message-ID: \t", $message_id,"\n"; print "Mail to: \t",$mail_to, "\n\n"; } } close(FILE);