The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Sending the e-mail statistics to an e-mail address

Discussion in 'E-mail Discussions' started by ronaldoo, Jul 9, 2009.

  1. ronaldoo

    ronaldoo Active Member

    Joined:
    Jun 16, 2009
    Messages:
    33
    Likes Received:
    0
    Trophy Points:
    6
    Hello!
    How can I configure my Exim to send the E-mail Statistics (Main >> Email >> View Mail Statistics) to an e-mail address?
    Thank you!
     
  2. brianell

    brianell Member

    Joined:
    Jul 27, 2009
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    Do you have shell or root access to the server? If so I have a cron that will work for you.

    Brian
    Zimbabwe
     
  3. ronaldoo

    ronaldoo Active Member

    Joined:
    Jun 16, 2009
    Messages:
    33
    Likes Received:
    0
    Trophy Points:
    6

    Yes, I have shell root access to the server!
    Thank you!
     
  4. brianell

    brianell Member

    Joined:
    Jul 27, 2009
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    My exim_mainlog commences at 4.02am every Sunday.

    So I run a cron as follows to push the stats in a file called MailStats.
    Code:
    01 4 * * * /usr/sbin/eximstats -ne -nr -nt /var/log/exim_mainlog > MailStats
    I have a small file called 4am which has the single line below in it. This sends me a mail populated with the contents of file MailStats

    Code:
    mail -s "Domain Server Mail Traffic as from 4a.m. Sunday to 4a.m. today" me@domain.com < MailStats
    Then I run a cron as follows

    Code:
    02 4 * * * ./4am
    Rough, but reliable, I am a noob in 'nix, this works for me.

    Hope this helps
     
  5. ronaldoo

    ronaldoo Active Member

    Joined:
    Jun 16, 2009
    Messages:
    33
    Likes Received:
    0
    Trophy Points:
    6
    Humm, I'll try it and reply again later. Thank you!
     
  6. ronaldoo

    ronaldoo Active Member

    Joined:
    Jun 16, 2009
    Messages:
    33
    Likes Received:
    0
    Trophy Points:
    6
    brianell, thank you so much! I was implemented your solution and all are working fine now!
    So, how can I sent the SPAM statistics too ?
    Thanks!
     
  7. brianell

    brianell Member

    Joined:
    Jul 27, 2009
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    I don't do this myself, but I would run the following

    Code:
    01 4 * * * /usr/sbin/eximstats -ne -nr -nt /var/log/exim_rejectlog > RejectStats
    and then set a cron to mail me the contents of RejectStats at an appropraite time.

    Regards
    Brian
     
Loading...

Share This Page