View Full Version : loggin data use to several set IP's?
edge
31st March 2006, 14:14
Is there anyway of logging data use to several set IP's?
I'm coding a small mail forward script, that also needs to keep track of the ammount of data send to the owners IP's
I guess it needs to do the logging through the firewall.
Can it be done?
The OS here is Fedora RC4 with (at the moment) the firewall from ISPconfig.
falko
31st March 2006, 19:05
Can you explain in more details what you want to do with this script?
edge
31st March 2006, 21:14
Can you explain in more details what you want to do with this script?
Basicly it's like this:
Owner of mailserver with domain A (with a static IP, that I know) can see howmuch data (bandwith) of mail has been forwarded to his server within one month.
Owner of mailserver with domain B (with a static IP, that I know) can see howmuch data (bandwith) of mail has been forwarded to his server within one month.
Owner of mailserver with domain C (with a static IP, that I know) can see howmuch data (bandwith) of mail has been forwarded to his server within one month.
ect ect ect.
The mail forward script will make use of the 'postfix' transport table, so the user / owner of (domain a, domain b, domain c) do not really exist on the server. They are 'hard coded' in the transport file
falko
1st April 2006, 13:32
So you have 4 servers: one that does the forwarding, and three servers for three customers?
The easiest might be to parse the mail log on the forwarding server. Maybe it's also possible to implement a filter in /etc/postfix/master.cf that does the accounting...
edge
2nd April 2006, 14:34
So you have 4 servers: one that does the forwarding, and three servers for three customers?
The easiest might be to parse the mail log on the forwarding server. Maybe it's also possible to implement a filter in /etc/postfix/master.cf that does the accounting...
I found this nice little script (pflogsumm.pl) doing exactly what I need :-)
http://jimsun.linxnet.com/postfix_contrib.html
vBulletin® v3.8.4, Copyright ©2000-2010, Jelsoft Enterprises Ltd.