What are general best practices for deploying mailman so it can run unattended?

138 Views Asked by At

I get mail with gem mailman but after working for a while it either hangs or dies.

I have it running in the loop already because of periodical connection error:

begin
  Mailman::Application.run
rescue IOError
  retry
end

But this is not enough, sometimes it just freezes and I (revive it with Ctrl-C)[https://github.com/titanous/mailman/issues/106] (it runs in screen). But after running for while it spat out a new Net::IMAP::NoResponseError so I rescue from two errors:

rescue IOError, Net::IMAP::NoResponseError

What are best practices to run mailman unattended? Is there a list of errors I should rescue from?

Update

Today it crashed with some Undefined method logout for NilClass in imap.rb. Is there a better way of processing incoming emails?

0

There are 0 best solutions below