cPanel commandline

1. Change the cPanel password :

/scripts/chpass user_name password
/scripts/ftpupdate

2. Create and delete email address :

/scripts/addpop email_address

/scripts/delpop email_address

3. Add domain key for a user :

/usr/local/cpanel/bin/dkim_keys_install username

For all the users : for user in `ls /var/cpanel/users`; do /usr/local/cpanel/bin/dkim_keys_install $user; done

Add SPF record for a single user :

/usr/local/cpanel/bin/spf_installer username

For all the user : for user in `ls /var/cpanel/users`; do /usr/local/cpanel/bin/spf_installer $user; done

To setup automatic DKIM/SPF for new accounts, add the below in /scripts/postwwwacct

print “\n Installing DKIM / SPF Records for the user $name …”;
    system(“/usr/local/cpanel/bin/dkim_keys_install $name”);
    system(“/usr/local/cpanel/bin/spf_installer $name”);

4. Add a new cPanel account :

Please use the following syntax:
wwwacct <domain> <user> <pass> <quota> <cpmod[advanced/?]> <ip[y/n]> <cgi[y/n]> <frontpage[y/n]> <maxftp> <maxsql> <maxpop> <maxlst> <maxsub> <bwlimit> <hasshell[y]/[n]> <owner> <plan> <maxpark> <maxaddon> <featurelist> <contactemail> <use_registered_nameservers> <language>

/scripts/wwwacct theg.com theg mypassword 1000M x3 n y n 99 99 99 99 99 0 y reseller_name

5.

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s