整理處理 sendmail / postfix 的工具

  • 下載 qtool.pl 工具
    su - root
    wget http://www.cyberciti.biz/files/perl/qtool.pl.txt
    mv qtool.pl.txt qtool.pl
    chmod a+x qtool.pl
  • 查看 mail queue
    mailq
    [root@kvm-mail ~]# mailq
                    /var/spool/mqueue (7 requests)
    -----Q-ID----- --Size-- -----Q-Time----- ------------Sender/Recipient-----------
    s5KFWHYA005580      713 Fri Jun 20 23:32 <>
                     (Deferred: Connection timed out with dialup-62-11-236-182.cli)
                                             <run.payroll.invoice@dialup-62-11-236-
    :
    s5I7HYV3002743      580 Wed Jun 18 15:20 <[email protected]>
                     (Deferred: Connection timed out with mailx.tcommerce.de.)
                                             [email protected]
    s5I7HYV7002743        1 Wed Jun 18 15:20 <[email protected]>
                     (readqf: cannot open ./dfs5I7HYV7002743: No such file or dire)
                                             <[email protected]>
                    Total requests: 7
    
  • 查看 s5I7HYV3002743 信件內容
    cat /var/spool/mqueue/dfs5I7HYV3002743 
  • 確認要刪除 s5I7HYV3002743
    ./qtool.pl -d /var/spool/mqueue/s5I7HYV3002743
  • 再透過 mailq 可以看到這筆已經消失
  • tech/mailtool.txt
  • 上一次變更: 2018/08/20 15:36
  • Jonathan Tsai