Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 6 of 6
  1. #1
    Member
    Join Date
    May 2006
    Location
    Johannesburg, South Africa
    Posts
    944
    cPanel/Enkompass Access Level

    Root Administrator

    Default how to track email sent from a specific user for the last month?

    I have a strange request.

    A client of ours wants to know if I can give him a list of emails that was sent to, by one of their employes who's running a sideline business from their office. They need the info as evidence.

    How exactly can I retrieve this?
    • cPanel :: Fantastico :: RVSkin :: WHM :: ModernBill
    • Reseller Hosting :: SSL Certificates :: Domain Registrations :: Affiliate Program
    • Blog Hosting :: CMS Hosting :: Forum Hosting :: E-Commerce Hosting
    SoftDux- The Leaders in Software
    Use the coupon: cpanel-06 to get 20% off our packages

  2. #2
    Member LiNUxG0d's Avatar
    Join Date
    Jun 2003
    Location
    Gatineau, Quebec, Canada
    Posts
    206

    Default

    Quote Originally Posted by SoftDux View Post
    I have a strange request.

    A client of ours wants to know if I can give him a list of emails that was sent to, by one of their employes who's running a sideline business from their office. They need the info as evidence.

    How exactly can I retrieve this?
    Hey SoftDux,

    It really all depends on the log_selector options you've been using with exim.conf. By default, there are no selectors and so, you can't really track subjects. I use the following in my exim.conf:

    log_selector = +arguments +subject

    From the WHM, add them in the "Exim Configuration Editor" under the "Advanced Editor" button. Just paste that in the first box at the top.

    If you just so happen to have installed some log_selectors, then you can issue the following command:

    Code:
    root@server [~]# exigrep "bad_person@theirdomain.com" /var/log/exim_mainlog
    Which returns something along these lines:

    Code:
    2008-04-15 09:59:02 1Jllgc-0000GC-60 <= bad_person@theirdomain.com H=localhost (your.host.name) [127.0.0.1] P=esmtpa A=fixed_login:bad_person@theirdomain.com S=1301 id=57338.1.2.3.4.1208267942.squirrel@your.host.name T="This is their subject."
    2008-04-15 09:59:03 1Jllgc-0000GC-60 => desination_user@domain.com R=lookuphost T=remote_smtp H=b.mx.mail.yahoo.com [66.196.97.250]
    2008-04-15 09:59:03 1Jllgc-0000GC-60 Completed
    
    2008-04-15 10:01:42 1JlljC-0000NZ-Nu <= bad_person@theirdomain.com H=localhost (your.host.name) [127.0.0.1] P=esmtpa A=fixed_login:bad_person@theirdomain.com S=1285 id=57350.1.2.3.4.1208268102.squirrel@your.host.name T="This is their subject."
    2008-04-15 10:02:04 1JlljC-0000NZ-Nu => desination_user@domain.com R=lookuphost T=remote_smtp H=g.mx.mail.yahoo.com [206.190.53.191]
    2008-04-15 10:02:04 1JlljC-0000NZ-Nu Completed
    The above basically shows "bad_person@theirdomain.com" (the person you want to trap) sent mail in to the queue (<=), they logged in using squirrelmail@your.host.name (your server using webmail) and sent something with subject "This is their subject." to destination_user@domain.com.

    Without the proper selectors though, you can still issue the command, but you won't have subject and other stuff, so it may be hard to prove it wasn't work related.

    Good luck, let me know if you have any follow-up questions!

    Warmest regards,
    http://www.okteck.com/
    The best web hosting, reseller hosting and dedicated server packages!

  3. #3
    Member
    Join Date
    Aug 2004
    Posts
    472

    Default

    To get last 30 days result add this to the command.

    Code:
    exiqgrep -y 2592000 "bad_person@theirdomain.com" /var/log/exim_mainlog
    www.cliffsupport.com
    i WebManager | Access WHM from your iPhone

  4. #4
    Member
    Join Date
    May 2006
    Location
    Johannesburg, South Africa
    Posts
    944
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    Quote Originally Posted by LiNUxG0d View Post
    Hey SoftDux,

    It really all depends on the log_selector options you've been using with exim.conf. By default, there are no selectors and so, you can't really track subjects. I use the following in my exim.conf:

    log_selector = +arguments +subject

    From the WHM, add them in the "Exim Configuration Editor" under the "Advanced Editor" button. Just paste that in the first box at the top.

    Without the proper selectors though, you can still issue the command, but you won't have subject and other stuff, so it may be hard to prove it wasn't work related.

    Good luck, let me know if you have any follow-up questions!

    Warmest regards,
    Thanx, I've added the code above to Exim, so now we can monitor it over the next few weeks.
    • cPanel :: Fantastico :: RVSkin :: WHM :: ModernBill
    • Reseller Hosting :: SSL Certificates :: Domain Registrations :: Affiliate Program
    • Blog Hosting :: CMS Hosting :: Forum Hosting :: E-Commerce Hosting
    SoftDux- The Leaders in Software
    Use the coupon: cpanel-06 to get 20% off our packages

  5. #5
    Member
    Join Date
    May 2006
    Location
    Johannesburg, South Africa
    Posts
    944
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    Quote Originally Posted by david510 View Post
    To get last 30 days result add this to the command.

    Code:
    exiqgrep -y 2592000 "bad_person@theirdomain.com" /var/log/exim_mainlog
    Hi David

    That command gives me a list of all the emails for that period, is it supposed todo that?
    • cPanel :: Fantastico :: RVSkin :: WHM :: ModernBill
    • Reseller Hosting :: SSL Certificates :: Domain Registrations :: Affiliate Program
    • Blog Hosting :: CMS Hosting :: Forum Hosting :: E-Commerce Hosting
    SoftDux- The Leaders in Software
    Use the coupon: cpanel-06 to get 20% off our packages

  6. #6
    Member LiNUxG0d's Avatar
    Join Date
    Jun 2003
    Location
    Gatineau, Quebec, Canada
    Posts
    206

    Default

    Quote Originally Posted by SoftDux View Post
    Thanx, I've added the code above to Exim, so now we can monitor it over the next few weeks.
    Cool stuff SoftDux,

    Let me know if you have any follow-up Q's I can help you with. Any time man!

    Warmest regards,
    http://www.okteck.com/
    The best web hosting, reseller hosting and dedicated server packages!

Similar Threads & Tags
Similar threads

  1. Replies: 16
    Last Post: 04-11-2011, 12:37 PM
  2. Prevent user to send email to a specific domain
    By bsasninja in forum E-mail Discussions
    Replies: 1
    Last Post: 09-04-2009, 04:47 PM
  3. Block Specific Email to Specific User
    By fuzzie in forum E-mail Discussions
    Replies: 1
    Last Post: 08-09-2007, 06:13 PM
  4. Security Problem? How To Track User Traffic?
    By bmcpanel in forum cPanel and WHM Discussions
    Replies: 3
    Last Post: 09-04-2004, 04:30 AM
  5. Track email sent
    By jameshsi in forum cPanel and WHM Discussions
    Replies: 3
    Last Post: 08-05-2004, 06:46 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube