Jump to: navigation, search


[edit] Plesk Logs



mail/ftp xfer


[edit] Plesk FTP USER

I have included below the instructions for adding system FTP user account's. First you will need to add the user, to do so simply issue the following command(s) as root:

 useradd -s /bin/false johndoe -d /home/johndoe

The "-s /bin/false" portion ensures this user can only ftp into the system and has no shell access. The "-d /home/johndoe" portion indicates that this users home directory should /home/johndoe. If you also want to restrict "johndoe" to his directory you should use the following command below instead:

 useradd -s /bin/false -G psacln johndoe -d /home/johndoe

The "-G psacln" switch automatically add's the johndoe user to the psacln group, any user account's that are part of that group automatically get restricted to their home directory.

After adding the user you simply need to setup a password for them using the following command:

 passwd johndoe

[edit] Qmail

qmail turn off reverse lookups.

 -Rt0 flag the to the beginning of the server_args line in the /etc/xinet.d/smtp_psa

[edit] Install new Plesk license

download correct license from

 /etc/init.d/psa stop
 mysql -u admin -p`cat /etc/psa/.psa.shadow` psa
 mysql> truncate key_history;
 mysql> truncate key_history_params;
 mysql> exit
 rpm -e --nodeps psa-key-custom
 rpm -Uvh plesk7.5_100_spamassassin  (or correct license)
 /etc/init.d/psa start

[edit] Qmail voodoo: (where spamblackhole is the domain or subject)

 /var/qmail/bin/qmail-qread | grep -B1  spamblackhole |grep GMT | awk '{print $6}'   | sed s/^#/-d/ > /home/rack/delete

[edit] Plesk FrontPage fixup: (from httpdocs dir)

disable frontpage in plesk

 find . -name .htaccess -type f | xargs rm -rf
 find . -name '_vti*' -type d | xargs rm -rf
 find . -name '_private' -type d | xargs rm -rf

enable and reset password in plesk

[edit] Change TTLs in Plesk

update the misc table to the value:

 update misc set val='86400' where param='SOA_TTL';

update the zone records:

 mysql -Ns -uadmin -p`cat /etc/psa/.psa.shadow` -D psa -e 'select name from domains' | 
 awk '{print  /usr/local/psa/admin/sbin/dnsmng update " $1 }' | sh

[edit] Plesk user passwords

 select,,mail.mail_name,accounts.password from domains,mail,accounts where and and accounts.password='password';

[edit] Plesk FTP users

 mysql -uadmin -p`cat /etc/psa/.psa.shadow` psa -e "SELECT, sys_users.login, accounts.password FROM
 hosting, domains, sys_users, accounts WHERE hosting.dom_id = AND hosting.sys_user_id = AND
 sys_users.account_id = ORDER BY;"

[edit] Upgrade to PHP5 on Plesk 8.1

 rpm -e `rpm -qa | grep -i sitebuilder`
 rpm -e php-sqlite2 sb-publish
 rpm -e PPWSE
 rpm -e --nodeps php-domxml
 rpm -Uvh *.rpm
 up2date --configure

[edit] Plesk mail mchk

 /usr/local/psa/admin/bin/mchk -v
 /usr/local/psa/admin/bin/mchk -v --with-spam

[edit] Kill Qmail queue

 # remove everything - STOP QMAIL FIRST!
 /sbin/service qmail stop
 for i in bounce info intd local mess remote todo;
 do find /var/qmail/queue/$i -type f -exec rm {} \;
 /sbin/service qmail start

[edit] Plesk5 websrvmng (sort of)

 /usr/local/psa/admin/bin/my_apci_rst -v

[edit] Plesk UserDirs in 8+

Just create the file /etc/httpd/conf.d/userdir.conf and add in the following contents:

 <VirtualHost  the.primar.ip.address:80>
 ServerName default
 UseCanonicalName Off
 DocumentRoot /var/www/vhosts/default/htdocs
 UserDir httpdocs
 ScriptAlias /cgi-bin/ "/var/www/vhosts/default/cgi-bin/"
 <Directory "/var/www/vhosts/">
        <IfModule sapi_apache2.c>
                php_admin_flag engine on
        Options +Includes +ExecCGI
 <Directory "/home/httpd/vhosts/">
        <IfModule sapi_apache2.c>
                php_admin_flag engine on
                Options +Includes +ExecCGI

[edit] More fun with qmail

 /var/qmail/bin/qmail-qread | grep "" | awk '{print $6}' | sed 's/^/-d/g' | 
 sed 's/#//g' > /home/rack/

then just:

 qmHandle `cat`

[edit] Plesk SPAM link

[edit] Add spell checking to Horde

You need to ADD the following line to

 $conf['utils']['spellchecker'] = 'aspell';

[edit] Lower TTLs in Plesk

 insert into misc values ('soa_TTL','300');
 mysql -Ns -uadmin -p`cat /etc/psa/.psa.shadow` -D psa -e 'select name from domains' | 
 awk '{print "/usr/local/psa/admin/sbin/dnsmng update " $1 }' | sh
Personal tools