現在のメールキューの一覧は、postqueue コマンドのオプション -p コマンドで確認できます。

# postqueue -p
-Queue ID- --Size-- ----Arrival Time---- -Sender/Recipient-------
6F7B61A023A     1563 Mon Apr 14 12:50:41  test@xxxxxx.com
        (connect to xxxxx.com[203.142.***.**]:25: Connection timed out)
                                         test@xxxxxx.com

BA1651A023D     1539 Mon Apr 14 13:15:49  test@xxxxxx.com
       (connect to xxxxx.comp[111.87.****.**]:25: Connection timed out)
                                         test@xxxxxx.com

B3A6B1A0267     1540 Mon Apr 14 13:03:03  test@xxxxxx.com
        (connect to xxxxx.com[203.142.***.**]:25: Connection timed out)
                                         test@xxxxxx.com

-- 6 Kbytes in 3 Requests.

 

上記一覧を確認後に特定のメールキューを削除する場合は、postsuper -d を使用し、キューIDを指定します。

# postsuper -d 6F7B61A023A
postsuper: 6F7B61A023A: removed
postsuper: Deleted: 1 message

 

なお、全てのメールキューを削除する場合は以下のコマンドを実行します。

# postsuper -d ALL
postsuper: Deleted: 2 messages

 

なお、メールキューを削除せずに全て再送信する場合は、以下のコマンドを実行します。

# postfix flush

 

[対象]
CentOS 5.x
Postfix 2.xx.xx