How do you monitor email usage?

energizedit

Well-known member
Registered
Joined
Dec 13, 2016
Messages
259
Points
18
How do you monitor email usage? What tools do you use to make sure your server is not sending spam? Besides the builtin mailqueue and csf how do others determine spam is being sent?
 

LJSHost

Well-known member
Hosting Provider
Registered
Joined
Jul 5, 2016
Messages
1,031
Points
63
For me every day starts like this: Make coffee, check mail queues and delivery reports.
I'm sure you can get many automated tools for watching mail delivery reports etc but it only takes a quick check of the mail logs to notice anything out of the normal.

I have a couple of scripts I wrote to grep mail logs and colorize abnormal activity for easy viewing :D

Mail transport is something you need to an eye on at all times, more so with new customers.
 

Vishnu

Active member
Registered
Joined
Jan 3, 2017
Messages
77
Points
8
You can check the Number of mails being sent by an PHP Script by using the following command :

grep "cwd=" /var/log/exim_mainlog|awk '{for(i=1;i<=10;i++){print $i}}'|sort| uniq -c|grep cwd|sort -n

It will show up the Path of Mail directory

Example :

10000 cwd=/home/username/public_html/direc/

If you see large amount of mails you can check the directory for any spam scripts
 

energizedit

Well-known member
Registered
Joined
Dec 13, 2016
Messages
259
Points
18
Very nice code snippet there.

You can check the Number of mails being sent by an PHP Script by using the following command :

grep "cwd=" /var/log/exim_mainlog|awk '{for(i=1;i<=10;i++){print $i}}'|sort| uniq -c|grep cwd|sort -n

It will show up the Path of Mail directory

Example :

10000 cwd=/home/username/public_html/direc/

If you see large amount of mails you can check the directory for any spam scripts
 

LJSHost

Well-known member
Hosting Provider
Registered
Joined
Jul 5, 2016
Messages
1,031
Points
63
This is a useful script for monitoring message count by sender I like to use.

Show the top senders by message count on a cPanel server

Code:
grep "<=.*P=local" /var/log/exim_mainlog | awk '{print $6}' | sort | uniq -c | sort -nr | head -5 
eximstats /var/log/exim_mainlog | grep -A7 "Top senders by message count" | tail -5 | awk '{print $1,$NF}'
 
Latest Threads

Latest Hosting OffersNew Reviews

Sponsors

Tag Cloud

You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an alternative browser.

Top