LoginSignup
2
1

More than 5 years have passed since last update.

pflogsummの'-e'オプションについて

Last updated at Posted at 2013-08-30

概要

postfixのmaillogを解析する優れたツールであるpflogsummですが、
ちょっと立ち入ったログを吐き出したいときに使う '-e' オプションがあります。
(extended ? extreme ?)

これを使うと MessageID 送信者 , 受信者のリスト を表示してくれますが
日付が入らないのが不便に思っていました。

勝手に改造

***************
*** 799,806 ****
        $addr = "from=<>"
        }
        $msgSizes{$qid} = $size;
!       my $eDateStr = sprintf "%d-%02d-%02d %02d:%02d:%02d ", $msgYr, $msgMon, $msgDay,  $msgHr, $msgMin, $msgSec;
!       push(@{$msgDetail{$qid}}, $eDateStr . $addr) if($opts{'e'});
        # Avoid counting forwards
        if($rcvdMsg{$qid}) {
        # Get the domain out of the sender's address.  If there is
--- 799,805 ----
        $addr = "from=<>"
        }
        $msgSizes{$qid} = $size;
!      push(@{$msgDetail{$qid}}, $addr) if($opts{'e'});
        # Avoid counting forwards
        if($rcvdMsg{$qid}) {
        # Get the domain out of the sender's address.  If there is

MessageIDの後ろに日付が入ります。

2
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
1