Archives

Get notifications for abusive email users – WHM

cPanel v66 introduced a new option – Number of emails a domain may send per day before the system sends a notification. With this option, the system will send you a message when a domain exceeds the specified number of daily emails.

cPanel Note: The system counts outbound mail from subdomains and addon domains separately from their parent domain.

whm number emails day

By default the option is set to Unlimited. You can set any value you want – like 10, 100 etc.

 

To set a value for this new WHM/cPanel option:

  1. Log into WHM as root
  2. Go to Server Configuration >> Tweak Settings
  3. From the top menu click on the Mail tab
  4. Look for the option Number of emails a domain may send per day before the system sends a notification
  5. Choose Unlimited or enter a value (10,100 etc)
  6. Scroll down the page and click the Save button
  7. You will see the confirmation message:

    Your changes have been saved.

    Restarting cPanel daemons…done.

    Updating your system to reflect any changes…
    Updating “Number of emails a domain may send per day before the system sends a notification.” from “10” to “100”.
    “Number of emails a domain may send per day before the system sends a notification.” was updated.
    Done.

When the condition is triggered, you will receive an message stating that The domain demo123.com on account demo123 exceeded the maximum number of emails per hour. The domain violated its domain-level limit, which is currently 100.

abusive users email message

Share this post:

How to create, edit and delete packages in WHM

With WHM packages, you can set up predefined values for web hosting plans. For example a package can have 100MB of disk space and 3 email accounts, another can have 200MB of disk space and 10 email accounts, etc.

To create a web hosting package:

  1. Login to WHM at your domain.com/whm/
  2. From the left menu choose Packages->Add a Package
  3. Enter the Package Name.
  4. Enter values for the Resources you want for the package (like 100 for Disk Quota (MB) field, 1000 for Monthly Bandwidth (MB) field and so on)
  5. In the Settings section, choose cPanel theme, the language for the cPanel interface. Also here, set ig you want to allow shell/cgi access, assign a dedicated IP. If you don’t understand these settings, leave the default selections.
  6. Click the Add button. The new package will be created.

To edit a web hosting package:

  1. Login to WHM at your domain.com/whm/
  2. From the left menu choose Packages->Edit a Package
  3.  From the packages list, select the package you want to edit and click the Edit button.
  4. Modify the package options.
  5. When done, click the Save Changes button.
WHM Packages WHM Packages

 

To remove a web hosting package:

  1. Login to WHM at your domain.com/whm/
  2. From the left menu choose Packages->Delete a Package
  3. Choose from the list the package you want to delete
  4. Click the Delete button. You will see a confirmation message: The package was successfully deleted.

The video tutorial on how to create, edit and remove packages:

Share this post:

Configure security questions for WHM login

For enhanced login security to Web Host Manager(WHM), you can setup security questions.

1.Go to WHM->Security Center->Security Questions

2. Click the Edit Questions and Answers button to set up the questions and answers.

WHM Security Questions QA

Please notice that you can’t use one, two or three questions. You must use all four questions and answers.
Each answer/question must be at least 2 characters long.

The predefined security questions are:

What is your primary frequent flyer number?
What is your library card number?
What was your first phone number?
What was your first teacher’s name?
What is your father’s middle name?
In what city was your high school?
What was the name of your first boyfriend or girlfriend?
What is your maternal grandfather’s first name?
What is your maternal grandmother’s first name?
In what city were you born (Enter full name of city only)?
What was the name of your first pet?
What was your high school mascot?
How old were you at your wedding (Enter age as digits)?
In what year (YYYY) did you graduate from high school?
In what city did you honeymoon (Enter full name of city only)?
What is the first name of the best man/maid of honor at your wedding?
What is your mother’s middle name?
In what city were you married?
In what city is your vacation home?
What is the first name of your first child?
What is your paternal grandfather’s first name?
What is your paternal grandmother’s first name?
What is the name of your first employer?
When is your wedding anniversary (Enter the full name of month)?
What is the first name of the best man/maid of honor at your wedding?
In what city was your mother born (Enter full name of city only)?
In what city was your father born (Enter full name of city only)?

