The Blog

PLESK

Setting up pflogsumm on CentOS to run nightly on PLESK Postfix

Posted on

Here is a small post on how to setup pflogsumm on your CentOS mail server running Postfix.  It takes advantage of logrorate being called nightly by cron.

1. Install pflogsumm

# yum install postfix-pflogsumm

2. Run a test

# /usr/sbin/pflogsumm /var/log/maillog

3. Update /etc/logrotate.d/syslog.  Add the following:

 prerotate
    pflogsumm /usr/local/psa/var/log/maillog | mail -s "Postfix Log - `date`" [email protected]
 endscript

And little script to send you log hourly if you send over 100 emails per hour.
Make sure to add it to your hourly cron job.

 
#!/bin/sh

hour_now=$(date | awk '{print $2,"", $3, substr($4,0,2)}')
var1=$(grep "$hour_now" /usr/local/psa/var/log/maillog|pflogsumm)
if (( $(echo "$var1" | sed -n '/  delivered$/p' | tr -d '[:alpha:]') > 100 ));
then
echo $var1 | mail -s "Postfix Log - `date`" [email protected]
fi
Posted in PLESK 1 Comment

Postfix Requires TLS‎ in PLESK 10.x

Posted on

Edit /etc/postfix/master.cf file

Original Value is like that:

submission inet n – – – – smtpd -o smtpd_enforce_tls=yes -o smtpd_tls_security_level=encyrpt-o smtpd_sasl_auth_enable=yes -o smtpd_client_restrictions=permit_sasl_authenticate d,reject -o smtpd_sender_restrictions= -o smtpd_proxy_filter=127.$

Change it as like as this one

submission inet n – – – – smtpd -o smtpd_enforce_tls=no -o smtpd_tls_security_level=may -o smtpd_sasl_auth_enable=yes -o smtpd_client_restrictions=permit_sasl_authenticate d,reject -o smtpd_sender_restrictions= -o smtpd_proxy_filter=127.$

Then start postfix, that removes STARTTLS requirement at postfix submission service.

By the way, the command to make postfix accept the changed settings is:

postfix reload

Posted in PLESK Leave a comment

Symfony 2 and Plesk 10 on CenOS 5

Posted on

Here it goes:

In order to change default document root for a domain hosted in a plesk control panel we need to create vhost.conf file in the directory in which http.include for the domain resides. Directly changing the document root entry in httpd.include causes the modification to be overwritten with default entry since plesk overwrites entries in configuration files with database entries
Entries to be put in the vhost.conf follows
Read More

Posted in PHP, PLESK Leave a comment
« Previous PageNext Page »