E-mail não pode ser processado: Email::Receiver::EmptyEmailError

Acabei de encontrar o mesmo problema descrito aqui. Essencialmente, um único e-mail recebido está causando a falha de toda a fila, impedindo que qualquer e-mail seja processado.

Nos logs:

Email can not be processed: Email::Receiver::EmptyEmailError


activesupport-7.2.2.1/lib/active_support/broadcast_logger.rb:130:in `block in warn'[ ](https://github.com/rails/rails/tree/v7.2.2.1/activesupport/lib/active_support/broadcast_logger.rb#L130)

activesupport-7.2.2.1/lib/active_support/broadcast_logger.rb:231:in `block in dispatch'[ ](https://github.com/rails/rails/tree/v7.2.2.1/activesupport/lib/active_support/broadcast_logger.rb#L231)

activesupport-7.2.2.1/lib/active_support/broadcast_logger.rb:231:in `each'[ ](https://github.com/rails/rails/tree/v7.2.2.1/activesupport/lib/active_support/broadcast_logger.rb#L231)

activesupport-7.2.2.1/lib/active_support/broadcast_logger.rb:231:in `dispatch'[ ](https://github.com/rails/rails/tree/v7.2.2.1/activesupport/lib/active_support/broadcast_logger.rb#L231)

activesupport-7.2.2.1/lib/active_support/broadcast_logger.rb:130:in `warn'[ ](https://github.com/rails/rails/tree/v7.2.2.1/activesupport/lib/active_support/broadcast_logger.rb#L130)

/var/www/discourse/lib/email/processor.rb:183:in `log_email_process_failure'[ ](https://github.com/discourse/discourse/blob/486ff2a5643f7a5ac66ccef11a97d6c2a282c9ee/lib/email/processor.rb#L183)

/var/www/discourse/lib/email/processor.rb:29:in `rescue in process!'[ ](https://github.com/discourse/discourse/blob/486ff2a5643f7a5ac66ccef11a97d6c2a282c9ee/lib/email/processor.rb#L29)

/var/www/discourse/lib/email/processor.rb:16:in `process!'[ ](https://github.com/discourse/discourse/blob/486ff2a5643f7a5ac66ccef11a97d6c2a282c9ee/lib/email/processor.rb#L16)

/var/www/discourse/lib/email/processor.rb:13:in `process!'[ ](https://github.com/discourse/discourse/blob/486ff2a5643f7a5ac66ccef11a97d6c2a282c9ee/lib/email/processor.rb#L13)

/var/www/discourse/app/jobs/scheduled/poll_mailbox.rb:29:in `process_popmail'[ ](https://github.com/discourse/discourse/blob/486ff2a5643f7a5ac66ccef11a97d6c2a282c9ee/app/jobs/scheduled/poll_mailbox.rb#L29)

/var/www/discourse/app/jobs/scheduled/poll_mailbox.rb:49:in `block (2 levels) in poll_pop3'[ ](https://github.com/discourse/discourse/blob/486ff2a5643f7a5ac66ccef11a97d6c2a282c9ee/app/jobs/scheduled/poll_mailbox.rb#L49)

net-pop-0.1.2/lib/net/pop.rb:669:in `each'[ ](https://github.com/ruby/net-pop/blob/master/lib/net/pop.rb#L669)

net-pop-0.1.2/lib/net/pop.rb:669:in `each_mail'[ ](https://github.com/ruby/net-pop/blob/master/lib/net/pop.rb#L669)

/var/www/discourse/app/jobs/scheduled/poll_mailbox.rb:46:in `block in poll_pop3'[ ](https://github.com/discourse/discourse/blob/486ff2a5643f7a5ac66ccef11a97d6c2a282c9ee/app/jobs/scheduled/poll_mailbox.rb#L46)

net-pop-0.1.2/lib/net/pop.rb:531:in `start'[ ](https://github.com/ruby/net-pop/blob/master/lib/net/pop.rb#L531)

/var/www/discourse/app/jobs/scheduled/poll_mailbox.rb:45:in `poll_pop3'[ ](https://github.com/discourse/discourse/blob/486ff2a5643f7a5ac66ccef11a97d6c2a282c9ee/app/jobs/scheduled/poll_mailbox.rb#L45)

/var/www/discourse/app/jobs/scheduled/poll_mailbox.rb:14:in `execute'[ ](https://github.com/discourse/discourse/blob/486ff2a5643f7a5ac66ccef11a97d6c2a282c9ee/app/jobs/scheduled/poll_mailbox.rb#L14)

/var/www/discourse/app/jobs/base.rb:316:in `block (2 levels) in perform'[ ](https://github.com/discourse/discourse/blob/486ff2a5643f7a5ac66ccef11a97d6c2a282c9ee/app/jobs/base.rb#L316)

rails_multisite-6.1.0/lib/rails_multisite/connection_management/null_instance.rb:49:in `with_connection'

rails_multisite-6.1.0/lib/rails_multisite/connection_management.rb:21:in `with_connection'

/var/www/discourse/app/jobs/base.rb:303:in `block in perform'[ ](https://github.com/discourse/discourse/blob/486ff2a5643f7a5ac66ccef11a97d6c2a282c9ee/app/jobs/base.rb#L303)

/var/www/discourse/app/jobs/base.rb:299:in `each'[ ](https://github.com/discourse/discourse/blob/486ff2a5643f7a5ac66ccef11a97d6c2a282c9ee/app/jobs/base.rb#L299)

/var/www/discourse/app/jobs/base.rb:299:in `perform'[ ](https://github.com/discourse/discourse/blob/486ff2a5643f7a5ac66ccef11a97d6c2a282c9ee/app/jobs/base.rb#L299)


/var/www/discourse/app/jobs/base.rb:379:in `perform'[ ](https://github.com/discourse/discourse/blob/486ff2a5643f7a5ac66ccef11a97d6c2a282c9ee/app/jobs/base.rb#L379)

mini_scheduler-0.18.0/lib/mini_scheduler/manager.rb:137:in `process_queue'[ ](https://github.com/discourse/mini_scheduler/blob/master/lib/mini_scheduler/manager.rb#L137)

mini_scheduler-0.18.0/lib/mini_scheduler/manager.rb:77:in `worker_loop'[ ](https://github.com/discourse/mini_scheduler/blob/master/lib/mini_scheduler/manager.rb#L77)

mini_scheduler-0.18.0/lib/mini_scheduler/manager.rb:63:in `block (2 levels) in ensure_worker_threads'[ ](https://github.com/discourse/mini_scheduler/blob/master/lib/mini_scheduler/manager.rb#L63)

Parece ser um problema recorrente e seria ótimo se fosse corrigido. No mínimo, o processo poderia ser otimizado para lidar melhor com esses casos. Por exemplo, isolando o e-mail problemático para que os outros ainda possam ser processados. Também poderia ajudar incluir um aviso no Painel de Administração, semelhante ao que é mostrado para problemas de e-mail de saída.

Posso fornecer o corpo do e-mail em uma mensagem privada, é só me avisar. Obrigado.

2 curtidas

Adoraria receber o e-mail “cru” :+1: