To control access to the POP3 or IMAP services, you may use the Dovecot® mail servers.

Allow or deny access for an IP address

To allow or deny an IP address to access a service, perform the following steps:

Enter the service name in the daemon text box.

Enter the IP address or hostname in Access List text box.

You may enter wildcards in this text box.

You cannot enter a range of IP addresses with CIDR notation.

To specify a network range, add a network mask to the IP address.

For example, 192.168.0.0/255.255.255.0, where 255.255.255.0 is the desired network mask you want to use.

Enter the desired action in the Action text box.

Enter allow to allow access.

Enter deny to deny access.

Describe the rule in the Comment text box.

Click Save Host Access List, or click Reload to delete any changes.

Note:

You can also enter ALL EXCEPT IP address in the Access List text box. When you enter allow as your action, the system will allow all of the addresses except for addresses that you entered in the Access List text box.

Allow or deny IP addresses on the command line

For greater host access control flexibility, you can create rules in the command line. To do this, perform the following steps:

Log in to your server as the root user.

Open the /etc/hosts.allow file with your preferred text editor.

Enter the desired rules in the following format:

service : IP address : action

See the following example to allow 192.168.0.0 IP address to access the cPanel service:

cpaneld : 192.168.0.0 : allow

Notes:

When you configure your firewall directly, you can use CIDR notation.

WHM does not use a hosts.deny file. Add deny statements to the /etc/hosts.allow file.

cPanel, WebHost Manager, and WHM are registered trademarks of cPanel, Inc. for providing its computer software that facilitates the management and configuration of Internet web servers. ®2018 All rights reserved.

cPanel, WebHost Manager, and WHM are registered trademarks of cPanel, Inc. for providing its computer software that facilitates the management and configuration of Internet web servers. ®2018 All rights reserved.