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!

Extract senders and receivers email addresses from my server

Discussion in 'General Discussion' started by psytanium, Feb 15, 2019.

  1. psytanium

    psytanium Well-Known Member

    Joined:
    Jun 6, 2014
    Messages:
    158
    Likes Received:
    6
    Trophy Points:
    18
    Location:
    Lebanon
    cPanel Access Level:
    Root Administrator
    Hi,

    Is it possible to extract any email address used in my VPS server, senders and recipients ?

    This way maybe I can create a list of emails to use for my marketing campaigns created with Mailchimp.

    Thanks :)
     
  2. AntonioL

    AntonioL Registered

    Joined:
    Jul 24, 2018
    Messages:
    1
    Likes Received:
    1
    Trophy Points:
    0
    Location:
    italia
    cPanel Access Level:
    Website Owner
    This will be a must tool! up !
     
    psytanium likes this.
  3. psytanium

    psytanium Well-Known Member

    Joined:
    Jun 6, 2014
    Messages:
    158
    Likes Received:
    6
    Trophy Points:
    18
    Location:
    Lebanon
    cPanel Access Level:
    Root Administrator
    There must be a command to query and extract addresses from logs
     
  4. cPanelLauren

    cPanelLauren Forums Analyst II Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    6,125
    Likes Received:
    474
    Trophy Points:
    233
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    You would most likely want to query the exim logs for this data I used the following successfully:

    Code:
    grep -i -o '[A-Z0-9._%+-]\+@[A-Z0-9.-]\+\.[A-Z]\{2,4\}' /var/log/exim_mainlog
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. psytanium

    psytanium Well-Known Member

    Joined:
    Jun 6, 2014
    Messages:
    158
    Likes Received:
    6
    Trophy Points:
    18
    Location:
    Lebanon
    cPanel Access Level:
    Root Administrator
    Thank you for the query.
    But I think the command extracted only the outgoing emails, because almost all emails belong to users on my server. is there a way extract global addresses ? incoming is more important.

    Thanks :)
     
  6. cPanelLauren

    cPanelLauren Forums Analyst II Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    6,125
    Likes Received:
    474
    Trophy Points:
    233
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    Hello @psytanium

    This is definitely pulling incoming and outgoing mail I confirmed this on my own server by pulling a few of the addresses I didn't recognize out and searching through the exim logs for them.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    psytanium likes this.
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