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.

Add email address using linux command line

Discussion in 'E-mail Discussions' started by classywear, Jul 18, 2008.

  1. classywear

    classywear Member

    Joined:
    Jun 3, 2007
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    I'm trying to learn how to add an email address to an account at the linux operating system command line. I have search through the cPanel and red hat user guides without success. Can anyone point me in the right direction.

    Thanks,
    John
     
  2. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,461
    Likes Received:
    22
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    /scripts/addpop
     
  3. classywear

    classywear Member

    Joined:
    Jun 3, 2007
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Thanks!

    Thanks! :)
     
  4. cteinternet

    cteinternet Registered

    Joined:
    May 27, 2009
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
  5. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    We are currently working on adding a parameter to the /scripts/addpop script to allow you to set a quota. I have no ETA on when this functionality will become available in the production-worthy builds of cPanel/WHM, but it is currently available in our EDGE build (internal case 28422). Use of EDGE on production web servers is discouraged since EDGE only receives minimal quality testing.
     
  6. gearheadhost

    gearheadhost Member

    Joined:
    Jun 14, 2009
    Messages:
    14
    Likes Received:
    0
    Trophy Points:
    1
    non-root add email account?

    Is there a way to get a non-root account to be able to setup an email account via ssh or shell_exec via a php script?

    Basically I want to be able to add a form in a password protected directory that will allow me to fill out a form to create the email account. Mainly it is for a business setup where multiple managers can setup email accounts for their divisions without cPanel access.
     
  7. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    You could just use our APIs for creating an email account. Information about our XML API including how to call the cPanel API1 and API2 APIs from the XML API is available at: XML and JSON APIs

    The actual function call for creating an email account is an API1 function:

    Code:
    <cpanel Email="addpop($FORM{'email'},$FORM{'password'},$FORM{'quota'},$FORM{'domain'})">
    So, to call this from the XML API, you would use the cPanel function. Here's the relevant information for calling the API:

    API version: 1
    Module: Email
    Function: addpop
    First arg: the part of the email address before @
    Second arg: password for the email account
    Third arg: a number, specifying the quota for this mail account in MB
    Forth arg: the part of the email address after @

    Matt has made a nifty PHP 5 class that makes calling our APIs much easier if you're using PHP 5. You can find his class at: http://forums.cpanel.net/f42/xmlapi-php-class-111897.html
     
Loading...

Share This Page