helpy
helpy copied to clipboard
E-mail is not sent when the job is triggered by an incoming e-mail
Every time a new ticket is created via e-mail the notification and the welcome user e-mail fails to send. When the Ticket is submitted via web interface this works fine. The same happens if an agent replies to an e-mail the user e-email will also fail to deliver.If you're responding through the web interface the e-mail is send the user as expected.
I am using the imap provider to receive e-mails.
I got the following error message in the production.log file:
I, [2020-04-17T10:27:55.627778 #171] INFO -- : [ActiveJob] [ActionMailer::DeliveryJob] [f4c8e712-90d4-4fce-a791-6294a08cef0c] Performed ActionMailer::DeliveryJob from SuckerPunch(mailers) in 248.0ms E, [2020-04-17T10:27:55.627903 #171] ERROR -- : Sucker Punch job error for class: 'ActiveJob::QueueAdapters::SuckerPunchAdapter::JobWrapper' args: [{"job_class"=>"ActionMailer::DeliveryJob", "job_id"=>"f4c8e712-90d4-4fce-a791-6294a08cef0c", "queue_name"=>"mailers", "arguments"=>["NotificationMailer", "new_private", "deliver_now", 52], "locale"=>:en}] Errno::ENETUNREACH Network is unreachable - connect(2) for "localhost" port 25 /usr/local/lib/ruby/2.4.0/net/smtp.rb:539:in
initialize' /usr/local/lib/ruby/2.4.0/net/smtp.rb:539:in
open' /usr/local/lib/ruby/2.4.0/net/smtp.rb:539:intcp_socket' /usr/local/lib/ruby/2.4.0/net/smtp.rb:549:in
block in do_start' /usr/local/lib/ruby/2.4.0/timeout.rb:93:inblock in timeout' /usr/local/lib/ruby/2.4.0/timeout.rb:103:in
timeout' /usr/local/lib/ruby/2.4.0/net/smtp.rb:548:indo_start' /usr/local/lib/ruby/2.4.0/net/smtp.rb:518:in
start' /opt/helpy-bundle/gems/mail-2.7.1/lib/mail/network/delivery_methods/smtp.rb:109:instart_smtp_session' /opt/helpy-bundle/gems/mail-2.7.1/lib/mail/network/delivery_methods/smtp.rb:100:in
deliver!' /opt/helpy-bundle/gems/mail-2.7.1/lib/mail/message.rb:2159:indo_delivery' /opt/helpy-bundle/gems/mail-2.7.1/lib/mail/message.rb:260:in
block in deliver' /opt/helpy-bundle/gems/actionmailer-4.2.11.1/lib/action_mailer/base.rb:543:inblock in deliver_mail' /opt/helpy-bundle/gems/activesupport-4.2.11.1/lib/active_support/notifications.rb:164:in
block in instrument' /opt/helpy-bundle/gems/activesupport-4.2.11.1/lib/active_support/notifications/instrumenter.rb:20:ininstrument' /opt/helpy-bundle/gems/activesupport-4.2.11.1/lib/active_support/notifications.rb:164:in
instrument' /opt/helpy-bundle/gems/actionmailer-4.2.11.1/lib/action_mailer/base.rb:541:indeliver_mail' /opt/helpy-bundle/gems/mail-2.7.1/lib/mail/message.rb:260:in
deliver' /opt/helpy-bundle/gems/actionmailer-4.2.11.1/lib/action_mailer/message_delivery.rb:85:indeliver_now' /opt/helpy-bundle/gems/actionmailer-4.2.11.1/lib/action_mailer/delivery_job.rb:10:in
perform' /opt/helpy-bundle/gems/activejob-4.2.11.1/lib/active_job/execution.rb:32:inblock in perform_now' /opt/helpy-bundle/gems/activesupport-4.2.11.1/lib/active_support/callbacks.rb:117:in
call' /opt/helpy-bundle/gems/activesupport-4.2.11.1/lib/active_support/callbacks.rb:555:inblock (2 levels) in compile' /opt/helpy-bundle/gems/activesupport-4.2.11.1/lib/active_support/callbacks.rb:505:in
call' /opt/helpy-bundle/gems/activesupport-4.2.11.1/lib/active_support/callbacks.rb:498:inblock (2 levels) in around' /opt/helpy-bundle/gems/activesupport-4.2.11.1/lib/active_support/callbacks.rb:343:in
block (2 levels) in simple' /opt/helpy-bundle/gems/i18n-0.9.5/lib/i18n.rb:268:inwith_locale' /opt/helpy-bundle/gems/activejob-4.2.11.1/lib/active_job/translation.rb:7:in
block (2 levels) in module:Translation' /opt/helpy-bundle/gems/activesupport-4.2.11.1/lib/active_support/callbacks.rb:441:ininstance_exec' /opt/helpy-bundle/gems/activesupport-4.2.11.1/lib/active_support/callbacks.rb:441:in
block in make_lambda' /opt/helpy-bundle/gems/activesupport-4.2.11.1/lib/active_support/callbacks.rb:342:inblock in simple' /opt/helpy-bundle/gems/activesupport-4.2.11.1/lib/active_support/callbacks.rb:497:in
block in around' /opt/helpy-bundle/gems/activesupport-4.2.11.1/lib/active_support/callbacks.rb:505:incall' /opt/helpy-bundle/gems/activesupport-4.2.11.1/lib/active_support/callbacks.rb:498:in
block (2 levels) in around' /opt/helpy-bundle/gems/activesupport-4.2.11.1/lib/active_support/callbacks.rb:343:inblock (2 levels) in simple' /opt/helpy-bundle/gems/activejob-4.2.11.1/lib/active_job/logging.rb:23:in
block (4 levels) in module:Logging' /opt/helpy-bundle/gems/activesupport-4.2.11.1/lib/active_support/notifications.rb:164:inblock in instrument' /opt/helpy-bundle/gems/activesupport-4.2.11.1/lib/active_support/notifications/instrumenter.rb:20:in
instrument' /opt/helpy-bundle/gems/activesupport-4.2.11.1/lib/active_support/notifications.rb:164:ininstrument' /opt/helpy-bundle/gems/activejob-4.2.11.1/lib/active_job/logging.rb:22:in
block (3 levels) in module:Logging' /opt/helpy-bundle/gems/activejob-4.2.11.1/lib/active_job/logging.rb:43:inblock in tag_logger' /opt/helpy-bundle/gems/activesupport-4.2.11.1/lib/active_support/tagged_logging.rb:68:in
block in tagged' /opt/helpy-bundle/gems/activesupport-4.2.11.1/lib/active_support/tagged_logging.rb:26:intagged' /opt/helpy-bundle/gems/activesupport-4.2.11.1/lib/active_support/tagged_logging.rb:68:in
tagged' /opt/helpy-bundle/gems/activejob-4.2.11.1/lib/active_job/logging.rb:43:intag_logger' /opt/helpy-bundle/gems/activejob-4.2.11.1/lib/active_job/logging.rb:19:in
block (2 levels) in module:Logging' /opt/helpy-bundle/gems/activesupport-4.2.11.1/lib/active_support/callbacks.rb:441:ininstance_exec' /opt/helpy-bundle/gems/activesupport-4.2.11.1/lib/active_support/callbacks.rb:441:in
block in make_lambda' /opt/helpy-bundle/gems/activesupport-4.2.11.1/lib/active_support/callbacks.rb:342:inblock in simple' /opt/helpy-bundle/gems/activesupport-4.2.11.1/lib/active_support/callbacks.rb:497:in
block in around' /opt/helpy-bundle/gems/activesupport-4.2.11.1/lib/active_support/callbacks.rb:505:incall' /opt/helpy-bundle/gems/activesupport-4.2.11.1/lib/active_support/callbacks.rb:92:in
run_callbacks' /opt/helpy-bundle/gems/activesupport-4.2.11.1/lib/active_support/callbacks.rb:778:in_run_perform_callbacks' /opt/helpy-bundle/gems/activesupport-4.2.11.1/lib/active_support/callbacks.rb:81:in
run_callbacks' /opt/helpy-bundle/gems/activejob-4.2.11.1/lib/active_job/execution.rb:31:inperform_now' /opt/helpy-bundle/gems/activejob-4.2.11.1/lib/active_job/execution.rb:21:in
execute' /opt/helpy-bundle/gems/activejob-4.2.11.1/lib/active_job/queue_adapters/sucker_punch_adapter.rb:35:inperform' /opt/helpy-bundle/gems/sucker_punch-2.1.2/lib/sucker_punch/job.rb:60:in
__run_perform' /opt/helpy-bundle/gems/sucker_punch-2.1.2/lib/sucker_punch/job.rb:38:inblock in perform_async' /opt/helpy-bundle/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:353:in
run_task' /opt/helpy-bundle/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:342:inblock (3 levels) in create_worker' /opt/helpy-bundle/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:325:in
loop' /opt/helpy-bundle/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:325:inblock (2 levels) in create_worker' /opt/helpy-bundle/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:324:in
catch' /opt/helpy-bundle/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:324:in `block in create_worker'
I have the same issue, but the reason seems a bit different. I have confirmed settings in DB match admin all point to my server at 587 Using the web interface to open a ticket seems to trigger emails as expected, but pulling IMAP mail does not.
All IMAP mail fetching causes the below in the production.log
Starting at the end of a generated massage...
0eJ5ts46uSR63jmuipa2zqQsYJCdGnqpets5Ceq2I+cxbmq2u7kdeN5tJ+7h
zdRoZT3WR5D3stbpODkT1Zvtjv4zyHuddvOkjV2pRrPVbnd7vV7FJw6W/+y2
263mn2u8E9d/AcgnzBH5DA7YAAAAAElFTkSuQmCC
----==_mimepart_62b49282dedee_1b1f2afcb551365099993--
I, [2022-06-23T16:19:15.333045 #6943] INFO -- : [ActiveJob] [ActionMailer::DeliveryJob] [df117652-38d4-45e7-81c0-c55a808da8bc] Performed ActionMailer::DeliveryJob from SuckerPunch(mailers) in 565.4ms
E, [2022-06-23T16:19:15.333393 #6943] ERROR -- : Sucker Punch job error for class: 'ActiveJob::QueueAdapters::SuckerPunchAdapter::JobWrapper' args: [{"job_class"=>"ActionMailer::DeliveryJob", "job_id"=>"df117652-38d4-45e7-81c0-c55a808da8bc", "queue_name"=>"mailers", "arguments"=>["NotificationMailer", "new_private", "deliver_now", 26], "locale"=>:en}]
Errno::EADDRNOTAVAIL Cannot assign requested address - connect(2) for "localhost" port 25