Archive

Archive for the ‘Plesk’ Category

How to get mail statistics from your postfix mail logs

January 21st, 2018 No comments

How to get mail statistics from your postfix mail logs

 

Its an amazing tool and will provide you the following details

  • Total number of:
    • Messages received, delivered, forwarded, deferred, bounced and rejected
    • Bytes in messages received and delivered
    • Sending and Recipient Hosts/Domains
    • Senders and Recipients
    • Optional SMTPD totals for number of connections, number of hosts/domains connecting, average connect time and total connect time
  • Per-Day Traffic Summary (for multi-day logs)
  • Per-Hour Traffic (daily average for multi-day logs)
  • Optional Per-Hour and Per-Day SMTPD connection summaries
  • Sorted in descending order:
    • Recipient Hosts/Domains by message count, including:
      • Number of messages sent to recipient host/domain
      • Number of bytes in messages
      • Number of defers
      • Average delivery delay
      • Maximum delivery delay
    • Sending Hosts/Domains by message and byte count
    • Optional Hosts/Domains SMTPD connection summary
    • Senders by message count
    • Recipients by message count
    • Senders by message size
    • Recipients by message size

    with an option to limit these reports to the top nn.

  • A Semi-Detailed Summary of:
    • Messages deferred
    • Messages bounced
    • Messages rejected
  • Summaries of warnings, fatal errors, and panics
  • Summary of master daemon messages

Installation :-

Installation is very simple , just download the package and unzip

  •  wget http://jimsun.linxnet.com/downloads/pflogsumm-1.1.5.tar.gz
  •  tar -zxf pflogsumm-1.1.5.tar.gz
  • chown root:root pflogsumm-1.1.5

 

Generate the statistics  :-

cat /var/log/maillog | ./pflogsumm.pl
( The above command will generate a detailed statistics as follows )

 

Grand Totals
————
messages

118 received
319 delivered
1 forwarded
6 deferred (1597 deferrals)
18 bounced
20 rejected (5%)
0 reject warnings
0 held
0 discarded (0%)

5452k bytes received
277987k bytes delivered
76 senders
49 sending hosts/domains
128 recipients
37 recipient hosts/domains

Per-Day Traffic Summary
date received delivered deferred bounced rejected
——————————————————————–
Jan 13 2018 51 251 476 14 9
Jan 14 2018 17 16 522 2 5
Jan 15 2018 43 45 527 2 6
Jan 16 2018 7 7 72

Per-Hour Traffic Daily Average
time received delivered deferred bounced rejected
——————————————————————–
0000-0100 0 1 19 0 0
0100-0200 1 1 13 0 0
0200-0300 1 1 13 0 0
0300-0400 1 1 19 0 0
0400-0500 1 1 14 0 0
0500-0600 0 0 7 0 0
0600-0700 1 1 13 0 0
0700-0800 1 1 13 0 0
0800-0900 0 0 7 0 0
0900-1000 2 2 14 0 1
1000-1100 5 51 32 3 0
1100-1200 1 1 33 0 0
1200-1300 1 4 14 0 0
1300-1400 2 2 20 0 0
1400-1500 2 2 20 0 0
1500-1600 4 4 14 0 0
1600-1700 1 1 20 0 0
1700-1800 2 2 20 0 1
1800-1900 1 2 14 1 0
1900-2000 1 1 13 0 2
2000-2100 1 1 19 0 0
2100-2200 1 1 19 0 0
2200-2300 1 1 13 0 0
2300-2400 1 1 19 0 1

Categories: Plesk, Uncategorized Tags:

Upgrading MySQL Governor on CPanel, Plesk and DirectAdmin server

November 29th, 2012 No comments

Upgrading MySQL Governor on CPanel, Plesk and DirectAdmin server

 

Run the below command to update MySQL Governor

yum update db-governor db-governor-mysql –enablerepo=cloudlinux-updates-testing

Run the below command to restart the service

service db_governor restart

 

How to install MySQL Governor on CPanel, Plesk and DirectAdmin

November 29th, 2012 No comments

How to install MySQL Governor on CPanel, Plesk and DirectAdmin

MySQL governor is set of utilities to monitor and restrict MySQL usage in shared hosting environment. The monitoring is done via USER_STATISTICS table that is available in CloudLinux version of MySQL as well as via tracking of slow queries.

