How to clear the mailqueue.

Check the mailq:

# /usr/local/psa/admin/bin/mailqueuemng -s

View 5 of the items for a certain domain:

# /usr/local/psa/admin/bin/mailqueuemng -s | grep -C 5 user@domain.com
# /usr/local/psa/admin/bin/mailqueuemng -D"

or

# postsuper -d ALL

If you get a permission error on an older PLesk 9 instance

# /usr/sbin/postsuper -d ALL

To remove specific emails from a domain:

# postqueue -p | tail -n +2 | awk 'BEGIN { RS = "" } /@domain\.com/ { print $1 }' | tr -d '*!' | postsuper -d -

Or

# mailq | tail -n +2 | grep -v '^ *(' | awk  'BEGIN { RS = "" } { if ($8 == "USER@EXAMPLE.COM" && $9 == "") print $1 } ' | tr -d '*!' | postsuper -d -

On Tuesday, October 14, 2014, iSIGHT Partners and Microsoft announced a Zero-Day vulnerability named “Sandworm” found in all versions of Microsoft Windows and Windows Server 2008 and 2012.

The vulnerability has been exploited in a small number of cyberespionage attacks against NATO, energy companies, a US academic organization and many others. Microsoft has since created a patch and released it as one of their security updates (CVE-2014-4114.).

If you have enabled automatic updating, the Microsoft security update will be downloaded and installed automatically. If you have not, it is critical that you run the security update from Microsoft, as well as all other important security updates through the Windows Updater immediately.

If you would like to learn more about the Sandworm vulnerability, in-depth information can be found on iSIGHT Partners blog and Microsoft’s Security TechCenter.

First check permission of /usr/local/cpanel/3rdparty/bin/awstats.pl, it should be 755.

Then to update awstats and webalizer run the script :


# /scripts/runweblogs user_nameIf that didn't work try fixwebalizer script :


# /scripts/fixwebalizer

If that doesn’t update stats, then check domlogs of the domain and see if it is up to date. You can use the following script to run statistics :


# /scripts/runstatsonce

If none of the above fixes the issue and the awstats page for the domain is still showing the old date for last update, run the following command :


# /usr/bin/perl /usr/local/cpanel/3rdparty/bin/awstats.pl -config=/home/user_name/tmp/awstats/awstats.domain.com.conf -LogFile=/usr/local/apache/domlogs/domain.com -update

Error

Error: Plugin load for plugin ‘geoipfree’ failed with return code: Error: Can’t locate Geo/IPfree.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 . /usr/local/cpanel/3rdparty/bin/lib /usr/local/cpanel/3rdparty/bin/plugins /usr/local/cpanel/3rdparty/bin/plugins) at (eval 2) line 1.

Cpan

cpan install Geo:IPfree

Other info

Log files at /usr/local/apache/domlogs/domain.com
Config for awstats /home/fl/tmp/awstats/awstats.domain.com.conf
Location of all log files – /home/domain/tmp

If the logs are archived – look here – /home/fl/logs

# cd /home/fl/logs
ls -la
domain.com-Nov-2014.gz
domain.com-Oct-2014.gz

Un archive

# tar -xvzf domain.com-Nov-2014.gz
# ls
domain.com-Nov-2014.log

Unarchive the file and run the command to rebuild it

# /usr/bin/perl /usr/local/cpanel/3rdparty/bin/awstats.pl -config=/home/user_name/tmp/awstats/awstats.domain.com.conf -LogFile=/home/user_name/logs/domain.com-Nov-2014.log -update

Location of cpanel access logs

Apache Logs

General Error and Auditing Logs:
Location : /usr/local/apache/logs/error_log
Description : All exceptions caught by httpd along with standard error output from CGI applications are logged here..
The first place you should look when httpd crashes or you incur errors when accessing website.

Domain Access Logs:
Location : /usr/local/apache/domlogs/domain.com
Description : General access log file for each domain configured with cPanel.

Apache Access Logs:
Location : /usr/local/apache/logs/access_log
Description : Complete web server access log records all requests processed by the server.
MySQL Logs

MySQL General Information and Errors:
Location : /var/lib/mysql/$(hostname).err
Description : This path could vary, but is generally located in /var/lib/mysql. Could also be located at /var/log/mysqld.log

Export, Copy and Restore a Mysql Database to a remote server

export database


# mysqlexport -uroot databasename > databasename.sql

Copy to other server


#scp databasename.sql root@remote.box:/backup

Restore

