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.

Custom exim_mainlog for certain domains

Discussion in 'E-mail Discussions' started by sh4ka, Jan 26, 2009.

  1. sh4ka

    sh4ka Well-Known Member

    Joined:
    May 12, 2005
    Messages:
    442
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    US
    cPanel Access Level:
    DataCenter Provider
    Hello,

    I was wondering... is there a way, or is it possible to set a custom exim_mainlog that logs incoming and outgoing emails, only for certain domains? (not all domains, as the exim_mainlog works actually in cPanel servers).

    Such as.. /var/log/domain.com_exim_mainlog

    Thanks.
     
  2. sh4ka

    sh4ka Well-Known Member

    Joined:
    May 12, 2005
    Messages:
    442
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    US
    cPanel Access Level:
    DataCenter Provider
    Any ideas please?
     
  3. Alejandro P

    Alejandro P Well-Known Member

    Joined:
    Apr 6, 2007
    Messages:
    53
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Root Administrator
    You might do this by batch processing over the exim logs, something like this

    $mydomain = 'xdomain.com';
    $date = '2009-01-26';
    foreach(qx(grep $mydomain /var/log/exim_mainlog|grep $date|/bin/awk '{print \$3}' )) {
    chomp;
    $localips{$_} = $_;
    print qx(grep $_ /var/log/exim_mainlog );
    print $_."\n";
    }
     
Loading...

Share This Page