In this guide, we will go over how to enable SMTP tweak. The SMTP tweak will prevent users from bypassing the mail server to send mail (this is a common practice used by spammers). It will only allow the MTA (mail transport agent), mailman, and root to connect to remote SMTP servers.
Basically, SMTP tweak prevents emails being sent through means other than the cPanel mail service, exim.
SMTP tweak is very easy to implement. First, login to your Web Host Manager as root.
Next, go to the Security Center. The link is located on the left under the security section. Scroll down and click on SMTP Tweak. This page will let you enable or disable SMTP tweak.
If you use APF (Advanced Policy Firewall) you need to change certain settings to make sure they both function together properly.
To do so, open the init file with your favorite text editor:
Replace the entire contents of the file with this:
# chkconfig: 345 55 25
# description: Advanced Policy Firewall
# source function library
# import variables
case "$1" in
echo -n "Starting APF:"
/usr/local/sbin/apf --start >> /dev/null 2>&1
echo -n "Enabling SMTP Tweak:"
/scripts/smtpmailgidonly on >> /dev/null 2>&1
echo -n "Stopping APF:"
/usr/local/sbin/apf --stop >> /dev/null 2>&1
echo "usage: $0 [start|stop|restart]"
Save the file, and exit. This will ensure that APF does not conflict with SMTP Tweak.
- 6 Users Found This Useful
WHM provides you with a Remote Access Key for allowing 3rd party scripts to access your WHM on...