3. Click the Continue button. Your questions and answers will be saved.

4. Go to WHM->Security Center->Configure Security Policies and check the option Limit logins to verified IP addresses option. Click the Save button. WHM Security Questions Policy WHM will ask for security questions only when you connect from a new IP. Each IP from which you successfully signed in will be added to a list of Recognized IPs for “root”. You will not have to enter again the answers to the security questions.

5. From now on, after entering the correct username and password you will be asked for answers to the security questions. WHM Security Questions List

6.1 Entering the correct answers, you will see a message : You have answered your security questions correctly. WHM Security Questions Success

6.2 Entering the wrong answers, you will see a message : The system has registered a brute force attempt on security questions for the account “root”. As the message says, the cPHulk Brute Force Protection will be triggered (if it’s enabled). WHM Security Questions Fail

7. If you want to see the list of Recognized IPs go to WHM->Security Center ->Security Questions and lick the Add or Remove Recognized IP Addresses button.

WHM Security Questions IP Tool

If you forget your WHM security answers:

  1. Connect via SSH to your server as root
  2. Go to file /var/cpanel/cpanel.config. Edit the file.
  3. Change the line
    SecurityPolicy::SourceIPCheck=1

    to

    SecurityPolicy::SourceIPCheck=0
  4. Now run the command:
    /usr/local/cpanel/whostmgr/bin/whostmgr2 --updatetweaksettings
  5. You should be able to login again to WHM.

If you want to remove the security questions, just delete the file /var/cpanel/userhomes/cpanel/.cpanel/ securitypolicy/questions/root.json

Share this post:

How to check if a domain is on the server

You have a lot of domains and you want to quickly check if a domain exists on the server. Just run the shell command: grep yourdomain /etc/userdomains

root@web [~]# grep demo.plothost.com /etc/userdomains
demo.plothost.com: plothost
root@web [~]#

In this case, the domain “demo.plothost.com” exists and it belongs to user “plothost”.

You may also want to know if the domain resolves to your server/IP. Use:

root@web [~]# dig demo.plothost.com

; <<>> DiG 9.9.0-RedHat-9.9.0-38.el7_3.2 <<>> demo.plothost.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 30116
;; flags: qr rd ra ad; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 512
;; QUESTION SECTION:
;demo.plothost.com.             IN      A

;; ANSWER SECTION:
demo.plothost.com.      5388    IN      A       162.255.100.100

;; Query time: 26 msec
;; SERVER: 8.8.8.8#53(8.8.8.8)
;; WHEN: Mon Mar 20 04:11:52 PDT 2017
;; MSG SIZE  rcvd: 62

root@web [~]#

If the domain has an cPanel account you can search for it in WHM -> Account Information -> List Accounts.

WHM Search Account
WHM Search Account

On all our reseller plans you can host an unlimited number of domains. Check the offer here.

Share this post:

How to restart a service via WHM interface

cPanel/WHM offers a nice graphic interface to restart important services like Apache, FTP, MySQL etc.
First, you should login to WHM as root. Go to Restart Services menu like in the image bellow.
restart services

From here just select the service you want to restart and click the “Yes” button like in the following image .
restart services 2
The example is for the pure-ftpd service, but the interface is the same for all other services.

After the service is successfully restarted you will get a message like :

Waiting for ftpserver to restart………finished.
pure-ftpd (pure-ftpd (PRIV)) running as root with PID 4062 (process table check method)
pure-authd (/usr/sbin/pure-authd -s /var/run/ftpd.sock -r /usr/local/cpanel/bin/pureauth) running as root with PID 4050 (pidfile check method)
ftpserver started ok

The exact image is
restart services 3

For more details please visit the official support page at cPanel Documentation

Share this post: