Automation: Mail Error: Unable to send email to 'x.x@x-x.de': Can't use Channel::Driver::Smtp: #<EOFError: end of file reached>"

Info:

  • Zammad version used: 4.1
  • Zammad installation type used: Package
  • Operating system: Linux Ubuntu 18.04.5 LTS
  • Browser + Version: Latest Chrome

Expected behavior:

I have an automation configured to run every Monday morning and send an email to the ticket owner for any open tickets that have not been updated in a month. See here:

All I want is: Automation sends mails with my configured message.

Actual behavior:

  • Automation is unable to send mails. I get this error beginning from the ~4th mail:

    The strange thing here is that the error is triggered, but the agents receive a mail with the error.

So it looks like this:

  1. automation is running
  2. send 30 days reminder by mail → error.
  3. send a mail to the agent that an automation has updated the ticket with this message: “Error”:

I copied 16000 lines from the production log showing that errors occurred for 5 minutes (tried sending ~50 mails). Because I can’t delete all mail addresses out of this I just would like to send this in private. One Example Stacktrace over here:

E, [2021-08-09T06:02:14.122235 #1248-46943050211720] ERROR -- : Can't use Channel::Driver::Smtp: #<EOFError: end of file reached>
E, [2021-08-09T06:02:14.122353 #1248-46943050211720] ERROR -- : end of file reached (EOFError)
/opt/zammad/vendor/ruby-2.6.6/lib/ruby/2.6.0/net/protocol.rb:225:in `rbuf_fill'
/opt/zammad/vendor/ruby-2.6.6/lib/ruby/2.6.0/net/protocol.rb:191:in `readuntil'
/opt/zammad/vendor/ruby-2.6.6/lib/ruby/2.6.0/net/protocol.rb:201:in `readline'
/opt/zammad/vendor/ruby-2.6.6/lib/ruby/2.6.0/net/smtp.rb:950:in `recv_response'
/opt/zammad/vendor/ruby-2.6.6/lib/ruby/2.6.0/net/smtp.rb:935:in `block in getok'
/opt/zammad/vendor/ruby-2.6.6/lib/ruby/2.6.0/net/smtp.rb:960:in `critical'
/opt/zammad/vendor/ruby-2.6.6/lib/ruby/2.6.0/net/smtp.rb:933:in `getok'
/opt/zammad/vendor/ruby-2.6.6/lib/ruby/2.6.0/net/smtp.rb:919:in `quit'
/opt/zammad/vendor/ruby-2.6.6/lib/ruby/2.6.0/net/smtp.rb:612:in `do_finish'
/opt/zammad/vendor/ruby-2.6.6/lib/ruby/2.6.0/net/smtp.rb:521:in `ensure in start'
/opt/zammad/vendor/ruby-2.6.6/lib/ruby/2.6.0/net/smtp.rb:521:in `start'
/opt/zammad/vendor/bundle/ruby/2.6.0/bundler/gems/mail-9265cf75bbe3/lib/mail/network/delivery_methods/smtp.rb:109:in `start_smtp_session'
/opt/zammad/vendor/bundle/ruby/2.6.0/bundler/gems/mail-9265cf75bbe3/lib/mail/network/delivery_methods/smtp.rb:100:in `deliver!'
/opt/zammad/vendor/bundle/ruby/2.6.0/bundler/gems/mail-9265cf75bbe3/lib/mail/message.rb:2159:in `do_delivery'
/opt/zammad/vendor/bundle/ruby/2.6.0/bundler/gems/mail-9265cf75bbe3/lib/mail/message.rb:262:in `deliver'
/opt/zammad/app/models/channel/driver/smtp.rb:84:in `send'
/opt/zammad/app/models/channel.rb:257:in `deliver'
/opt/zammad/app/jobs/ticket_article_communicate_email_job.rb:54:in `perform'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/activejob-5.2.4.6/lib/active_job/execution.rb:39:in `block in perform_now'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.4.6/lib/active_support/callbacks.rb:109:in `block in run_callbacks'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/i18n-1.8.10/lib/i18n.rb:314:in `with_locale'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/activejob-5.2.4.6/lib/active_job/translation.rb:9:in `block (2 levels) in <module:Translation>'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.4.6/lib/active_support/callbacks.rb:118:in `instance_exec'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.4.6/lib/active_support/callbacks.rb:118:in `block in run_callbacks'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/activejob-5.2.4.6/lib/active_job/logging.rb:26:in `block (4 levels) in <module:Logging>'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.4.6/lib/active_support/notifications.rb:170:in `instrument'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/activejob-5.2.4.6/lib/active_job/logging.rb:25:in `block (3 levels) in <module:Logging>'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/activejob-5.2.4.6/lib/active_job/logging.rb:46:in `block in tag_logger'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.4.6/lib/active_support/tagged_logging.rb:71:in `block in tagged'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.4.6/lib/active_support/tagged_logging.rb:28:in `tagged'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.4.6/lib/active_support/tagged_logging.rb:71:in `tagged'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/activejob-5.2.4.6/lib/active_job/logging.rb:46:in `tag_logger'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/activejob-5.2.4.6/lib/active_job/logging.rb:22:in `block (2 levels) in <module:Logging>'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.4.6/lib/active_support/callbacks.rb:118:in `instance_exec'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.4.6/lib/active_support/callbacks.rb:118:in `block in run_callbacks'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.4.6/lib/active_support/callbacks.rb:136:in `run_callbacks'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/activejob-5.2.4.6/lib/active_job/execution.rb:38:in `perform_now'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/activejob-5.2.4.6/lib/active_job/execution.rb:24:in `block in execute'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.4.6/lib/active_support/callbacks.rb:109:in `block in run_callbacks'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/activejob-5.2.4.6/lib/active_job/railtie.rb:28:in `block (4 levels) in <class:Railtie>'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.4.6/lib/active_support/execution_wrapper.rb:87:in `wrap'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.4.6/lib/active_support/reloader.rb:73:in `block in wrap'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.4.6/lib/active_support/execution_wrapper.rb:87:in `wrap'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.4.6/lib/active_support/reloader.rb:72:in `wrap'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/activejob-5.2.4.6/lib/active_job/railtie.rb:27:in `block (3 levels) in <class:Railtie>'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.4.6/lib/active_support/callbacks.rb:118:in `instance_exec'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.4.6/lib/active_support/callbacks.rb:118:in `block in run_callbacks'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.4.6/lib/active_support/callbacks.rb:136:in `run_callbacks'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/activejob-5.2.4.6/lib/active_job/execution.rb:22:in `execute'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/activejob-5.2.4.6/lib/active_job/queue_adapters/delayed_job_adapter.rb:42:in `perform'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/delayed_job-4.1.7/lib/delayed/backend/base.rb:81:in `block in invoke_job'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/delayed_job-4.1.7/lib/delayed/lifecycle.rb:61:in `block in initialize'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/delayed_job-4.1.7/lib/delayed/lifecycle.rb:66:in `execute'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/delayed_job-4.1.7/lib/delayed/lifecycle.rb:40:in `run_callbacks'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/delayed_job-4.1.7/lib/delayed/backend/base.rb:78:in `invoke_job'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/delayed_job-4.1.7/lib/delayed/worker.rb:230:in `block (2 levels) in run'
/opt/zammad/vendor/ruby-2.6.6/lib/ruby/2.6.0/timeout.rb:93:in `block in timeout'
/opt/zammad/vendor/ruby-2.6.6/lib/ruby/2.6.0/timeout.rb:103:in `timeout'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/delayed_job-4.1.7/lib/delayed/worker.rb:230:in `block in run'
/opt/zammad/vendor/ruby-2.6.6/lib/ruby/2.6.0/benchmark.rb:308:in `realtime'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/delayed_job-4.1.7/lib/delayed/worker.rb:229:in `run'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/delayed_job-4.1.7/lib/delayed/worker.rb:312:in `block in reserve_and_run_one_job'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/delayed_job-4.1.7/lib/delayed/lifecycle.rb:61:in `block in initialize'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/delayed_job-4.1.7/lib/delayed/lifecycle.rb:66:in `execute'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/delayed_job-4.1.7/lib/delayed/lifecycle.rb:40:in `run_callbacks'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/delayed_job-4.1.7/lib/delayed/worker.rb:312:in `reserve_and_run_one_job'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/delayed_job-4.1.7/lib/delayed/worker.rb:213:in `block in work_off'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/delayed_job-4.1.7/lib/delayed/worker.rb:212:in `times'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/delayed_job-4.1.7/lib/delayed/worker.rb:212:in `work_off'
/opt/zammad/app/models/scheduler.rb:376:in `block (3 levels) in worker'
/opt/zammad/vendor/ruby-2.6.6/lib/ruby/2.6.0/benchmark.rb:308:in `realtime'
/opt/zammad/app/models/scheduler.rb:374:in `block (2 levels) in worker'
/opt/zammad/app/models/scheduler.rb:370:in `loop'
/opt/zammad/app/models/scheduler.rb:370:in `block in worker'
/opt/zammad/vendor/bundle/ruby/2.6.0/gems/logging-2.2.2/lib/logging/diagnostic_context.rb:474:in `block in create_with_logging_context'
E, [2021-08-09T06:02:14.159463 #1248-46943050211720] ERROR -- : Can't use Channel::Driver::Smtp: #<EOFError: end of file reached>
E, [2021-08-09T06:02:14.159821 #1248-46943050211720] ERROR -- : Retrying TicketArticleCommunicateEmailJob in #<Proc:0x00005563969d4050@/opt/zammad/app/jobs/ticket_article_communicate_email_job.rb:3 (lambda)> seconds, due to a StandardError. The original exception was #<RuntimeError: Can't use Channel::Driver::Smtp: #<EOFError: end of file reached>>.

Steps to reproduce the behavior:

  • Hard to say, I don’t know…

What I already checked is:

  • All agents have valid mail addresses.
  • All groups have a mail address assigned (the same one from which the mails are sent).
  • No errors are visible from our exchange server
  • No internal Spam-filter or similar active

Is it possible to turn on a higher debug level for sending mails?

Yeah you’re getting confused here slightly:
Above happens to the groups email account, below (the agent notification) is handled by the notification channel which is a different account technically. (at least most of the times)

Above error indicates that the email server does unexpectedly close the transmission session.
So if that’s not a network issue, best chance to check for the root of this issue is your mail server in question. Nothing we can help with.

Check the group of the affected ticket(s) and then the groups email address configured.
This will lead you to the affected mail account to check within your mail server.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.