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!

List of all Emails on a Domain?

Discussion in 'E-mail Discussion' started by ca2236, Apr 11, 2019.

  1. ca2236

    ca2236 Well-Known Member

    Joined:
    Feb 2, 2018
    Messages:
    93
    Likes Received:
    12
    Trophy Points:
    8
    Location:
    Nebraska
    cPanel Access Level:
    DataCenter Provider
    Hi

    Is there a file on the server that keeps a list of all emails for the domain?
     
  2. cPanelLauren

    cPanelLauren Forums Analyst II Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    5,734
    Likes Received:
    436
    Trophy Points:
    233
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. PossibleTechAssistance

    PossibleTechAssistance Registered

    Joined:
    Apr 12, 2019
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Houston, Texas
    cPanel Access Level:
    Root Administrator
    There are some locations like :

    Code:
    /home/$user/mail/$domain.com/ 
    -- Which would show the email users that are tied to the domain that the directory is for.

    As well you can use the uapi that @cPanelLauren has posted, and if you are more technically inclined you can use some regex to clean up the output

    Code:
    # uapi Email list_pops regex=[\S+@\S+] | grep -oP '(?<=email:[[:space:]]).+@\w+.\S+' 
    user@domain.com 
    user1@domain.com 
    user2@domain.com 
    user3@domain.com 
    
    Which only provides the email accounts that are tied to the cPanel account and doesn't output the other pieces of information that would normally come out of using the uapi.
     
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