Docker コンテナ内で app/jobs/scheduled/poll_mailbox.rb に以下の変更を適用し、その後 Rails コンソールで Jobs::PollMailbox.new.execute({}) を実行してください。
pop3.start(SiteSetting.pop3_polling_username, SiteSetting.pop3_polling_password) do |pop|
+ mail_string = nil
pop.each_mail do |p|
+ mail_string = nil
mail_string = p.pop
break if mail_too_old?(mail_string)
process_popmail(mail_string)
p.delete if SiteSetting.pop3_polling_delete_from_server?
+ rescue => e
+ puts e.message
+ puts e.backtrace.join("\n\t")
+ puts "", "MESSAGE:", mail_string if mail_string
end
end