Disable Watchdog on Plesk

Watchdog is an application that monitors the services on your (dv) server for security issues and availability. When Watchdog is running it spawns off several processes that can consume a lot of memory. We have found that running Watchdog can actually cause instabilities with some servers.

It is our recommendation to not use this module. If you need a monitoring solution you may want to look for an off-site option. Our newer servers are not provisioned with watchdog installed. If you have an older server and would like to remove watchdog you can run the following command via ssh as root to remove the watchdog package.

rpm -e psa-watchdog

Source: http://kb.mediatemple.net/questions/770/(dv)+HOWTO:+Misc.+performance+tuning

Disable SpamAssassin on Plesk

SpamAssassin is a service that filters for spam on incoming mail. Each instance can use as much as 20 MBs per process. If you choose to run spam protection via your email client you can gain that memory back for other applications to use. We have found that most client-side filtering provides similar protection so this redundancy is not needed in most cases.
NOTE:

Turning off SpamAssassin may significantly increase the amount of spam that your email accounts receive. You will have to decide for yourself if this is a trade-off that you are comfortable with. To help further prevent spam we strongly suggest disabling any “catch-all” email addresses and enabling “reject emails to non-existent users” in the Mail section under Clients >> Domains >> Mail in Plesk.

Type the following command in your SSH session:

/etc/init.d/psa-spamassassin stop

To disable it permanently, run the following command by typing

chmod 644 /etc/init.d/psa-spamassassin

You can always add it back by changing 644 to 755.

Source: http://kb.mediatemple.net/questions/770/(dv)+HOWTO:+Misc.+performance+tuning

Grep UID in Plesk from Qmail log

Click on the header link in the mail server queue:

Received: (qmail 30501 invoked by uid 10077); 3 Dec 2009 21:47:42 -0500
Date: 3 Dec 2009 21:47:42 -0500
Message-ID: <20091204024742.30498.qmail@hostserver.com>
To: email@domain.com
Subject: This is a test.
MIME-Version: 1.0
Content-type: text/html; charset=iso-8859-1
From: <user@domain.com>

It says its invoked by uid 10077 which corresponds to the account on the /etc/password file:

-bash-3.2# more /etc/passwd | grep 10077
username:x:10077:2522::/var/www/vhosts/domain.com:/bin/false

Limit to Postini IP Range in Plesk

  • Login to Plesk and go to SYSTEM -> MODULES -> FIREWALL
  • Choose Add Custom Rule
  • Enter in a rule name
  • Choose what direction to match, in this case, incoming
  • Choose ALLOW
  • Enter in port 25
  • Leave as TCP
  • Press ADD
  • Enter in 74.125.148.0/22 in the five boxes, the fifth box being the 22 (no slash)
  • Press ADD
  • Press OK

That rule will accept Postini’s block. Then, to block the rest of the email:

  • Choose Add Custom Rule
  • Enter in a rule name
  • Choose incoming
  • Choose DENY
  • Enter in port 25 and press ADD
  • Leave the network space blank
  • Press OK

It is important that you have the rules in this order, otherwise all email will be denied. Ensure that the ALLOW is above the DENY in the display list when you are done, then commit the changes.

Source: http://www.experts-exchange.com/OS/Linux/Q_24418022.html

Transfer database between domains in Plesk

If you are moving the database from one domain to another on the same server, and you want to keep the database name the same, you just need to change the owner of the database in the ‘data_bases’ table in the psa database.

The table uses the field ‘dom_id’ as a reference to the owner. Look in the ‘domains’ table to find the ‘id’ of the domain you are using and the one you wish to move to then make the change in the ‘data_bases” table.

Once changed, you will see the database listed under the new domain in Plesk. You can then add/change usernames and passwords through Plesk as normal.

You can do all the above through the command interface (SSH) or you can do it the easy way with a tool like phpMyAdmin installed.

Source: http://forums.serverbeach.com/showthread.php?t=164

Reconfigure vhost in Plesk

/parallels_plesk_panel_installation_directory/admin/sbin/websrvmng --reconfigure-vhost  --vhost-name=

On Centos 5

/usr/local/psa/admin/sbin/websrvmng -u --vhost-name=domain.com

In Plesk 10

/usr/local/psa/admin/sbin/httpdmng --reconfigure-domain domain.com