差異處
這裏顯示兩個版本的差異處。
| tech:mailtool [2014/06/21 09:11] – 建立 jonathan | tech:mailtool [2018/08/20 15:36] (目前版本) – Jonathan Tsai | ||
|---|---|---|---|
| 行 1: | 行 1: | ||
| + | ====== 整理處理 sendmail / postfix 的工具 ====== | ||
| + | ===== 刪除與搬移 mqueue 信件 ===== | ||
| + | ==== postfix ==== | ||
| + | * 主要是使用 postsuper 這指令 | ||
| + | - 刪除所有在 Queue 中的郵件 <code sh> | ||
| + | postsuper -d ALL | ||
| + | </ | ||
| + | - 刪除還再重試發送的郵件 <code sh> | ||
| + | postsuper -d ALL deferred | ||
| + | </ | ||
| + | * 參考網址 : https:// | ||
| + | ==== sendmail ==== | ||
| + | * 下載 qtool.pl 工具< | ||
| + | su - root | ||
| + | wget http:// | ||
| + | mv qtool.pl.txt qtool.pl | ||
| + | chmod a+x qtool.pl | ||
| + | </ | ||
| + | * 查看 mail queue <code sh> | ||
| + | mailq | ||
| + | </ | ||
| + | [root@kvm-mail ~]# mailq | ||
| + | / | ||
| + | -----Q-ID----- --Size-- -----Q-Time----- ------------Sender/ | ||
| + | s5KFWHYA005580 | ||
| + | | ||
| + | < | ||
| + | : | ||
| + | s5I7HYV3002743 | ||
| + | | ||
| + | | ||
| + | s5I7HYV7002743 | ||
| + | | ||
| + | < | ||
| + | Total requests: 7 | ||
| + | |||
| + | </ | ||
| + | * 查看 s5I7HYV3002743 信件內容 <code sh> | ||
| + | cat / | ||
| + | </ | ||
| + | * 確認要刪除 s5I7HYV3002743 | ||
| + | ./qtool.pl -d / | ||
| + | </ | ||
| + | * 再透過 mailq 可以看到這筆已經消失 | ||
| + | * 參考網址 : http:// | ||
| + | |||
| + | |||
| + | {{tag> | ||