HOW-TO Setup a PLESK Dedicated Server

Source: GraFX 30 July 2011

(Revision: 3.3.1 - 15 June 2013) After several installations of PLESK on different dedicated servers, we have decided to write a small HOW-TO for other users. Maybe someone will have a better idea and together we can write a complete guide to setup a new box to be faster and more secure. This manual has been compiled with the help of the guys from the PLESK forum, so we thank them, especially "atomicrocketturtle".
This tutorial is mostly for REDHAT/FEDORA/CentOS, for other OS in some cases need some changes for appropriate install.

If you want to get updates on this HOW TO, consider to subscribe to our newsletter.


Before continue this tutorial, you need to have knowledge of SSH or you may ruin your server.
If you need installation support, better order this service from us, we will do this job for you for only 50USD. Usually could take aprox 2 hours.
We will need to get from you SSH access with root access.

So login with SSH and enter as root.

1. Verify if YUM is installed. If yes, proceed to edit /etc/yum.conf. If not, install from RPM. In order to use yum, you first need to add a few lines in /etc/yum.conf from page, browsing right OS. YUM is installed in latest REDHAT/FEDORA/CentOS by default. Other OS use for example apt-get (Debian)

2. Edit YUM configuration to work with ATOMIC packages. Always use only your version PSA channel. (Other OS skip this step, or configure other channels, specially for OS)

Using Lynx (yum -y install lynx):

lynx -source | sh

Using Wget:

wget -q -O - | sh

3. Install some useful tools like, JOE - text editor, Midnight Commander and LYNX text based navigator. I usually suggest Midnight Commander, it is visual tool, for beginners too, Joe and Lynx is just optional You can use VIM as well if you are familiar with it. (also mcedit is working nice if you install mc)

yum install joe mc lynx

4. Also we do an update of packages for yum with, to be up to date. At this step, we want to be sure we have all the packages updated. Probably if you are use ATOMIC packages, will ask for replace MySQL and PHP/Apache to ART version. It is OK

yum update

5. In PLESK create a domain, usually each of us have a default domain, and this domain users we change to have access with SSH. Is important to create this user (domain) and not go forward to change root access. Of course you can create later as well, just if you disable root, you cannot access server with SSH. Linux people will call it a wheel account. We prefer to use SSH personal key, but that is harder to setup.

Next I change the root password as well, from default value.

passwd root     

(same, will ask for password) - WRITE this down somewhere, in your notes.

After this, I follow the description from

6. Now edit some files to be easier to navigate in SSH, like:

joe /root/.bash_profile 
alias bye="exit"
alias ns="netstat -lpn"
alias pmysql="cd /var/lib/mysql"
alias phttpd="cd /var/www/vhosts"
alias tailall="tail -f /var/www/vhosts/*/statistics/logs/error_log /var/www/vhosts/*/statistics/logs/access_log"
alias tailallerror="tail -f /var/www/vhosts/*/statistics/logs/error_log"
alias tailallaccess="tail -f /var/www/vhosts/*/statistics/logs/access_log"
alias maillog="tail -f /usr/local/psa/var/log/maillog"
alias myadmin="mysql -u admin -p`cat /etc/psa/.psa.shadow`"
alias mchk="/usr/local/psa/admin/sbin/mchk --with-spam"
alias webpsa="/usr/local/psa/admin/sbin/websrvmng -av"
alias ppass="/usr/local/psa/bin/admin --show-password"
alias que="/var/qmail/bin/qmail-qstat"

echo "############################################################"
echo "                     Shortcuts to your system               "
echo "############################################################"
echo "To see your Plesk password, type: ppass"
echo "To rebuild your Apache/Web Server configuration, type: webpsa"
echo "To rebuild your Qmail/Mail Server configuration, type: mchk"
echo "To see your Qmail/Mail Server queue, type: que"
echo "To connect to your MySQL server as admin, type: myadmin"
echo "To exit from shell, type: exit"
echo "To see netstat command, type: ns"
echo "To see all error/access log, type: tailall"
echo "To see all error log, type: tailallerror"
echo "To see email log, type: maillog"
echo "To see all access log, type: tailallaccess"
echo "To get rid of these messages/aliases, edit your /root/.bash_profile"

