How to enable SMTP tweak: Difference between revisions

From Acenet Knowledgebase
Jump to navigation Jump to search
test
 
No edit summary
Line 1: Line 1:
<html>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. <br /> <br /> Basically, SMTP tweak prevents emails being sent through means other than the cPanel mail service, exim.<br /> <br /> SMTP tweak is very easy to implement. First, login to your Web Host Manager as root.<br /> <br /> <br /> 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.<br /> <br /> <br /> <br /> <span style="color: #990000;">!!!Important!!!</span><br /> <br /> <br /> If you use APF (Advanced Policy Firewall) you need to change certain settings to make sure they both function together properly.<br /> <br /> <span style="color: #990000;">!!!Important!!!</span><br /> <br /> <br /> To do so, open the init file with your favorite text editor:<br /> <br /> <strong>nano /etc/init.d/apf</strong><br /> <br /> Replace the entire contents of the file with this:<br /> <br /> <br /> <strong><br /> #!/bin/bash<br /> ##<br /> # chkconfig: 345 55 25<br /> # description: Advanced Policy Firewall<br /> #<br /> <br /> # source function library<br /> . /etc/rc.d/init.d/functions<br /> # import variables<br /> . /etc/apf/conf.apf<br /> . /etc/apf/internals/internals.conf<br /> <br /> ipt="/sbin/iptables"<br /> inspath="/etc/apf"<br /> prog="apf"<br /> <br /> case "$1" in<br /> start)<br /> echo -n "Starting APF:"<br /> /usr/local/sbin/apf --start >> /dev/null 2> and 1<br /> echo_success<br /> echo<br /> echo -n "Enabling SMTP Tweak:"<br /> /scripts/smtpmailgidonly on >> /dev/null 2> and 1<br /> echo_success<br /> echo<br /> ;;<br /> stop)<br /> echo -n "Stopping APF:"<br /> /usr/local/sbin/apf --stop >> /dev/null 2> and 1<br /> echo_success<br /> echo<br /> ;;<br /> restart)<br /> $0 stop<br /> $0 start<br /> ;;<br /> *)<br /> echo "usage: $0 [start|stop|restart]"<br /> esac<br /> exit 0<br /> </strong><br /> <br /> <br /> Save the file, and exit. This will ensure that APF does not conflict with SMTP Tweak.</html> [[Category:WHM (Web Host Manager)]]
In this guide, we will go over how to enable SMTP tweak. The SMTP tweak option 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.  
 
[1] Login to your WHM (Web Host Manager) as root.
 
[2] Go to Security Center. The link is located on the left under the security section.  
 
[3] Scroll down and click on SMTP Tweak. This page will let you enable or disable SMTP tweak.
 
==SMTP Tweak and APF==
 
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:
 
<pre>nano /etc/init.d/apf</pre>  
 
Replace the entire contents of the file with this:
 
<syntaxhighlight lang="bash">
#!/bin/bash
##
# chkconfig: 345 55 25
# description: Advanced Policy Firewall
#
 
# source function library
. /etc/rc.d/init.d/functions
# import variables
. /etc/apf/conf.apf
. /etc/apf/internals/internals.conf
ipt="/sbin/iptables"
inspath="/etc/apf"
prog="apf"
 
case "$1" in
start)
echo -n "Starting APF:"
/usr/local/sbin/apf --start >> /dev/null 2> and 1
echo_success<br /> echo
echo -n "Enabling SMTP Tweak:"
/scripts/smtpmailgidonly on >> /dev/null 2> and 1
echo_success<br /> echo
;;
stop)
echo -n "Stopping APF:"
/usr/local/sbin/apf --stop >> /dev/null 2> and 1
echo_success
echo
;;
restart)
$0 stop
$0 start
;;
*)
echo "usage: $0 [start|stop|restart]"
esac
exit 0
</syntaxhighlight>
 
Save the file, and exit. This will ensure that APF does not conflict with SMTP Tweak.
 
[[Category:WHM (Web Host Manager)]]

Revision as of 12:33, 5 October 2012

In this guide, we will go over how to enable SMTP tweak. The SMTP tweak option 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.

[1] Login to your WHM (Web Host Manager) as root.

[2] Go to Security Center. The link is located on the left under the security section.

[3] Scroll down and click on SMTP Tweak. This page will let you enable or disable SMTP tweak.

SMTP Tweak and APF

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:

nano /etc/init.d/apf

Replace the entire contents of the file with this:

<syntaxhighlight lang="bash">

  1. !/bin/bash
  2. chkconfig: 345 55 25
  3. description: Advanced Policy Firewall
  1. source function library
. /etc/rc.d/init.d/functions
# import variables
. /etc/apf/conf.apf
. /etc/apf/internals/internals.conf
ipt="/sbin/iptables"
inspath="/etc/apf"
prog="apf"
case "$1" in
start)
echo -n "Starting APF:"
/usr/local/sbin/apf --start >> /dev/null 2> and 1
echo_success
echo echo -n "Enabling SMTP Tweak:" /scripts/smtpmailgidonly on >> /dev/null 2> and 1 echo_success
echo ;; stop) echo -n "Stopping APF:" /usr/local/sbin/apf --stop >> /dev/null 2> and 1 echo_success echo ;; restart) $0 stop $0 start ;; *) echo "usage: $0 [start|stop|restart]" esac exit 0

</syntaxhighlight>

Save the file, and exit. This will ensure that APF does not conflict with SMTP Tweak.