Email-Server
Apache James 隊列落後
由於某種原因,當傳遞的消息總是落後於實際發送時,我經常遇到隊列釋放問題。James 設置為將傳入消息發送到網關 (Postfix)。
RemoteDelivery 類具有:
// Set it to try to deliver (in a separate thread) immediately // (triggered by storage)
究竟什麼是“儲存”以及在哪裡配置?
我設置了一個 mailet,它將匹配的消息(基於收件人域)發送到網關(在 mailetcontainer 中指定)。在它被“卡住”以傳送到網關之前,這一直很好。在 James 日誌中,它顯示為
Successfully spooled mail
來自發件人,然後顯示為[TID=83] INFO 11:04:54,858 | james.smtpserver | Id='1510412390' User='' Successfully spooled mail Mail1581005094857-978ba32f-74e6-4ca1-b903-7994637a9873 from <address@remote> on <remote sender IP> for [<address@local>] ... [TID=734] INFO 11:04:55,290 | james.mailetcontext | Remotely delivering mail Mail1581005094857-978ba32f-74e6-4ca1-b903-7994637a9873 [TID=34] INFO 11:04:55,290 | james.mailetcontext | Remote delivery thread (0) will process mail Mail1581005072858-90055113-03cf-4bc0-84d7-d47d176feef2 [TID=34] INFO 11:04:55,290 | james.mailetcontext | Attempting to deliver Mail1581005072858-90055113-03cf-4bc0-84d7-d47d176feef2 [TID=734] INFO 11:04:55,312 | james.mailetcontext | Adding SMTP gateway: <gateway address> [TID=734] INFO 11:04:55,312 | james.mailetcontext | Sending mail to [<address@local>] via [<gateway address>] [TID=34] INFO 11:04:55,312 | james.mailetcontext | Adding SMTP gateway: <gateway adrdress> [TID=34] INFO 11:04:55,312 | james.mailetcontext | Attempting delivery of Mail1581005072858-90055113-03cf-4bc0-84d7-d47d176feef2 to host <gateway adrdress> at <gateway adrdress> from <address@remote> for addresses [<address@local>]]
但我沒有看到郵件已成功發送到網關。
為了讓它“解開”,我需要將另一條傳入消息發送給 James,該消息將命中同一個 mailet 以推送之前被卡住的假離線消息。然後在詹姆斯日誌中它將顯示為
[TID=35] INFO 11:22:14,443 | james.mailetcontext | Mail (Mail1581005094857-978ba32f-74e6-4ca1-b903-7994637a9873) sent successfully to <gateway adrdress> at <gateway adrdress> from <address@remote> for [[<address@local>]]
看起來,如果中繼主機發生變化,相關隊列就會開始表現不同,就像一個紙巾管,裡面有乒乓球。只有當足夠多的球被推入時,才能從另一端取出一個。對此有什麼想法嗎?
ActiveMQ ver 5.4.2 出現了問題。升級到 5.5.1,隊列問題消失了。