# mysql -u user -p databasename < databasename.sql [/bash] How do I copy a MySQL database from one computer/server to another? Other commands: [bash] # mysqldump db-name | mysql -h remote.box.com db-name [/bash] Use ssh if you don't have direct access to remote mysql server (secure method): [bash] # mysqldump db-name | ssh user@remote.box.com mysql db-name [/bash] OR [bash] # mysqldump -u username -p'password' databasename | ssh user@remote.box mysql -u username -p'password databsename [/bash] You can just copy table called foo to remote database (and remote mysql server remote.box.com) called bar using same syntax: [bash] # mysqldump db-name foo | ssh user@remote.box.com mysql bar [/bash] OR [bash] # mysqldump -u user -p'password' db-name foo | ssh user@remote.box.com mysql -u user -p'password' db-name foo [/bash] Bash Script [bash] /bin/bash DBUSER=user DBPASSWORD=pwd DBSNAME=sourceDb DBNAME=destinationDb DBSERVER=db.example.com fCreateTable="" fInsertData="" echo "Copying database ... (may take a while ...)" DBCONN="-h ${DBSERVER} -u ${DBUSER} --password=${DBPASSWORD}" echo "DROP DATABASE IF EXISTS ${DBNAME}" | mysql ${DBCONN} echo "CREATE DATABASE ${DBNAME}" | mysql ${DBCONN} for TABLE in `echo "SHOW TABLES" | mysql $DBCONN $DBSNAME | tail -n +2`; do createTable=`echo "SHOW CREATE TABLE ${TABLE}"|mysql -B -r $DBCONN $DBSNAME|tail -n +2|cut -f 2-` fCreateTable="${fCreateTable} ; ${createTable}" insertData="INSERT INTO ${DBNAME}.${TABLE} SELECT * FROM ${DBSNAME}.${TABLE}" fInsertData="${fInsertData} ; ${insertData}" done; echo "$fCreateTable ; $fInsertData" | mysql $DBCONN $DBNAME [/bash] Copy the /var/lib/mysql folder to the new server. Only if the databases are Mysiam 1. Shut down mysql 2. rename the current /var/liv/mysql to /var/liv/mysql-bak 3. copy the old /var/liv/mysql to /var/lib/mysql 4. Restore file ownership to mysql:mysql for everything in /var/lib/mysql: [bash] # sudo chown -R mysql:mysql /var/lib/mysql [/bash] 5. mysql_upgrade -u root -p Notes: It is the mysql root password from the old system! The file /var/lib/mysql/mysql_upgrade_info needs to be writable. 6. Restart Mysql [bash] # service restart mysqld [/bash] Also - check out this - Percona XtraBackup http://www.percona.com/software/percona-xtrabackup

Check you version of Roundcube

Go to: https://myroundcube.com/myroundcube-plugins/plugin-manager
Download the plugin manager version for your roundcube

Extract and upload the the roundcube plugins directory
extracted

Upload to

# /usr/share/psa-roundcube/plugins

Modify the config file

# /usr/share/psa-roundcube/config/config.inc.php
$config['plugins'] = array('password', 'markasjunk2', 'sieverules');

Change to

 # $config['plugins'] = array('plugin_manager', 'password', 'sieverules');

Access Roundcube and login. Click About

about

This should pop up

file

Add the file to roundcube

# touch /usr/share/psa-roundcube/urv58kf60qjia0n1h447mr8i12.myrc

Go to Settings > You Should now see the Plugins Manager

For cPanel/WHM, to enable PDO in the system you can use EasyApache:

1. Login to WHM
2. Click Apache Update
3. Click Start Customizing Based on Profile
4. Select an Apache version
5. Click Next Step
6. Select PHP 5
7. Click Next Step
8. Select a version of PHP 5
9. Click Next Step
10. Click Exhaustive Options List button
11. Scroll down to the check box labeled PDO
12. Click Save and Build

By default deflate module is already compiled on Plesk based Linux servers(new versions). You just need to add the rules in Apache to enable/load the deflate module.

You can test if your website already has mod_deflate enabled using the following tool.

http://www.whatsmyip.org/mod_gzip_test/

Check the main httpd.conf file

# grep 'mod_deflate' /etc/httpd/conf/httpd.conf

If the result was LoadModule deflate_module modules/mod_deflate.so, you can continue. If the result was #LoadModule deflate_module modules/mod_deflate.so, please run the following command:

# perl -pi -e 's/# LoadModule mod_deflate/LoadModule mod_deflate/g' /etc/httpd/conf/httpd.conf

Then add this to the httpd.conf file for the site

#
# Deflate output configuration
#
AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4.0[678] no-gzip
BrowserMatch bMSIE !no-gzip !gzip-only-text/html

Restart Apache and test from online tools to see if deflate is enabled.

Other configuration

Include this in the conf.d directory. Make sure that the conf.d directory is included in httpd.conf.


# Insert filter
SetOutputFilter DEFLATE

# Netscape 4.x has some problems...
BrowserMatch ^Mozilla/4 gzip-only-text/html

# Netscape 4.06-4.08 have some more problems
BrowserMatch ^Mozilla/4.0[678] no-gzip

# MSIE masquerades as Netscape, but it is fine
# BrowserMatch bMSIE !no-gzip !gzip-only-text/html

# NOTE: Due to a bug in mod_setenvif up to Apache 2.0.48
# the above regex won't work. You can use the following
# workaround to get the desired effect:
BrowserMatch bMSI[E] !no-gzip !gzip-only-text/html

# Don't compress images
SetEnvIfNoCase Request_URI 
.(?:gif|jpe?g|png)$ no-gzip dont-vary

# Make sure proxies don't deliver the wrong content
Header append Vary User-Agent env=!dont-vary

Restart Apache and test from online tools to see if deflate is enabled.

Easy

On a Plesk server, the mod_deflate module is installed by default, however it may be disabled in the Apache configuration file. To enable the mod_deflate module in Plesk edit the Apache configuration file

# vi /etc/httpd/conf/httpd.conf

Search the line that says,

#LoadModule deflate_module modules/mod_deflate.so

and uncomment it i.e. remove the ‘#’ mark

LoadModule deflate_module modules/mod_deflate.so

Now, create a /etc/httpd/conf.d/deflate.conf file. Apache reads all the .conf files from the /etc/httpd/conf.d directory on a Plesk server.


# vi /etc/httpd/conf.d/deflate.conf

and place the following code in it

SetOutputFilter DEFLATE
SetEnvIfNoCase Request_URI  \
\.(?:gif|jpe?g|png)$ no-gzip dont-vary

Save the file and restart Apache.

# service httpd restart

Source: http://linuxhostingsupport.net/blog/how-to-enable-http-compression-on-a-plesk-server