Plesk

Installing qmail-scanner with Plesk

A couple of notes... using psa-spamassassin will result in all messages being scanned twice, which creates a lot of overhead.

Submitted by jkelly on Thu, 2007-06-28 15:33. categories [ | | ] read more

Investigating outgoing spam issues on Plesk servers

Use the modified qmHandle's qmHandle -tt to see the top senders/recipients. Look at one of the spam messages and look at the Received line, which will either show you a UID or received from network.

If it shows you a UID, then the spam is coming from a compromised script.

Submitted by jkelly on Wed, 2007-06-20 19:28. categories [ | | | ] read more

Checking all domains on a Plesk box for reverse DNS

Available at http://partytime.wackyfunster.com/leet/plesk_rdns_check.sh

Checks every domain in /home/httpd/vhosts for forward lookup and reverse lookup, and outputs the results. Output may be more readable when piped into sort.

Submitted by jkelly on Fri, 2006-12-01 06:43. categories [ | | ] read more

Restoring file ownerships in Plesk httpdocs directories

To restore proper ownerships to everything within Plesk's httpdocs directories (assuming the httpdocs directory itself has the correct ownership)

#!/bin/bash
for i in `ls /home/httpd/vhosts/ |grep "\."`
do
chown -R `ls -l /home/httpd/vhosts/$i|grep httpdocs|awk {'print $3'}`:psacln /home/httpd/vhosts/$i/httpdocs/*
done

Submitted by jkelly on Fri, 2006-10-27 03:49. categories [ | ]

Integrating ClamAV with Plesk/Qmail

Here are the steps for integrating ClamAV with Plesk/Qmail:

* Stop all Plesk services and remove the drweb rpms

service psa stopall
rpm –e drweb drweb-qmail --nodeps --force

* Add the Atomic Rocket Turtle archive to the rhn sources

Submitted by jkelly on Sat, 2006-09-30 22:48. categories [ | | ] read more

Listing email accounts and passwords

select concat(mail_name,'@', domains.name) as `e-mail`, password from domains
left join mail on domains.id=mail.dom_id
left join accounts on mail.account_id = accounts.id where postbox='true';

Submitted by jkelly on Wed, 2006-09-06 23:46. categories [ | ]

Resolving issues with content created by apache/php

Plesk content within a specific domain should all be owned by (domain user):psacln, however many CMSes create content via php as apache:apache, which can lead to issues. Unfortunately, there is no good, clean "fix" for this that I'm aware of (other than setting up php in suexec mode, which opens a whole new "can of worms"), however a solution that I have used to great success in the past is setting up file acls for the appropriate domain user on each domain.

Submitted by jkelly on Fri, 2006-09-01 08:10. categories [ | ] read more

Upgrading Plesk

Note: this article needs to be rewritten for Plesk 8.x. It should still have some useful information though!

Preparing for a Plesk upgrade:

Note: I have written a script which takes care of most of this, downloads appropriate tarballs, etc. however I recommend that you only use it if you know what you're doing. It can be found here for Plesk 7.5.4, or here for Plesk 8.x (downloads both 8.0 and 8.1 tarballs).

Submitted by jkelly on Fri, 2006-09-01 02:42. categories [ | ] read more

Troubleshooting Plesk Upgrades

Error:

Trying to apply 7.5.4 changes to database... ERROR 1067 (42000) at line 1: Invalid default value for 'srv_bandwidth'

Fix:
USE psa;
ALTER TABLE `module_bf1942_servers` CHANGE `srv_bandwidth` `srv_bandwidth`
ENUM( '0', '8', '16', '32', '64', '128', '256', '512' )

Submitted by jkelly on Thu, 2006-08-31 03:38. categories [ | ] read more

Resolving Horde webmail issues with PHP 5

Upgrading to PHP 5 can create some unfortunate issues with Horde webmail. While the version of Horde provided by Plesk is technically PHP 5 compliant, the version of PEAR packaged with Horde contains a DB module that is NOT PHP 5 compliant, which causes miscellaneous and sundry issues with Horde. Here is a quick fix:

pear upgrade DB
cp -a /usr/share/pear/DB.php /usr/share/pear/DB/ /usr/share/psa-horde/pear/

Unfortunately, due to openbasedir restrictions, a straight "cp" is the cleanest solution. Once this is complete, Horde should function properly (still not sure if this resolves everything).

Submitted by jkelly on Sat, 2006-08-26 06:16. categories [ | | ]

SWSoft Resources

Submitted by jkelly on Thu, 2006-08-24 06:11. categories [ | ]

Per domain open basedir restrictions

Sometimes it is necessary to relax the open basedir restrictions for a particular domain. To do this, you'll need to create a vhost.conf for that domain, or edit the existing one. For this example, we will use 'test.com' as the domain.

vi /var/www/vhosts/test.com/conf/vhost.conf

<Directory /var/www/vhosts/test.com/httpdocs>
    php_admin_flag engine on
    php_admin_value open_basedir [insert appropriate restrictions here, or 'none' to disable]
</Directory>

/usr/local/psa/admin/bin/websrvmng -av

And there you have it.

Submitted by jkelly on Sat, 2006-08-12 09:39. categories [ | | ]

Mass IP changing in Plesk

This is particularly useful when migrating to a NAT environment on a Plesk server with a large number of domains on a single shared IP, or migrating from one IP to another.

First you need to add the IP address on the server, and ensure that it's been picked up by the Plesk control panel. After that, go into the psa database:

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

Submitted by jkelly on Sat, 2006-08-12 03:55. categories [ | ] read more
Syndicate content