and add these lines. This will help not to write all the times cd /home/http/vhosts/ just execute phttpd and you are already there. You may create your own rules of course. Be sure that lines does not broke, always start a line with alias ___.

For PLESK 9.x still use alias ppass="cat /etc/psa/.psa.shadow"

For example you can create an alias to read mail logs, by add any similar rules, using Linux commands.

joe /root/.bashrc

and add a line like (watch out for character ` ):

echo 'ALERT - Root Shell Access (YOURSERVERNAME) on:' `date` `who` | mail -s "Alert: Root Access from `who | cut -d"(" -f2 | cut -d")" -f1`" YOUREMAIL 

This will help to know each time when someone logged in as root, which is theoretically only you, the ELS installer will do this.
You will get on root login a mail to your mail address with subject ALERT - Root Shell Access (YOURSERVERNAME) on:, from which IP is entered and so on.
YOURSERVERNAME and YOUREMAIL must be changed with your data. (ELS can do this as well)

7. Because YUM update installed MySQL 5, change also my.cnf and update tables to MySQL 5 compatible. In latest distros, there is already MySQL 5.1

If you are upgraded to MySQL 5.1.x, then comment in my.cnf #skip-bdb this will solve to start MySQL again.
After this you will need to update your tables

mysql_upgrade -uadmin -p`cat /etc/psa/.psa.shadow`
mysqlcheck -uadmin -p`cat /etc/psa/.psa.shadow` --auto-repair --check --all-databases
Also be sure that upgrade created in mysql database the servers table, if not exist, create it.
CREATE TABLE `servers` (
`Server_name` char(64) NOT NULL,
`Host` char(64) NOT NULL,
`Db` char(64) NOT NULL,
`Username` char(64) NOT NULL,
`Password` char(64) NOT NULL,
`Port` int(4) DEFAULT NULL,
`Socket` char(64) DEFAULT NULL,
`Wrapper` char(64) NOT NULL,
`Owner` char(64) NOT NULL,
PRIMARY KEY (`Server_name`)

We suggest to consider this my.cnf. How to find which MySQL you run, execute. Be aware that on VPS could be other settings, usually fit, but not always.

mysql -uadmin -p`cat /etc/psa/.psa.shadow`

Get the files and copy into /etc/my.cnf

Be sure that after get it, edit. Change the following things. Lines with # ... every 1GB of RAM;

joe /etc/my.cnf
touch /var/log/mysql_slow_queries.log
chown mysql:mysql /var/log/mysql_slow_queries.log 

After my.cnf is configured, you can use MySQL Performance Tuning Primer Script, but MySQL must run minimum 24 hours to get correct data, to configure your server. Link to the script is: or MySQLTuner, run it and correct the data in /etc/my.cnf (we prefer the second one)

yum install mysqltuner



yum remove drweb-qmail drweb
yum install qmail-scanner clamd qgreylist spamassassin dcc pyzor razor-agents
service spamassassin restart
service clamd start
cat > /var/log/clamav/freshclam.log
chown qscand:qscand /var/log/clamav/freshclam.log
qmail-scanner-reconfigure (/usr/share/qmail-scanner/qmail-scanner-reconfigure.psa)

Configure qmail-scanner with the /etc/qmail-scanner.ini file.


For this you need to enable ATOMIC REPO - TEST

joe /etc/yum.repos.d/atomic.repo

enabled = 1

yum install clapf

Now all should work fine, you can check to send to you a test virus from
In meantime check log files to see if all work fine and no errors are there.

tail -f  /var/spool/qmailscan/qmail-queue.log /usr/local/psa/var/log/maillog /var/log/clamav/clamd.log

9. FIREWALL: You can use from PLESK their Firewall Module, easy to install or use APF.
PLESK module is nice, but for more advanced usage, still recommended APF.

We found a very nice auto installer. (

els --apf
els --bfd
els --mytop

Install ONLY APF, BDF, MyTOP from it, the rest will be ignored. You can still see els --help for other packages. Also install yum install perl-TermReadKey and edit mytop file like in (

When you are done, you still need some modification. Usage: mytop --user=admin --password=`cat /etc/psa/.psa.shadow`

joe /etc/apf/allow_hosts.rules

Here you will add your IP to ignore it. VERY IMPORTANT to not be lock out from server.
The format of these files are line-seperated addresses, IP masking is supported.

joe /etc/apf/ad/conf.antidos

# Try to detect syn-flood attacks [0=off,1=on]
# Parse klog for iptables logged attacks [0=off,1=on]


Here you setup to send to you some antidos alert.

/etc/apf/apf -s
joe /etc/apf/conf.apf

Check as well for ports:
# Common ingress (inbound) TCP ports
IG_TCP_CPORTS="20,21,25,53,80,110,143,443,465,993,995,3306,5224,8443,8080,11443,11444,30000,35000_35999" (notice no 22 port for SSH - we suggest this, also if you use ASL, add 30000, 11443_11444 port for sitebuilder, SSO)

Also look for USE_DS="1", usually have value 0, change to 1.

/etc/apf/apf -s

If you get: "Cannot load iptables" message, then you need to set in /etc/apf/conf.apf line SET_MONOKERN="1" (especially if you use VPS or ASL module from AtomicCorp)

If Firewall work OK do not forget to get out from DEV mode and restart ...

# Set firewall dev cronjob
# 1 = enabled / 0 = disabled

10. Disable some executables
Many php exploit scripts use common *nix tools to download root kits or backdoors. By simply chmod'ing the files so that no none-wheel or root user can use them we can eliminate many possible problems. The downside to doing this is that shell users will be inconvenienced by not being able to use the the commands below. If you run LES, which I would suggest, then you do not need to run the first group of chmods. If you get an error on the chmod 000 because a directory does not exist to not worry they are not on every server.

chmod 700 /usr/bin/rcp
chmod 700 /usr/bin/wget
chmod 700 /usr/bin/lynx
chmod 700 /usr/bin/links
chmod 700 /usr/bin/scp
chmod 000 /etc/httpd/proxy/
chmod 000 /var/mail/vbox
chmod 700 /usr/bin/mc
chmod 700 /usr/bin/elinks
chmod 700 /usr/bin/lwp-download
chmod 700 /usr/bin/GET
chmod 700 /usr/bin/curl

Also a suggestion that make a backup of /usr/bin, /usr/sbin, /bin, /sbin if someone overwrite in time this executables (will be infected by a chrootkit) then is easy to replace.

Going a step further might be to run the same chmod permission setting on '/usr/bin/*cc*'. This will only allow root to run compile programs like 'gcc'. Such hardening suggestions can help to stave off local and remote attacks, but don't consider them 100% foolproof either. Think of this as just another layer of security. Now I cannot give to you a list here, cause can be different files which is not compile libraries, ex.mysqlaccess, contain *cc*. So best is to use like

cd /usr/bin/;
ls -al *gcc
chmod 700 byacc cc gcc gnatgcc i386-redhat-linux-gcc perlcc yacc

(this is just an example, see what *gcc return)

Now we will install rkhunter so we will at least know if the server has been cracked. Note that a false positive is not always bad and you need to investigate the error before thinking you are hacked. Things such as compiling a 2.6.9 kernel on your server will cause binaries to change and rkhunter to suspect the server was cracked. Also unfortunatelly rkhunter will give a lot of false positive as well, you will need to configure what to ignore in rkhunter.conf

yum install rkhunter lynis
rkhunter -c
lynis -c

13. Register Globals and Error Reporting and mod_security

First open the php.ini file

joe /etc/php.ini

Register_globals is something that ideally php coders would code to allow to be turned off but many do not. Because of that disabling this feature may cause a lot of scripts to break. If you are on a shared host it is probably best if you do not enable this. If you are not a shared host then there is probably nothing wrong with it but do make sure by looking at all of your web sites to ensure it did not break any. That being said if you can get away with it then your server is going to be more secure. This comes down to the usability vs security issue, yes it makes it more secure but it also blocks some popular scripts. Use this at your own risk! To disable it search for "register_globals". It will currently be set to "On" go ahead and change it to "Off".

Next step is to find display_errors = On and change it to display_errors = Off, you can also turn on log_errors = On and if you like change

error_reporting = E_ALL & ~E_NOTICE into

Disable some problematic php variables, which can be insecure for the server (but also be aware this disable_functions can affect some PHP programs).


Just a note here: If you disable functions, in some cases can broke Horde. There is a workaround for fix this, better disable and then use the workaround. Also can broke some other programs like Joomla, Wordpress etc.

For workaround for HORDE - Breun was posted on PLESK forum a solution. Edit /etc/psa-horde/horde/conf.php (Plesk 8) or /etc/psa/webmail/horde/horde/conf.php (Plesk 9 and, I assume Plesk 10?)

1) Change $conf['mailer']['type'] from 'sendmail' to 'smtp' 2) Add the following line: $conf['mailer']['params']['host'] = 'localhost';

In this way, horde will use SMTP and no longer needs popen to be enabled.

Also I suggest to change some settings, search for them.

max_execution_time = 120
max_input_time = 240
memory_limit = 128M
session.save_path = "/tmp"
expose_php = Off

Restart apache for it to take effect.

/etc/init.d/httpd graceful

Register Global change can affect this settings some scripts, you need to tell to your customers about this.

Install mod_security with YUM. This tool can prevent a lot of problems, file injections, attacks etc to APACHE.

yum install mod_security

From this pages, you can get the Free Mod_Security Rules (Delayed 30+ days). You can get it, and untar it to /etc/httpd/modsecurity.d Be sure that 00_asl_rbl.conf, 00_asl_whitelist.conf will be uninstalled, renamed or deleted (if anyone know an another workaround??!). But still consider to use ASL services, pay for it, you are more secured. (

Also create a file, this is for your custom security rules.

joe /etc/httpd/modsecurity.d/00_asl_custom_exclude.conf

In some cases you can get error of tortix. Fix like this

touch /etc/httpd/modsecurity.d/tortix_waf.conf
mkdir -p /etc/asl
touch /etc/asl/whitelist

Then you can add a few line like for example. You can disable some rules what you do not need or create problems.

< LocationMatch .* >
SecRuleRemoveById 351000
SecRuleRemoveById 340162
< /LocationMatch >
@pmFromFile /etc/asl/whitelist" "nolog,phase:1,allow"
< LocationMatch /var/www/vhosts/YOURDOMAIN/httpdocs/admin/ >
SecRuleEngine Off
< /LocationMatch >

See more docs here:
IMPORTANT: Mod_security can introduce a lot of issues, so if you think that you cannot handle it, or your clients will start to yell on you because they get a lot of 550 Forbidden, better use ASL WEB GUI or learn more about mod_sec on forums. Also Power Toys can help at least manage/disable more easily some rules.

14. Services Version Number
Version numbers can be used by various software scanners to determine if your server is vulnerable. Though you should have the latest versions of everything security though obscurity is one method that can be employed to help secure your server.

First we are going to hide the version information in apache.

joe /etc/httpd/conf/httpd.conf

Search for "ServerSignature"
It should say On, change it to Off
This will remove the identification of apache from error pages

Right below that add a line that has the following:
"ServerTokens Prod"
This will identify apache simply as "apache" with no version numbers or OS information

Save out of the file and restart apache
You can do a TEST before restart

/etc/init.d/httpd configtest

Need to get: Syntax OK

/etc/init.d/httpd graceful

Next we will disable named from giving a version.

joe /etc/named.conf

Search for "query-source address * port 53;"
Add a line right below it with
version "Named";
Save and restart named

Remember this is just security though obscurity and you still need to keep the server updated! This is just going to stop some people from finding your server in the first place. It will not help at all if somebody is trying to actually hack the server.

15. PHP Optimizer/CACHE

We suggest also to install Ioncube Loaders, a lot of software come encoded with Ioncube , XCache, Zend Optimizer, php-eaccelerator.

yum install php-ioncube-loader  php-zend-optimizer  php-eaccelerator

On PHP 5.3 you cannot use php-zend-optimizer, you must use ZendGuard.

yum install php-zend-guard-loader

XCache is also easy to install, you can get from
To install:

tar zxvf xcache-1.3.0.tar.gz
cd xcache-1.3.0
phpize./configuremakemake install

Check the place where the is installed (some lib directory)
Then copy from xcache-1.3.0/xcache.ini into /etc/php.d/axcache.ini (use axcache to avoid problems with any zend extensions (Ioncube, Zend etc))
Edit /etc/php.d/axcache.ini and correct the path for (to load from correct place).
Restart apache and check with php -v if is loaded.

If apache not restart, see if the problem is not with Zend Optimizer and XCache.

IMPORTANT: After restart Apache, and execute php -v you may get error messages like "Failed loading /usr/local/Zend/lib/Optimizer-3.3.0/php-5.2.x/ /usr/local/Zend/lib/Optimizer-3.3.0/php-5.2.x/ cannot restore segment prot after reloc: Permission denied".

You will need to execute like this, just change the correct path to SO files.

chcon -t texrel_shlib_t /usr/lib/php/zend/
execstack -c /usr/local/Zend/lib/Optimizer-3.3.0/php-5.2.x/ php -v

If you fo not get any error, problem is solved. In some cases also SELinux can create problems, we always disable it and use ASL.

16. FTP Passive Mode Port
You need to edit /etc/proftpd.conf and add a line like

PassivePorts 35000 35999

After this see please APF Firewall settings at line IG_TCP_CPORTS= is there this port??
Then execute restart of XINETD

/etc/rc.d/init.d/xinetd restart

Also read this article about extra FTP info and check ...

If you want to change the FTP port, you need to change in /etc/proftpd.conf, also in /etc/services and open in your firewall the new port.

17. Secure MORE your server with ASL - (Subscribe here ...)

Atomic Secured Linux

Atomic Secured Linux is designed to improve overall system security by introducing both Kernel hardening techniques, as well as userspace utilities to your linux server. Currently, Atomic Secured Linux contains the latest 2.4 and 2.6 linux kernels, modified with the kernel patch, mod_dosevasive and mod_security. Grsecurity is an innovative approach to security utilizing a multi-layered detection, prevention, and containment model. Even if is a pay service, it worth every penny. Belive me, we use it. Also have a PLESK Control Panel Addon where you can edit everything visual.
You can install ASL, but will require login and password. (Subscribe here, 158USD/year)

wget -q -O - |sh

18. mod-suPHP

IMPORTANT: If you are using PLESK 11, then we suggest to use CGI mode for all domains, work very well. in this case you can skip SUPHP install.

A lot of people have problems with different PHP softwares like Joomla, Drupal, Wordpress, different Gallery software, especially where need to upload pictures. Why? Because now in a new settings, PHP will work as apache:apache user and any files uploaded via a web interface will get this user rights. Any files uploaded via FTP clients, will get the domain ownership. SO, if you for example want to get all picture files added via WEB INTERFACE, you cannot download or overwrite via FTP because the file rights. Also on install a lot of people need to setup folders to 777 rights to uload in it.

So seems the mod_suPHP solution is nice and working with the following settings. Some people recommending mod_ruid2 but I did not found a way to have with that module php.ini for each directory. mod_suphp is older but it work 100% guaranteed.
IMPORTANT UPDATE: In 0.7.1 handle_userdir=true is deprecated, if you do an upgrade, just delete this line. If is new install, should not be there.

yum install mod_suphp


After this, /etc/httpd/conf.d/mod_suphp.conf (important this line LoadModule suphp_module modules/, rest can be uncommented on Debian/Ubuntu is not the same place, is in apache kind of directory); /etc/suphp.conf (use default, except umask=0022)

If is PHP5, change in /etc/suphp.conf

docroot=/var/www/vhosts:${ HOME}/httpdocs
;Use correct permissions for mod_userdir sites
;Handler for php-scripts
;Handler for CGI-scripts

Allow files to be group writeable. Is disabled by default.

Allow directories scripts are residing in to be group writeable.
Is disabled by default.

Allow files to be writeable by world. Is disabled by default:
WARNING: Enabling this option is very dangerous and causes major
security issues, especially the danger of arbitrary code execution!

Allow directories scripts are residing in to be writeable by world.
Is disabled by default:
WARNING: Enabling this option is dangerous!

joe /etc/httpd/conf.d/mod_suphp.conf

Here change line suPHP_Engine on into #suPHP_Engine on (this is very important)

If you compiled suphp with setid-mode "force" or "paranoid", you can specify the user- and groupname to run PHP-scripts with.
Example: suPHP_UserGroup ftpuser psacln

The major things come with: httpd.include of each domain need to add, before < /VirtualHost >, the line Include /var/www/vhosts/
Then create vhost.conf. (We suggest to use for this Power Toys, this will suggest exactly what you need to do and modify the file for you). Also from version 4.9.0 will fix the permissions if suphp will be turned to ON.

In vhost.conf you need (delete the spaces between < and > in the config.):

< IfModule mod_suphp.c >
< Directory "/var/www/vhosts/DOMAIN/httpdocs/" >
php_admin_flag engine on
suPHP_Engine On
suPHP_ConfigPath "/var/www/vhosts/DOMAIN/httpdocs/"
AddHandler x-httpd-php .php
AddHandler php5-script .php
AddHandler x-httpd-php .php .php5 .php4 .php3 .phtml
suPHP_AddHandler x-httpd-php
suPHP_AddHandler php5-script .php
php_value open_basedir "/tmp/"
php_value upload_tmp_dir "/var/www/vhosts/DOMAIN/tmp/"
< Files php.ini >
order allow,deny
deny from all
php_value open_basedir "/tmp/"
php_value upload_tmp_dir "/var/www/vhosts/DOMAIN/httpdocs/tmp/"
< /Files >
< /Directory >
< /IfModule >

Need to focus on BOLD issues. DOMAIN is your domain, AddHandler one line is for PHP4, the other for PHP5, dunno if will work both together. Create in httpdocs/tmp directory, to write in it, as temporary upload dir. We still study this to move one directory up, but is not tested yet: DOMAIN/tmp/. After this, you need to add a php.ini file in your httpdocs directory, which will be use for that domain. this file cannot be read from outside because is restricted. To test if is work, create a file wit lines, < ?php phpinfo(); ? > and call it from web. You can see if is loaded new PHP.INI or not and mod_suPHP is on.

People have asked for a good php.ini (for each httpdocs environment, on suPHP only). So here it is our suggestion for Joomla.

upload_tmp_dir = "/tmp"
session.save_path = "/tmp"
output_buffering = On
zlib.output_compression = On
max_execution_time = 120
max_input_time = 120
memory_limit = 256M
display_errors = Off
register_long_arrays = Off
post_max_size = 32M
session.gc_maxlifetime = 3600
magic_quotes_gpc = On
upload_max_filesize = 32M

IMPORTANT: By default, we disabled mod_suphp, so you need to add to all existing domains manually (Power Toys will add automatically on new domains). Why is this so important? Because if you enable on all domains, and before you had 777 rights on folders or files, suPHP will give error on wrong GID or UID and will stop executing. So before enable, be sure that all folders on a domain is 755 and files 644.

19. Disable SELinux

Usually we disable SE Linux, we got only problems with it. We prefer to let ASL to do the job, but if you do not use ASL, no problem still we suggest to disable it. A lot of other security layers are out. In Fedora Core and RedHat Enterprise, edit /etc/selinux/config and change the SELINUX line to SELINUX=disabled

You can check the status with

cat /selinux/enforce

You can also switch the system into permissive mode with the following command

echo 0 >/selinux/enforce

20. Check if mail is sending out

Sometimes mailsending is not working, you can check easily if you send from shell command line a mail

Subject: TestTest

Press Control + D. If mail goes out, is OK, or you get an error.

20. Additional PHP Modules to install, mod_dav_svn and mailparse

In the webhosting business, you should support more then the default modules for PHP and why not SVN. So I suggest to install the following modules:

yum install php-mbstring php-pear php-xml php-soap php-suhosin php-xmlrpc mod_dav_svn php-bcmath
pecl download mailparse
tar xvzf mailparse-XXX.tgz
cd mailparse-XXX
make install
echo "" > /etc/php.d/mmailparse.ini
service httpd restart

Note that I've called the ini file 'mmailparse.ini' as the php.d ini files are loaded in alphabetical order. Mailparse needs mbstring so it needs to be loaded firstor else you will get a warning like ......PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/' - /usr/lib64/php/modules/ undefined symbol: mbfl_name2no_encoding in Unknown on line 0

Also is good to have Image Magick installed, a lot of people use it. Simple, just run

yum install ImageMagick ImageMagick-devel ImageMagick-perl

Also we recommend to install a new PECL module, installprogress ( This is very used in the last period.

pecl install uploadprogress

21. Add more Courier-IMAP connections

Plesk comes configured with a limit of 4 connections per IP address and a limit of 40 connections total. Modern IMAP clients such as Mozilla Thunderbird use mailbox caching to open up multiple connections to increase performance. In the case of Thunderbird, it opens up 5 connections by default which is already 1 connection more than Courier-IMAP's default restriction. Add another few family or corporate computers behind a firewall and those additional users won't be able to connect at all since a single Thunderbird client is already utilizing all 4 connections. This can increase the load of the server, but also is a must to not have complains from clients that they cannot connect to the server to get mails. You can raise this numbers depending on your server memory (our suggestion is for 2GB memory)

joe /etc/courier-imap/imapd

22. Backup your server

We suggest to setup a backup system to your server. This mean that in 99% of the cases, datacenters offer a backup place. Use that and backup your important files. Read how to do this at page - Automated Remote FTP Backup shell script

23. Avoid Dr.Web update notifications

In latest plesk version (plesk 9.5) following notifications generated from plesk and send to plesk administrator which irritate sometimes. You can stop such notifications by applying following fix on server.

Please open file /etc/cron.d/drweb-update using an editor and add '>/dev/null 2>&1' at the end of the line. In this case no email will be generated.

*/30 * * * * drweb /opt/drweb/ >/dev/null 2>&1

23. Install mod-pagespeed for APACHE.

Thismodule can speed up your pages a lot.

yum install at
rpm -Uhv

If all goes well, the module is already installed now, just restart apache. You can check if exist /etc/httpd/conf.d/pagespeed.conf Also you can play with this conf file as you like to test the best performance. Eventually I prefer to deactivate ModPagespeedStatistics OFF

24. ATMail search bug in PLESK 10.x.

After upgrading to Plesk 10, the search facility in Atmail stopped working, people search for emails and they get empty results. The problem is with the search.php file in the ATMail directory which was appending '20' to the search date range years, even though they already had a leading 20. This was producing an IMAP query like this:

FROM "test search" BEFORE "31-Dec-202011" SINCE "25-Sep-202010"

To fix, edit search.php in the atmail directory (/var/www/atmail/search.php)

Change Line 364: $before = "$BeforeDay-$BeforeMonth-$BeforeYear";
Change Line 369: $after = "$AfterDay-$AfterMonth-$AfterYear";


Go and login into PLESK admin and do the following steps.
Before all, click on update and do an update.
Click on SERVERS:

1. Change password: Change passwords to access into PLESK.
2. Access: Setup PLESK ADMIN access and add your IP, in this way you restrict ADMIN access from your IP.
3. System time: I use synchronize time with server:, anyway setup here the correct zone.
4. Mail preferences: Enable MAPS protection to; and also I use POP3 lock time to 20 minutes.(important)
5. Mailman settings: Setup email and password.
6. DNS - Read the manual.
7. Logo Setup - to setup your Company LOGO
8. Crontab - Set crontab message, if need change here the mail to not send to root.9. Activate Watchdog, each services, disk space etc.

Next step is CLIENTS AND DOMAINS, but this is documented in manuals, so I suggest to read it.

ADDITIONAL USEFULL TOOLS: - Power Toys for PLESK - Must have for PLESK - Backup on Demand for Power Toys for PLESK - MySQL Performance Tuning Primer Script - MySQL Activity Report - 4PSA have several nice tools for PLESK. - you can subscribe to this services to get reports (SMS if you need) about your server uptime. - MySQL Top program - IFTop, display bandwidth usage on an interface. - ApacheTOP - checkHAB is a script based on checkattach - MySQL Backup - Mod Top

How To Filter Tagged Spam to a Spam IMAP Folder -
Qmail-scanner package has options for blocking specific extensions -

If anyone has any suggestions, please drop me a note on the forum or e-mail me at contact page .
I will update this manual.

If you need installation support, better order this service from us, we will do this job for you for only 50USD. Usually could take aprox 2 hours.

Valics Lehel

Thanx to eth00 ( site, even if he write a help for CPanel, help a lot to adapt to PLESK.
Also thanx for atomicrocketturtle site -