Mailgraph/pflogsumm Ubuntu 12.04

Discussion in 'HOWTO-Related Questions' started by DaleHutch, Sep 3, 2012.

  1. DaleHutch

    DaleHutch Member

    Greetings Falko!!!

    I have a quick question. I recently wanted to install and configure the mailgraph.cgi and the pflogsumm utility on my Ubuntu Server (v12.04)

    I came across your old "How To" Postfix Monitoring With Mailgraph And pflogsumm On Debian Lenny

    Mailgraph installed and executed without any issues. Neat application!

    I followed the pflogsumm section and it appears it worked but the E-mail was blank.

    Question: Do I need to wait for the daily cron job (/etc/cron.daily) to cycle and create the zipped file?


  2. DaleHutch

    DaleHutch Member

    I've got some updated information...

    It appears the cron jobs are not creating the mail.log.0.gz . I've got others..


    I ran the script against mail.log.1 and I still get a blank E-mail

    Any suggestions?

  3. DaleHutch

    DaleHutch Member

    I think I got it working!

    I had to make a few adjustments to the CRON job and the script..

    What I did is leave out the compression all together. I then instructed PFLOGSUMM to look at mail.log and pull yesterday's information.

    perl /usr/sbin/pflogsumm -d yesterday /var/log/mail.log | mail -s "Mail Statastics" [email protected]
    I then put that into your
    #gunzip /var/log/mail.log.2.gz
    perl /usr/sbin/pflogsumm -d yesterday /var/log/mail.log | sendmail [email protected]
    #gzip /var/log/mail.log.2
    exit 0
    In the CRON job I put this.

    I took off the "&> /dev/null" it would send a blank E-mail

    Now all I have to do is add a few options to include a subject.

    Thank you Falko!

    Without all your tutorials I would not have been able to figure it out!

Share This Page