How to create an email account from the backend?

pratapsingh

Active Member
Mar 20, 2009
39
0
56
Hi

I am using exim mail server for my cpanel. And I want to create an email account from the backend ( via ssh ) without using cPanel addpop script or any other scripts.
I want to create it manually.
I want to create everything for the mail user manually from the console. And want it to display in my cpanel also .

Help me regarding this ..?
 

cPanelDavidG

Technical Product Specialist
Nov 29, 2006
11,216
13
313
Houston, TX
cPanel Access Level
Root Administrator
Hi

I am using exim mail server for my cpanel. And I want to create an email account from the backend ( via ssh ) without using cPanel addpop script or any other scripts.
I want to create it manually.
I want to create everything for the mail user manually from the console. And want it to display in my cpanel also .

Help me regarding this ..?
Would you be open to using our APIs for this or no?
 

pratapsingh

Active Member
Mar 20, 2009
39
0
56
Create an Webmail user via ssh

I got the solution .////

Create an Webmail user via ssh

You need to do the following:
1. Add an entry for the new account to the /home/USER/etc/DOMAIN/passwd file.
2. Add the password for the new account to the /home/USER/etc/DOMAIN/shadow file using standard Unix "crypt" encryption.
Note I just Copied the existing encrypted password of the user to new user [email protected]
3. If you want a quota for the account, add an entry in /home/USER/etc/DOMAIN/quota (I think the values are in bytes).
4. Create a directory for the account in /home/USER/mail/DOMAIN directory.
5. If you have logged in as root then change the ownership to user. [chown user.user /home/User/mail/Domain/xyz -R]
6. Create a soft link /home/USER/mail directory for new mail user xyz\@Domain_com -> Domain.com/xyz/
7. You can also set the maildirsize by editing the /home/USER/mail/Domain/xyz/maildirsize
8. Run this following scripts to take effect in cpanel.

/scripts/updateuserdomains