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!

Locate activity by subject with Exim

Discussion in 'E-mail Discussion' started by khalled, Jan 8, 2015.

  1. khalled

    khalled Active Member

    Joined:
    Jan 8, 2011
    Messages:
    34
    Likes Received:
    0
    Trophy Points:
    56
    we run the following command to locate duplicate subjects from Exim mail log

    PHP:
    awk -F"T=\"" '/<=/ {print $2}' /var/log/exim_mainlog cut -d\" -f1 | sort | uniq -c | sort -n

    what if i want run this command to give me feedback for only the last day or last two days
     
  2. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,802
    Likes Received:
    1,896
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello :)

    The "tail" command may help. EX:

    Code:
    tail -2000 /var/log/exim_mainlog | awk -F"T=\"" '/<=/ {print $2}' | cut -d\" -f1 | sort | uniq -c | sort -n 
    Simply change "2000" to the value of your preference. It's not by date, but selecting a specific number of lines will reduce the amount of information that's checked. Otherwise, Google search results show several methods of filtering awk output with dates/times.

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. khalled

    khalled Active Member

    Joined:
    Jan 8, 2011
    Messages:
    34
    Likes Received:
    0
    Trophy Points:
    56
    very thanks
     
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