LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 06-05-2009, 09:47 AM   #1
cioannou
LQ Newbie
 
Registered: Apr 2005
Location: Athens-Greece
Distribution: Mandrake 10.1CE
Posts: 28

Rep: Reputation: 15
Real time Postfix & Dovecot monitor


Is there any application (preferrably web) that can monitor in real time what is going on in my mail server?

Who is sending to who
Who is receiving
List of incoming/sent mail
Dovecot mailbox size
Monitor postfix queue
etc.

thanks
 
Old 06-06-2009, 10:08 PM   #2
10speed705
Member
 
Registered: May 2009
Location: Ontario Canada
Distribution: debian
Posts: 56

Rep: Reputation: 17
There is a program called mailgratph what it does is graph stats based off the mailq and other queues, if i remember correctly (it has been a while) it will also graph different things like mail sent deferred and so on. it graphs to an html that can be accessed through a web browser. pretty nifty tool. also I am going to be wringing a script to output "cat /var/log/mail.log" to senders and receivers and to count. this is going to be done probably just using awk commands. let me know if this doesn't do the trick
 
Old 06-06-2009, 11:19 PM   #3
leftblank
LQ Newbie
 
Registered: Aug 2006
Location: Outside of Myself
Distribution: Ubuntu, Debian, FreeBSD, CentOS, Fedora, OpenBSD
Posts: 14

Rep: Reputation: 0
anything that outputs a log can be watched with:<br>
tail -fv /var/log/mail.log<br>
substitute the name before ".log"<br>

There's also:<br>
http://www.howtoforge.com/mail_stati...raph_pflogsumm
 
Old 06-08-2009, 04:04 AM   #4
cioannou
LQ Newbie
 
Registered: Apr 2005
Location: Athens-Greece
Distribution: Mandrake 10.1CE
Posts: 28

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by 10speed705 View Post
There is a program called mailgratph what it does is graph stats based off the mailq and other queues, if i remember correctly (it has been a while) it will also graph different things like mail sent deferred and so on. it graphs to an html that can be accessed through a web browser. pretty nifty tool. also I am going to be wringing a script to output "cat /var/log/mail.log" to senders and receivers and to count. this is going to be done probably just using awk commands. let me know if this doesn't do the trick
Thanks, I have installed that already but it't too "summarized" , I would like more details. Especially per user.
 
Old 06-08-2009, 04:06 AM   #5
cioannou
LQ Newbie
 
Registered: Apr 2005
Location: Athens-Greece
Distribution: Mandrake 10.1CE
Posts: 28

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by leftblank View Post
anything that outputs a log can be watched with:<br>
tail -fv /var/log/mail.log<br>
substitute the name before ".log"<br>
This is what we currently do, but it's not very helpful.

Thanks, will take a look at it
 
Old 09-04-2017, 09:05 AM   #6
ychaouche
Member
 
Registered: Mar 2017
Distribution: Mint, Debian, Q4OS, Mageia, KDE Neon
Posts: 369
Blog Entries: 1

Rep: Reputation: 49
Reviving a very old post. Just wanted to share a simple script I wrote for the purpose of monitoring failed logins in case it'd be helpful to anyone. https://github.com/ychaouche/mailcop

You can run mailcop to watch the logs in realtime or mailcop-mailer (in a cron) to give you daily stats.

Here's an example output of the mailer

Code:
Mailcop
=======
Statistiques des dernières attaques sur notre serveur de messagerie
Début : Aug 27 06:26:24
Fin   : Aug 27 16:37:47


Top 10 des pays
---------------
     10  Brazil
      9  China
      6  Mexico
      5  Colombia
      5  Chile
      4  United States
      3  Vietnam
      3  Taiwan
      3  South Africa
      2  Turkey



Top 10 des addresses IP
-----------------------
192.168.100.82    96 IP Address not found
10.10.10.19       38 IP Address not found
52.169.26.62       6 US, United States
41.73.125.74       5 ML, Mali  
93.149.107.116     4 IT, Italy  
80.147.168.27      4 DE, Germany  
59.100.16.223      4 AU, Australia  
37.211.146.162     4 QA, Qatar  
37.189.246.168     4 PT, Portugal  
31.149.66.65       4 NL, Netherlands  



