How to host a domain with spf and dkim on license expired whm/cpanel server from shell ?

    Posted in Whm/Cpanel on May 24, 2018

    We will see how we can host a domain on a whm/cpanel server if server license is expired. some time we need to host a domain on server with immediately and then we find out that server license is already expired then there are to ways so we can host a domain on server first we activate the license and then do it from whm panel and second way is we just access server via ssh and do it as soon as possible.

    Today I will show you the second way that how we can host a domain on server with spf and dkim.

    first of all ssh server with root details

    ssh root@serverip
    
    password:

    enter password and press enter key.

    root@server[~]#

    Now we run following command on server create a new account with new domain:

    /scripts/wwwacct

    The Syntax of this command is as follows:

    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>

    We don't need to setup all these options it will also work with some basic options.

    for example I am creating a new account with following options:

    /scripts/wwwacct mynewdomain.com myusername mypassword 0 x3 n n n 0 0 0 0 0 0

    then press enter when its done will show output as followd:

    wwwacct creation finished
    Account Creation Ok
    root@server [~]#

    The above creates a new account with the domain called

    cloudtechtiq.com

    It sets their username to mynusername It sets their pasword to mypassword then 0 means Quota is unlimited, x3 means that theme is x3 n means dedicated IP is not assigned n means CGI is turned off n means FrontPage is turned off 0 means maxftp is unlimted 0 means the number of databases is unlimited 0 means the number of email accounts they can create is unlimited 0 means the amount of mailing lists is unlimited 0 means the number of subdomains is unlimited 0 means bandwidth is unlimited.

    I m setting all these options as per my requirement you can also do it as per your requirement.

    All the remaining options that were not specified in the command are set to the defaults you have set in your WHM.

    Anything set to 0 is unlimited.

    After running this command on server an account will created with domain, username, password as you mentioned in command.

    Now to setup spf and dkim on new domain Please run following commands:

    for dkim:

    /usr/local/cpanel/bin/dkim_keys_installer username

    for spf:

    /usr/local/cpanel/bin/spf_installer username

    in my case commands will be as followed:

    /usr/local/cpanel/bin/dkim_keys_installer mynusername
    /usr/local/cpanel/bin/spf_installer mynusername

    now its done we have hosted a domain with spf dkim on our server from shell or via ssh