To install MySQL governor on cPanel server

yum install db-governor –enablerepo=cloudlinux-updates-testing
/usr/share/lve/dbgovernor/install-mysql.py –install

Note :

MySQL on cPanel servers will be updated from CloudLinux RPMs.

MySQL Governor is compatible only with MySQL 5.x

 

Cannot Login plesk after installation

November 12th, 2012 No comments

Cannot Login plesk after installation or reset plesk admin

password

 

Login to SSH.

Run the below command

/usr/local/psa/bin/init_conf –set-admin-password -passwd NEW_PASSWORD

 

Categories: Plesk Tags:

Apache failed to start with the “No space left on device” error

November 10th, 2012 No comments

Apache failed to start with the “No space left on device” error.

Login to server via SSH.

Check the apache error logs you are getting while restarting plesk.

================================================

-[notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[error] (28)No space left on device: Cannot create SSLMutex
Configuration Failed

================================================

How much IPC resources are used can be found using ‘ipcs’ command:

 ipcs -a

run the below command to check the apache resource usage.

ipcs -a | grep apache

Run the below command to get the apache resource ids.

ipcs -a | grep apache | cut -d ” ” -f2

Delete all the apache resource files using the below command.

for i in `ipcs -a | grep apache | cut -d ” ” -f2`; do ipcrm -s $i; done

Again, check the apache resource usage.

ipcs -a | grep apache

Run, the below command again to check the IPC resource usage.

ipcs -a

Now, restart apache using the below command.

/etc/init.d/httpd restart

 

Categories: Plesk Tags:

How to Replace DrWeb with ClamAV in Plesk

November 10th, 2012 No comments

How to Replace DrWeb with ClamAV in Plesk

 

If you are looking for a way to scan emails for viruses without paying for drweb or some other commercial virus scanning software in linux plesk then you can easily achieve that with ClamAV.
And you can install ClamAV easily by following some simple steps as below :

Firstly we need to remove Drweb if it is installed :

 [email protected][#] yum remove *drweb*

or

[email protected][#] rpm -e drweb drweb-qmail

Then install qmail-scanner/clamav/spamassassin

[email protected][#] yum install qmail-scanner
[email protected][#] yum install clamd
[email protected][#] yum install spamassassin

Optional

[email protected][#] yum install psa-spamassassin

[email protected][#] /usr/bin/qmail-scanner-reconfigure

 

Categories: Plesk Tags:

How to uninstall Dr.Web Antivirus

November 10th, 2012 No comments

How to uninstall Dr.Web Antivirus.

 

Login to server via SSH.

Remove DrWeb antivirus packages:

 rpm -e drweb-updater drweb-common drweb-bases drweb-base drweb-daemon psa-drweb-configurator

Remove the cron entry remaining after the uninstallation:

 rm -rf /var/spool/cron/drweb

Discontinue monitoring of the service by Watchdog:

/usr/local/psa/admin/bin/modules/watchdog/wd –unmonit-service=drweb

 

Categories: Plesk Tags:

How to retrive plesk admin password

October 23rd, 2012 No comments

How to retrive plesk admin password

 

Apart from the password reminder available on the login screen, you can use theplesksrvclient.exe utility located in the %plesk_bin% folder to set up a new password or retrieve the old one.
You can set up a new password by running the following command:

"%plesk_bin%\plesksrvclient" -set <new_password> true

You can also retrieve the current password by running this utility with:

"%plesk_bin%\plesksrvclient" -get

To retrieve the password in the command line, you can use -nogui option:

"%plesk_bin%\plesksrvclient" -get  -nogui > plesk_password.txt

After that, you can find the retrieved Plesk password in the plesk_password.txt file.

 

Categories: Plesk Tags:

How to install php-mcrypt in linux plesk

October 23rd, 2012 No comments

How to install php-mcrypt in linux plesk

 

Login to server via SSH.

Download atomic repo using the below link:

wget -O – http://www.atomicorp.com/installers/atomic |sh

Then you can install php-mcrypt using below command.

yum install php-mcrypt

 

Categories: Plesk Tags:

Command to check plesk version

October 23rd, 2012 No comments

Command to check plesk version

Login to shell.

check the version file in /usr/local/psa/ there you can check the plesk version.

cat /usr/local/psa/version

 

Categories: Plesk Tags:
%d bloggers like this: