Ubuntu 18.04
Sponsored Link

メールログレポート : pflogsumm
2018/05/12
 
Postfix ログレポートツール pflogsumm をインストールします。
[1] pflogsumm パッケージをインストールします。
root@mail:~#
apt -y install pflogsumm
# 昨日分のメールログのサマリーを出力

root@mail:~#
perl /usr/sbin/pflogsumm -d yesterday /var/log/mail.log
Postfix log summaries for May 11

Grand Totals
------------
messages

     18   received
     17   delivered
      0   forwarded
      0   deferred
      2   bounced
      0   rejected (0%)
      0   reject warnings
      0   held
      0   discarded (0%)

   9063   bytes received
   8701   bytes delivered
      3   senders
      1   sending hosts/domains
      6   recipients
      3   recipient hosts/domains


Per-Hour Traffic Summary
------------------------
    time          received  delivered   deferred    bounced     rejected
    --------------------------------------------------------------------
    0000-0100           0          0          0          0          0
    0100-0200           0          0          0          0          0
    0200-0300           0          0          0          0          0
    0300-0400           0          0          0          0          0
    0400-0500           0          0          0          0          0
    0500-0600           0          0          0          0          0
    0600-0700           0          0          0          0          0
    0700-0800           0          0          0          0          0
    0800-0900           0          0          0          0          0
    0900-1000           0          0          0          0          0
    1000-1100           0          0          0          0          0
    1100-1200           0          0          0          0          0
    1200-1300           0          0          0          0          0
    1300-1400           0          0          0          0          0
    1400-1500           9          8          0          2          0
    1500-1600           5          5          0          0          0
    1600-1700           4          4          0          0          0
    1700-1800           0          0          0          0          0
    1800-1900           0          0          0          0          0
    1900-2000           0          0          0          0          0
    2000-2100           0          0          0          0          0
    2100-2200           0          0          0          0          0
    2200-2300           0          0          0          0          0
    2300-2400           0          0          0          0          0

Host/Domain Summary: Message Delivery
--------------------------------------
 sent cnt  bytes   defers   avg dly max dly host/domain
 -------- -------  -------  ------- ------- -----------
      8     4971        0     0.1 s    0.3 s  mail.srv.world
      7     2491        0     0.2 s    0.3 s  localhost
      2     1239        0     0.2 s    0.2 s  srv.world

Host/Domain Summary: Messages Received
---------------------------------------
 msg cnt   bytes   host/domain
 -------- -------  -----------
     18     9063   mail.srv.world

Senders by message count
------------------------
     15   ubuntu@mail.srv.world
      2   bionic@mail.srv.world
      1   debian@mail.srv.world

Recipients by message count
---------------------------
      8   ubuntu@mail.srv.world
      4   ubuntu@localhost
      2   bionic@localhost
      1   debian@localhost
      1   bionic@srv.world
      1   ubuntu@srv.world

Senders by message size
-----------------------
   8012   ubuntu@mail.srv.world
    700   bionic@mail.srv.world
    351   debian@mail.srv.world

Recipients by message size
--------------------------
   4971   ubuntu@mail.srv.world
   1440   ubuntu@localhost
    700   bionic@localhost
    628   bionic@srv.world
    611   ubuntu@srv.world
    351   debian@localhost

message deferral detail: none

message bounce detail (by relay)
--------------------------------
  local (total: 2)
         2   Not a directory

message reject detail: none

message reject warning detail: none

message hold detail: none

message discard detail: none

smtp delivery failures: none

Warnings
--------
  smtpd (total: 2)
         1   unknown[10.0.0.229]: SASL PLAIN authentication failed:
         1   unknown[10.0.0.229]: SASL LOGIN authentication failed: UGFzc3dv...
  tlsmgr (total: 4)
         2   redirecting the request to postfix-owned data_directory /var/li...
         2   request to update table btree:/etc/postfix/smtpd_scache in non-...

Fatal Errors: none

Panics: none

Master daemon messages
----------------------
     15   daemon started -- version 3.3.0, configuration /etc/postfix
     12   terminating on signal 15

root@mail:~#
# 毎日午前1時に昨日分のメールログのサマリーをroot宛てにメール送信

00 01 * * * perl /usr/sbin/pflogsumm -e -d yesterday /var/log/mail.log | mail -s 'Logwatch for Postfix' root
関連コンテンツ
 
Tweet