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.

How can i view maillog for one domain???

Discussion in 'E-mail Discussions' started by luuhao, Sep 25, 2005.

  1. luuhao

    luuhao Member

    Joined:
    Jun 10, 2004
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    Hi All,
    My server have alot of domains so maillog very big!!! If I want to see maillog for one of these domains , how can i do that?
    Thanks,
    Luu Hao
     
  2. gupi

    gupi Well-Known Member

    Joined:
    Apr 27, 2004
    Messages:
    125
    Likes Received:
    0
    Trophy Points:
    16
    in ssh, as root, type:

    Code:
    cat /var/log/exim_mainlog | grep "domain.com" > logfile.txt
    this should create a file called logfile.txt with the desired mail log for domain.com
     
  3. luuhao

    luuhao Member

    Joined:
    Jun 10, 2004
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    Hi gupi,

    Thanks for your reply !
    But It's seem not working !!!! If you use this command , you don't see senders in another domains send mail to mydomain and you also don't see email send from mydomain to another domains!...

    Luu Hao
     
    #3 luuhao, Sep 25, 2005
    Last edited: Sep 26, 2005
  4. Damian

    Damian Well-Known Member

    Joined:
    Oct 1, 2001
    Messages:
    95
    Likes Received:
    1
    Trophy Points:
    8
    By default the logs don't include the subject. You'll need to add the following line:

    log_selector = +subject

    to your exim.conf (and restart it of course). This will then log the subject line from that point on. There is no way retrospectively to get the subject.
     
  5. luuhao

    luuhao Member

    Joined:
    Jun 10, 2004
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    Thanks Damian,
    But I can not give logfile (sent and receiver from mydomains) ???
    Can you help me?
    Thanks alot,
    Luu Hao
     
  6. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    If you want to see the whole transaction of all emails for a particular domain then you can use:

    exigrep domain.com /var/log/exim_mainlog
     
  7. luuhao

    luuhao Member

    Joined:
    Jun 10, 2004
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    HI chirpy,
    I saw what i need ! Your command is very useful for me !
    Thanks alot chirpy,
    Luu Hao
     
Loading...

Share This Page