Top 10 des logins utilisés
--------------------------
     96 application@domain.tld
     15 n.chabi@algrian-radio.dz
     10 radiobahdja16@gmail.com
      4 dafchaine1@algerien-radio.dz
      3 test
      3 postmaster
      3 dafchaine1@eprs.dz
      2 student
      2 spam
      2 sales



Dernières attaques
------------------
Aug 27 16:18:00 training                          190.147.156.214:
Aug 27 16:21:25 application@domain.tld            192.168.100.82:
Aug 27 16:21:25 student                           190.67.161.242:
Aug 27 16:24:28 ftpuser                           86.35.227.122:
Aug 27 16:27:43 application@domain.tld            192.168.100.82:
Aug 27 16:27:56 webmaster                         41.180.72.44:
Aug 27 16:31:28 audit                             201.131.240.134:
Aug 27 16:34:01 application@domain.tld            192.168.100.82:
Aug 27 16:34:27 internet                          52.174.4.62:
Aug 27 16:37:47 service                           80.147.168.27:



Les 10 dernières addresses bloquées
-----------------------------------
 pkts bytes target     prot opt in     out     source               destination         
    1    60 reject     all  --  *      *       222.162.70.249       0.0.0.0/0           
    0     0 reject     all  --  *      *       60.216.106.162       0.0.0.0/0           
    0     0 reject     all  --  *      *       118.163.58.117       0.0.0.0/0           
    0     0 reject     all  --  *      *       218.62.67.138        0.0.0.0/0           
    0     0 reject     all  --  *      *       122.146.88.186       0.0.0.0/0           
    0     0 reject     all  --  *      *       211.141.174.226      0.0.0.0/0           
    0     0 reject     all  --  *      *       61.163.231.213       0.0.0.0/0           
    0     0 reject     all  --  *      *       221.228.229.49       0.0.0.0/0           
   21  1064 reject     all  --  *      *       200.49.145.161       0.0.0.0/0

And here's an example output of the live monitoring tool

Code:
root@messagerie[10.10.10.19] ~/SCRIPTS/MAIL # ./mailcop
Aug 22 18:06:02 a.chaouche@mydomain.tld             221.7.96.91:
Aug 22 18:06:07 adiomitidjann@mydomain.tld          58.20.55.71:
Aug 22 18:06:08 adioelbahdja@mydomain.tld           218.107.46.228:
Aug 22 18:06:24 a.chaouche                          124.207.250.89:
Aug 22 18:06:30 adioelbahdja                        63.227.77.160:
Aug 22 18:06:31 adiomitidjann                       221.215.106.218:
Aug 22 18:07:08 jon                                 105.226.222.70:
Aug 22 18:07:21 aisonradio@mydomain.tld             111.1.89.230:
Aug 22 18:07:31 aine3@mydomain.tld                  36.34.121.162:
Aug 22 18:07:44 aisonradio                          222.137.252.18:
Aug 22 18:07:44 a.chaouche@mydomain.tld             183.234.60.38:
 
Old 08-01-2022, 05:57 AM   #7
ychaouche
Member
 
Registered: Mar 2017
Distribution: Mint, Debian, Q4OS, Mageia, KDE Neon
Posts: 369
Blog Entries: 1

Rep: Reputation: 49
Exclamation Reviving again

So over the time I wrote simple (often one liner) scripts to watch my mail server.
Take a look at this imgur album where I keep
one desktop to monitor my mail server activity.

I haven't taken the time to make the scripts generic enough to share for public usage,
but if there's interest I might spare some time for that.
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Real time log of postfix ]SK[ Linux - Newbie 2 09-01-2008 11:55 AM
how to configure dovecot&sendmail&postfix to accept other domain email? hocheetiong Linux - Server 3 12-24-2007 03:55 AM
Real Time Clock & Real Time Timer jiramak Linux - Newbie 1 09-05-2007 06:43 PM
please help: trouble logging into pop3 with postfix & dovecot theblockster Linux - Networking 3 11-16-2006 12:20 PM
mysql, postfix, dovecot & spamassassin dadams Fedora 1 10-18-2004 08:40 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 09:22 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration