Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

How to find out the last X emails sent.

Discussion in 'E-mail Discussion' started by SuperBaby, May 14, 2007.

  1. SuperBaby

    SuperBaby Well-Known Member

    Joined:
    Nov 27, 2003
    Messages:
    337
    Likes Received:
    0
    Trophy Points:
    166
    Location:
    Thailand
    cPanel Access Level:
    Website Owner
    Twitter:
    I am using RH9 + WHM/cPanel.

    Is there is way to find out (from WHM or shell) the details of the last x number of emails sent?

    Sometimes I see my server load is very high and the activity related is exim and clamscan. I just want to find out whether the emails being scanned is from my hosted customers or some hacker's activities.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. david510

    david510 Well-Known Member

    Joined:
    Aug 22, 2004
    Messages:
    473
    Likes Received:
    0
    Trophy Points:
    166
    You may run the following script from the shell to see the last 100 mails successfully delivered from the server and mails delivered into the server.


    Last 100 Mails successfully delivered through the mail server
    Code:
     sed -n '/=>/p' /var/log/exim_mainlog |   sed -e :a -e '$q;N;101,$D;ba' 
    

    Last 100 Mails successfully sent through the mail server
    Code:
     sed -n '/<=/p' /var/log/exim_mainlog |   sed -e :a -e '$q;N;101,$D;ba'
    
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. SuperBaby

    SuperBaby Well-Known Member

    Joined:
    Nov 27, 2003
    Messages:
    337
    Likes Received:
    0
    Trophy Points:
    166
    Location:
    Thailand
    cPanel Access Level:
    Website Owner
    Twitter:
    Thank you. This is such an important piece of information for me. Very useful.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. david510

    david510 Well-Known Member

    Joined:
    Aug 22, 2004
    Messages:
    473
    Likes Received:
    0
    Trophy Points:
    166
    You are welcome :)
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice