loggin data use to several set IP's?

Discussion in 'Server Operation' started by edge, Mar 31, 2006.

  1. edge

    edge HowtoForge Supporter

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

    falko Super Moderator

    Can you explain in more details what you want to do with this script?
     
  3. edge

    edge HowtoForge Supporter

    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
     
    Last edited: Mar 31, 2006
  4. falko

    falko Super Moderator

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

    edge HowtoForge Supporter

    I found this nice little script (pflogsumm.pl) doing exactly what I need :)
    http://jimsun.linxnet.com/postfix_contrib.html
     

Share This Page