Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > HOWTO-Related Questions

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 3rd September 2012, 00:05
DaleHutch DaleHutch is offline
Member
 
Join Date: Apr 2010
Location: 39.943066 , -104.902954
Posts: 43
Thanks: 3
Thanked 4 Times in 4 Posts
Default Mailgraph/pflogsumm Ubuntu 12.04

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?

Thanks!!

DH
Reply With Quote
Sponsored Links
  #2  
Old 3rd September 2012, 16:01
DaleHutch DaleHutch is offline
Member
 
Join Date: Apr 2010
Location: 39.943066 , -104.902954
Posts: 43
Thanks: 3
Thanked 4 Times in 4 Posts
Default

I've got some updated information...

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

mail.log
mail.log.1
mail.log.2.gz
mail.log.3.gz
mail.log.4.gz

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

Any suggestions?

Thanks!
Reply With Quote
  #3  
Old 3rd September 2012, 17:52
DaleHutch DaleHutch is offline
Member
 
Join Date: Apr 2010
Location: 39.943066 , -104.902954
Posts: 43
Thanks: 3
Thanked 4 Times in 4 Posts
 
Default

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.

Code:
perl /usr/sbin/pflogsumm -d yesterday /var/log/mail.log | mail -s "Mail Statastics" dalehutch@hutchtechnologies.com
I then put that into your postfix_report.sh
Code:
#!/bin/sh
#PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
#gunzip /var/log/mail.log.2.gz

perl /usr/sbin/pflogsumm -d yesterday /var/log/mail.log | sendmail dalehutch@hutchtechnologies.com

#gzip /var/log/mail.log.2
exit 0
In the CRON job I put this.

Code:
/usr/local/sbin/postfix_report.sh
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!
Reply With Quote
The Following User Says Thank You to DaleHutch For This Useful Post:
falko (4th September 2012)
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to install SVN on Ubuntu 12.04? rygotype Installation/Configuration 0 15th August 2012 00:24
Ubuntu 12.04 "waiting for network configuration" on boot orasis Installation/Configuration 10 25th June 2012 21:19
Problem send/receive Courier+Postfix+Squirrelmail Pirk Installation/Configuration 2 21st May 2010 13:26
Connection timed out on intermail outgoing mails gouravgarg Server Operation 6 5th March 2010 20:31
Unbale to login to Postfix from webmail wasimriz HOWTO-Related Questions 5 6th April 2009 13:49


All times are GMT +2. The time now is 02:48.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.