Problem with sending emails for DM

unsupported-install

#1

Hi all,
for some reason a few days ago I stopped to retrieve email notification about new direct message to group. At the same time I receive email about topics creations and answers.
I founded only these error logs for the last few days and did not understand what went wrong.

Logs
  /usr/local/lib/ruby/2.5.0/net/protocol.rb:181:in `rbuf_fill'
/usr/local/lib/ruby/2.5.0/net/protocol.rb:157:in `readuntil'
/usr/local/lib/ruby/2.5.0/net/protocol.rb:167:in `readline'
/usr/local/lib/ruby/2.5.0/net/smtp.rb:950:in `recv_response'
/usr/local/lib/ruby/2.5.0/net/smtp.rb:935:in `block in getok'
/usr/local/lib/ruby/2.5.0/net/smtp.rb:960:in `critical'
/usr/local/lib/ruby/2.5.0/net/smtp.rb:933:in `getok'
/usr/local/lib/ruby/2.5.0/net/smtp.rb:865:in `rcptto'
/usr/local/lib/ruby/2.5.0/net/smtp.rb:846:in `block in rcptto_list'
/usr/local/lib/ruby/2.5.0/net/smtp.rb:844:in `each'
/usr/local/lib/ruby/2.5.0/net/smtp.rb:844:in `rcptto_list'
/usr/local/lib/ruby/2.5.0/net/smtp.rb:659:in `send_message'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/mail-2.7.1.rc1/lib/mail/network/delivery_methods/smtp_connection.rb:54:in `deliver!'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/mail-2.7.1.rc1/lib/mail/network/delivery_methods/smtp.rb:101:in `block in deliver!'
/usr/local/lib/ruby/2.5.0/net/smtp.rb:519:in `start'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/mail-2.7.1.rc1/lib/mail/network/delivery_methods/smtp.rb:109:in `start_smtp_session'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/mail-2.7.1.rc1/lib/mail/network/delivery_methods/smtp.rb:100:in `deliver!'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/mail-2.7.1.rc1/lib/mail/message.rb:2159:in `do_delivery'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/mail-2.7.1.rc1/lib/mail/message.rb:260:in `block in deliver'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/actionmailer-5.2.0/lib/action_mailer/base.rb:560:in `block in deliver_mail'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.0/lib/active_support/notifications.rb:168:in `block in instrument'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.0/lib/active_support/notifications/instrumenter.rb:23:in `instrument'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.0/lib/active_support/notifications.rb:168:in `instrument'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/actionmailer-5.2.0/lib/action_mailer/base.rb:558:in `deliver_mail'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/mail-2.7.1.rc1/lib/mail/message.rb:260:in `deliver'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/actionmailer-5.2.0/lib/action_mailer/message_delivery.rb:114:in `block in deliver_now'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/actionmailer-5.2.0/lib/action_mailer/rescuable.rb:17:in `handle_exceptions'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/actionmailer-5.2.0/lib/action_mailer/message_delivery.rb:113:in `deliver_now'
/var/www/discourse/lib/email/sender.rb:201:in `send'
/var/www/discourse/app/jobs/regular/user_email.rb:47:in `execute'
/var/www/discourse/app/jobs/base.rb:137:in `block (2 levels) in perform'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/rails_multisite-2.0.4/lib/rails_multisite/connection_management.rb:63:in `with_connection'
/var/www/discourse/app/jobs/base.rb:127:in `block in perform'
/var/www/discourse/app/jobs/base.rb:123:in `each'
/var/www/discourse/app/jobs/base.rb:123:in `perform'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/sidekiq-5.1.3/lib/sidekiq/processor.rb:187:in `execute_job'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/sidekiq-5.1.3/lib/sidekiq/processor.rb:169:in `block (2 levels) in process'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/sidekiq-5.1.3/lib/sidekiq/middleware/chain.rb:128:in `block in invoke'
/var/www/discourse/lib/sidekiq/pausable.rb:81:in `call'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/sidekiq-5.1.3/lib/sidekiq/middleware/chain.rb:130:in `block in invoke'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/sidekiq-5.1.3/lib/sidekiq/middleware/chain.rb:133:in `invoke'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/sidekiq-5.1.3/lib/sidekiq/processor.rb:168:in `block in process'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/sidekiq-5.1.3/lib/sidekiq/processor.rb:139:in `block (6 levels) in dispatch'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/sidekiq-5.1.3/lib/sidekiq/job_retry.rb:98:in `local'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/sidekiq-5.1.3/lib/sidekiq/processor.rb:138:in `block (5 levels) in dispatch'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/sidekiq-5.1.3/lib/sidekiq.rb:36:in `block in <module:Sidekiq>'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/sidekiq-5.1.3/lib/sidekiq/processor.rb:134:in `block (4 levels) in dispatch'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/sidekiq-5.1.3/lib/sidekiq/processor.rb:199:in `stats'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/sidekiq-5.1.3/lib/sidekiq/processor.rb:129:in `block (3 levels) in dispatch'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/sidekiq-5.1.3/lib/sidekiq/job_logger.rb:8:in `call'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/sidekiq-5.1.3/lib/sidekiq/processor.rb:128:in `block (2 levels) in dispatch'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/sidekiq-5.1.3/lib/sidekiq/job_retry.rb:73:in `global'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/sidekiq-5.1.3/lib/sidekiq/processor.rb:127:in `block in dispatch'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/sidekiq-5.1.3/lib/sidekiq/logging.rb:48:in `with_context'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/sidekiq-5.1.3/lib/sidekiq/logging.rb:42:in `with_job_hash_context'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/sidekiq-5.1.3/lib/sidekiq/processor.rb:126:in `dispatch'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/sidekiq-5.1.3/lib/sidekiq/processor.rb:167:in `process'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/sidekiq-5.1.3/lib/sidekiq/processor.rb:85:in `process_one'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/sidekiq-5.1.3/lib/sidekiq/processor.rb:73:in `run'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/sidekiq-5.1.3/lib/sidekiq/util.rb:16:in `watchdog'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/sidekiq-5.1.3/lib/sidekiq/util.rb:25:in `block in safe_thread'

I have standalone version of Discourse (on my own server).
Would appreciate any help from you guys!

Regards,
Stan


(Jeff Atwood) #2

Looks like a networking config error to me from the backtrace.


#3

Hi @codinghorror,
thank you for response.
Could you please point me to what I should check, where should I look for the problem?


(Stephen) #4

You need to give us more information:

  • how it was installed
  • where it’s installed
  • mail provider you’re using to send email from Discourse
  • mail host you’re trying to receive emails at
  • are any other users having problems receiving email

#5

Hi @Stephen,

  • it was installed using official guide for installation in Docker
  • OVH servers
  • gmail
  • gmail
  • all users in group to which was sent message have same problem

(Stephen) #6

Gmail isn’t supported as an outbound mail service. Google explicitly prohibits its use in this way.

Please follow the official documentation on outbound email - some of the recommended providers offer free tiers for suitable for small communities.


#7

Thanks, will try it.


#8

Well, our mail provider is not gmail at the time, but now in tab Emails Sent I can see that not every user is notified via email about user private message. Some are received email and some are not, but problem is not in mail service, but in sending algorithm.
More details:

  • user belongs to group staff
  • user has enabled mailing list mode (send an email for every new post except my own)
  • default tracking mode for staff messages group is watching

Another notice I made is that even with watching staff group messages, when I open private message with this user, his watching mode is tracking, not watching.
At the same time this user receives all email from public topics.