Archive for May, 2010

Changing the Plesk Administrator email address

In the Plesk Control Panel you can set your email address for the Plesk Administrator. This address is used for all system-related messages. The address is also stored in the following files on your server, which uses the the popular qmail mail server.

/var/qmail/alias/.qmail-mailer-daemon
/var/qmail/alias/.qmail-postmaster
/var/qmail/alias/.qmail-root

You can edit these files to change the email address as originally configured in Plesk.

You can also have multiple entries. Just make sure that each address is on it’s own separate line and prefixed with an “&” symbol.

&root@example.com
&buddy@example.com
&admin@example.com
SBDavid

qmHandle - a tool for the qmail queue

qmHandle - a tool for the qmail queue

qmHandle is a tool which can be used to manage the qmail message queue. It’s written in Perl (so fully customizable) and has more features than qmail-qread and qmail-qstat.

You can print queue statistics, like qmail-qstat, with color capabilities.
You can view a message in the queue.
You can remove one or more messages from the queue based on a criterion or use multiple delete requests each having its own criterion.

Download qmHandle from SourceForge. You actually only need the script ‘qmHandle’ Upload it to the server and untar it if necessary. You may download the file directly from SourceForge using the wget command:

http://optusnet.dl.sourceforge.net/sourceforge/qmhandle/qmhandle-1.3.2.tar.gz

Then decompress the file using the tar command.

tar -xvzf qmhandle-1.3.2.tar.gz

First it is recommended to shutdown qmail using the service command to prevent possible corruption of the mail queue.

service qmail stop

When you are done with qmhandle be sure to start it again using the service command:

service qmail start

Use -s to see some basic statistics.

qmHandle -s

Available parameters:

-a : try to send queued messages now (qmail must be running)
-l : list message queues
-L : list local message queue
-R : list remote message queue
-s : show some statistics
-mN : display message number N
-dN : delete message number N
-Stext : delete all messages that have/contain text as Subject
-D : delete all messages in the queue (local and remote)
-V : print program version

Additional (optional) parameters:

-c : display colored output
-N : list message numbers only

Reference : http://sourceforge.net/projects/qmhandle/

What can I do if I am unable to start the qmail service in Plesk?

First of all, make sure that qmail is not running.

ps ax | grep qmail-send

If so, try to start it from the command line.

/etc/init.d/qmail start

If that does not work take a look at the /usr/local/psa/var/log/maillog logfile for helpful error messages.

Reference: http://kb.parallels.com/en/

What to Do If MySQL Keeps Crashing on your cPanel Server

First, you should try to find out whether the problem is that the mysqld server dies or whether your problem has to do with your client. You can check how long your mysqld server has been up by executing mysqladmin version. If mysqld has died and restarted, you may find the reason by looking in the server’s error log.

There may be some internal lock problem. mysqladmin -u root processlist usually is able to make a connection even in these cases, and can provide useful information about the current number of connections and their status.

Run the command mysqladmin -i 5 status or mysqladmin -i 5 -r status in a separate window to produce statistics while you run your other queries.

Stop the mysqld server with mysqladmin shutdown, run myisamchk from the data directory to check all MyISAM tables, and restart mysqld.

myisamchk –silent –force */*.MYI

Using myisamchk for Crash Recovery in cPnael

If you run mysqld with external locking disabled (which is the default), you cannot reliably use myisamchk to check a table when mysqld is using the same table.

If the server is run with external locking enabled, you can use myisamchk to check tables at any time. In this case, if the server tries to update a table that myisamchk is using, the server will wait for myisamchk to finish before it continues.

If you use myisamchk to repair or optimize tables, you must always ensure that the mysqld server is not using the table (this also applies if external locking is disabled). If you do not stop mysqld, you should at least do a mysqladmin flush-tables before you run myisamchk. Your tables may become corrupted if the server and myisamchk access the tables simultaneously.

When performing crash recovery, it is important to understand that each MyISAM table tbl_name in a database corresponds to the three files in the database directory shown in the following table.

File Purpose
tbl_name.frm Definition (format) file
tbl_name.MYD Data file
tbl_name.MYI Index file

Each of these three file types is subject to corruption in various ways, but problems occur most often in data files and index files.

myisamchk works by creating a copy of the .MYD data file row by row. It ends the repair stage by removing the old .MYD file and renaming the new file to the original file name.

myisamchk -e tbl_name

This does a complete and thorough check of all data (-e means “extended check”). It does a check-read of every key for each row to verify that they indeed point to the correct row. This may take a long time for a large table that has many indexes. Normally, myisamchk stops after the first error it finds. If you want to obtain more information, you can add the -v (verbose) option. This causes myisamchk to keep going, up through a maximum of 20 errors.

Reference: http://dev.mysql.com/

« Prev - Next »