pflogsumm postfix mail log analyzer pflog


yum install perl-Date-Calc

sudo curl -O http://jimsun.linxnet.com/downloads/pflogsumm-1.1.3.tar.gz

tar -xzf pflogsumm-1.1.3.tar.gz

mv pflogsumm-1.1.3 pflogsumm

chmod +x pflogsumm/pflogsumm.pl

perl   /usr/local/pflogsumm/pflogsumm.pl   /var/log/maillog

# generate log summary for yesterday

[root@mail ~]# perl /usr/sbin/pflogsumm -d yesterday /var/log/maillog


To run cronjob for pflogsumm

crontab -e

# send mail log summary at AM 1:00 everyday to root

00 01 * * * perl /usr/sbin/pflogsumm -e -d yesterday /var/log/maillog | mail -s 'Logwatch for Postfix' root

http://jimsun.linxnet.com/postfix_contrib.html

https://www.dropbox.com/s/rkbp13lz4eon988/pflogsumm-1.1.3.tar.gz?dl=0

start a daemon at startup ubuntu

  • To start a daemon at startup:
    update-rc.d service_name defaults
    
  • To remove:
    update-rc.d -f service_name remove
    
defaults => default run levels 2,3,4 and 5
Example:
update-rc.d tomcat7 defaults

difference between use of port 25 465 and 587

port 25 is used for transmitting email between MTA's also known as SMTP relaying.

port 465 is no longer used on ssl-smtp(although port 465 was never published as an official SMTP transmission or submission channel by the IETF ) and IANA has now assigned 465 to new service called "urd".

The RFC proposed a split of the traditional message submission and message relay concept. The RFC defined that message submission should occur over port 587 to ensure new policy and security requirements don't interfere with the traditional relay traffic over message relay port 25.
Port 587 is for msa - it is almost like standard SMTP port. SSL encryption may be started by STARTTLS command at SMTP level if server supports it and your ISP does not filter server's EHLO reply (reported 2014 Nov). MSA should accept email after authentication (e.g. after SMTP AUTH). It helps to stop outgoing spam when netmasters of DUL ranges can block outgoing connections to SMTP port (port 25)