Posts Tagged ‘Plesk’

Bulk DNS Query in Plesk

I put this command together to grab DNS information relating to all of the domains hosted on a Plesk server.  Useful if your migrating to a new server and need to know where to update the DNS zones.  This checks the nameservers but can easily be substituted with A or MX: for domain in $(mysql [...]

Spamassassin 2010 bug

A bit of an oversight – old versions of Spamassassin have an inbuilt rule to block emails with a future date.  Not a bad idea really, but the rule starts blocking things from 2010!  The rule should be fixed in newer versions, however Plesk for example uses a fairly old version. You can edit the [...]

qmail adds number to recipient header

qmail sometimes adds a number to the recipient header when delivering mail locally, so for example, user@domain.com may become 3-user@domain.com.  This isn’t such a problem when mail is just being used locally, but if your using a POP connector to download mail to an Exchange server for example it will cause issues with it getting [...]

Plesk 9 – Horde webmail configuration disappears

Strangely all of the webmail conf files for horde disappeared in my Plesk 9 setup. This regenerated them: for domain in `mysql -uadmin -p$(cat /etc/psa/.psa.shadow ) -Dpsa -e’select name from domains d, dom_param dp where d.id=dp.dom_id and dp.param=”webmail” and dp.val=”horde”;’`; do /usr/local/psa/admin/bin/webmailmng –set-default –vhost-name=$domain –name=horde ; done Update: seems to be a result of hotfix [...]

Plesk 9 – Migration Manager set source directory

For some bizarre reason The Plesk 9 migration manager has taken away the functionality to specify the partition used on the source server.  Not very handy if you have partitions running low on disk space.  I’ve found two solutions that seem to work: On the target server edit /usr/local/psa/admin/share/migration-handler/migration_handler.py Modify the following line and update [...]

Plesk for Windows MySQL Access

Plesk uses two Mysql servers. One for clients databases (port 3306) and second server for Plesk databases (8306). You can connect to Plesk DB using the following command: %plesk_dir%\mysql\bin\mysql.exe -uadmin -pPlesk_admin_passwd -P8306 “C:\Program Files\Parallels\Plesk\Databases\MySQL\bin\mysql.exe” -uadmin -pPlesk-admin_passwd -P8306 Plesk-admin_passwd = “C:\Program Files\Parallels\Plesk\admin\bin\plesksrvclient.exe” -get However if you want to connect to Clients’ Mysql Server you should use [...]

Plesk httpd suexec errors

If Apache is giving suexec errors following a httpd or Plesk upgrade, the Plesk suexec has probably been overwritten.  Copy it back: cp /usr/local/psa/suexec/psa-suexec /usr/sbin/suexec

Subversion on Plesk

Installing Subversion on Plesk Servers with http authentication ————————————— yum install subversion mod_dav_svn service httpd restart cd /var/www/vhosts/mydomain.com/conf/ vi vhost.conf : <Location /repos> DAV svn SVNPath /var/www/vhosts/mydomain.com/svn/repos AuthType Basic AuthName “mydomain.com repository” AuthUserFile /var/www/vhosts/mydomain.com/svn/htpasswd Require valid-user </Location> cd .. mkdir svn cd svn svnadmin create repos htpasswd -c htpasswd ftpuser cd .. chown -R ftpuser:apache [...]

POP3S IMAPS and SMTPS on Plesk

Setup SSL certificates for mail services (pop3s, imaps, smtps) on Plesk / Courier-Imap / Qmail Either get a certificate from a CA: openssl genrsa 1024 > host.key openssl req -new -nodes -key host.key -out host.csr Put the certificate received into host.crt or generate your own: openssl genrsa 1024 > host.key openssl req -new -x509 -nodes [...]

SSH Tunnelling to local ports on Linux

1. firewall – ensure port 22 is open 2. ensure users have ssh access (in plesk by commenting lines in /usr/local/psa/var/root.controls.lock and granting a shell) 3. Ensure the sshd config allows it in /etc/ssh/sshd_config: AllowTcpForwarding yes comment out: PermitTunnel no service sshd restart