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.
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
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