J’ai rencontré le même problème que celui décrit ici. Essentiellement, un seul e-mail entrant provoque l’échec de toute la file d’attente, empêchant le traitement de tout e-mail.
D’après les 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)
Cela semble être un problème récurrent, et il serait formidable qu’il soit résolu. Au minimum, le processus pourrait être rationalisé pour mieux gérer de tels cas. Par exemple, en isolant l’e-mail problématique afin que les autres puissent toujours être traités. Il pourrait également être utile d’inclure un avertissement dans le tableau de bord administrateur, similaire à celui affiché pour les problèmes d’e-mails sortants.
Je peux fournir le corps de l’e-mail en message privé, faites-le moi savoir. Merci.