bigbluebutton / greenlight

A really simple end-user interface for your BigBlueButton server.
GNU Lesser General Public License v3.0
787 stars 3.8k forks source link

SMTP isn't working anymore since 3.3.3 #5803

Closed ghost closed 2 months ago

ghost commented 2 months ago

Hello,

Before v3.3.3 I had SMTP working without issues using SendGrid, now I always get the following error message:

E, [2024-05-10T09:52:55.324136 #1] ERROR -- : [ActiveJob] [ActionMailer::MailDeliveryJob] [00619273-cd8f-41a3-b7de-99224adab6ff] Error performing ActionMailer::MailDeliveryJob (Job ID: 00619273-cd8f-41a3-b7de-99224adab6ff) from Async(greenlight_v3_production_mailing) in 231.49ms: Net::SMTPAuthenticationError (535 Authentication failed: The provided authorization grant is invalid, expired, or revoked
):
/usr/src/app/vendor/bundle/ruby/3.2.0/gems/net-smtp-0.4.0.1/lib/net/smtp/authenticator.rb:34:in `finish'
/usr/src/app/vendor/bundle/ruby/3.2.0/gems/net-smtp-0.4.0.1/lib/net/smtp/auth_plain.rb:6:in `auth'
/usr/src/app/vendor/bundle/ruby/3.2.0/gems/net-smtp-0.4.0.1/lib/net/smtp.rb:838:in `authenticate'
/usr/src/app/vendor/bundle/ruby/3.2.0/gems/net-smtp-0.4.0.1/lib/net/smtp.rb:656:in `do_start'
/usr/src/app/vendor/bundle/ruby/3.2.0/gems/net-smtp-0.4.0.1/lib/net/smtp.rb:610:in `start'
/usr/src/app/vendor/bundle/ruby/3.2.0/gems/mail-2.8.1/lib/mail/network/delivery_methods/smtp.rb:109:in `start_smtp_session'
/usr/src/app/vendor/bundle/ruby/3.2.0/gems/mail-2.8.1/lib/mail/network/delivery_methods/smtp.rb:100:in `deliver!'
/usr/src/app/vendor/bundle/ruby/3.2.0/gems/mail-2.8.1/lib/mail/message.rb:2145:in `do_delivery'
/usr/src/app/vendor/bundle/ruby/3.2.0/gems/mail-2.8.1/lib/mail/message.rb:253:in `block in deliver'
/usr/src/app/vendor/bundle/ruby/3.2.0/gems/actionmailer-7.1.3.1/lib/action_mailer/base.rb:600:in `block in deliver_mail'
/usr/src/app/vendor/bundle/ruby/3.2.0/gems/activesupport-7.1.3.1/lib/active_support/notifications.rb:208:in `instrument'
/usr/src/app/vendor/bundle/ruby/3.2.0/gems/actionmailer-7.1.3.1/lib/action_mailer/base.rb:598:in `deliver_mail'
/usr/src/app/vendor/bundle/ruby/3.2.0/gems/mail-2.8.1/lib/mail/message.rb:253:in `deliver'
/usr/src/app/vendor/bundle/ruby/3.2.0/gems/actionmailer-7.1.3.1/lib/action_mailer/message_delivery.rb:126:in `block (2 levels) in deliver_now'
/usr/src/app/vendor/bundle/ruby/3.2.0/gems/activesupport-7.1.3.1/lib/active_support/callbacks.rb:101:in `run_callbacks'
/usr/src/app/vendor/bundle/ruby/3.2.0/gems/actionmailer-7.1.3.1/lib/action_mailer/message_delivery.rb:125:in `block in deliver_now'
/usr/src/app/vendor/bundle/ruby/3.2.0/gems/actionmailer-7.1.3.1/lib/action_mailer/rescuable.rb:21:in `handle_exceptions'
/usr/src/app/vendor/bundle/ruby/3.2.0/gems/actionmailer-7.1.3.1/lib/action_mailer/message_delivery.rb:124:in `deliver_now'
/usr/src/app/vendor/bundle/ruby/3.2.0/gems/actionmailer-7.1.3.1/lib/action_mailer/mail_delivery_job.rb:28:in `perform'
/usr/src/app/vendor/bundle/ruby/3.2.0/gems/activejob-7.1.3.1/lib/active_job/execution.rb:69:in `block in _perform_job'
/usr/src/app/vendor/bundle/ruby/3.2.0/gems/activesupport-7.1.3.1/lib/active_support/callbacks.rb:121:in `block in run_callbacks'
/usr/src/app/vendor/bundle/ruby/3.2.0/gems/i18n-1.14.1/lib/i18n.rb:322:in `with_locale'
/usr/src/app/vendor/bundle/ruby/3.2.0/gems/activejob-7.1.3.1/lib/active_job/translation.rb:9:in `block (2 levels) in <module:Translation>'
/usr/src/app/vendor/bundle/ruby/3.2.0/gems/activesupport-7.1.3.1/lib/active_support/callbacks.rb:130:in `instance_exec'
/usr/src/app/vendor/bundle/ruby/3.2.0/gems/activesupport-7.1.3.1/lib/active_support/callbacks.rb:130:in `block in run_callbacks'
/usr/src/app/vendor/bundle/ruby/3.2.0/gems/activesupport-7.1.3.1/lib/active_support/core_ext/time/zones.rb:65:in `use_zone'
/usr/src/app/vendor/bundle/ruby/3.2.0/gems/activejob-7.1.3.1/lib/active_job/timezones.rb:9:in `block (2 levels) in <module:Timezones>'
/usr/src/app/vendor/bundle/ruby/3.2.0/gems/activesupport-7.1.3.1/lib/active_support/callbacks.rb:130:in `instance_exec'
/usr/src/app/vendor/bundle/ruby/3.2.0/gems/activesupport-7.1.3.1/lib/active_support/callbacks.rb:130:in `block in run_callbacks'
/usr/src/app/vendor/bundle/ruby/3.2.0/gems/activesupport-7.1.3.1/lib/active_support/callbacks.rb:141:in `run_callbacks'
/usr/src/app/vendor/bundle/ruby/3.2.0/gems/activejob-7.1.3.1/lib/active_job/execution.rb:68:in `_perform_job'
/usr/src/app/vendor/bundle/ruby/3.2.0/gems/activejob-7.1.3.1/lib/active_job/instrumentation.rb:32:in `_perform_job'
/usr/src/app/vendor/bundle/ruby/3.2.0/gems/activejob-7.1.3.1/lib/active_job/execution.rb:52:in `perform_now'
/usr/src/app/vendor/bundle/ruby/3.2.0/gems/activejob-7.1.3.1/lib/active_job/instrumentation.rb:26:in `block in perform_now'
/usr/src/app/vendor/bundle/ruby/3.2.0/gems/activerecord-7.1.3.1/lib/active_record/railties/job_runtime.rb:13:in `block in instrument'
/usr/src/app/vendor/bundle/ruby/3.2.0/gems/activejob-7.1.3.1/lib/active_job/instrumentation.rb:40:in `block in instrument'
/usr/src/app/vendor/bundle/ruby/3.2.0/gems/activesupport-7.1.3.1/lib/active_support/notifications.rb:206:in `block in instrument'
/usr/src/app/vendor/bundle/ruby/3.2.0/gems/activesupport-7.1.3.1/lib/active_support/notifications/instrumenter.rb:58:in `instrument'
/usr/src/app/vendor/bundle/ruby/3.2.0/gems/activesupport-7.1.3.1/lib/active_support/notifications.rb:206:in `instrument'
/usr/src/app/vendor/bundle/ruby/3.2.0/gems/activejob-7.1.3.1/lib/active_job/instrumentation.rb:39:in `instrument'
/usr/src/app/vendor/bundle/ruby/3.2.0/gems/activerecord-7.1.3.1/lib/active_record/railties/job_runtime.rb:11:in `instrument'
/usr/src/app/vendor/bundle/ruby/3.2.0/gems/activejob-7.1.3.1/lib/active_job/instrumentation.rb:26:in `perform_now'
/usr/src/app/vendor/bundle/ruby/3.2.0/gems/activejob-7.1.3.1/lib/active_job/logging.rb:18:in `block in perform_now'
/usr/src/app/vendor/bundle/ruby/3.2.0/gems/activesupport-7.1.3.1/lib/active_support/tagged_logging.rb:135:in `block in tagged'
/usr/src/app/vendor/bundle/ruby/3.2.0/gems/activesupport-7.1.3.1/lib/active_support/tagged_logging.rb:39:in `tagged'
/usr/src/app/vendor/bundle/ruby/3.2.0/gems/activesupport-7.1.3.1/lib/active_support/tagged_logging.rb:135:in `tagged'
/usr/src/app/vendor/bundle/ruby/3.2.0/gems/activesupport-7.1.3.1/lib/active_support/broadcast_logger.rb:240:in `method_missing'
/usr/src/app/vendor/bundle/ruby/3.2.0/gems/activejob-7.1.3.1/lib/active_job/logging.rb:25:in `tag_logger'
/usr/src/app/vendor/bundle/ruby/3.2.0/gems/activejob-7.1.3.1/lib/active_job/logging.rb:18:in `perform_now'
/usr/src/app/vendor/bundle/ruby/3.2.0/gems/activejob-7.1.3.1/lib/active_job/execution.rb:30:in `block in execute'
/usr/src/app/vendor/bundle/ruby/3.2.0/gems/activesupport-7.1.3.1/lib/active_support/callbacks.rb:121:in `block in run_callbacks'
/usr/src/app/vendor/bundle/ruby/3.2.0/gems/activejob-7.1.3.1/lib/active_job/railtie.rb:67:in `block (4 levels) in <class:Railtie>'
/usr/src/app/vendor/bundle/ruby/3.2.0/gems/activesupport-7.1.3.1/lib/active_support/reloader.rb:77:in `block in wrap'
/usr/src/app/vendor/bundle/ruby/3.2.0/gems/activesupport-7.1.3.1/lib/active_support/execution_wrapper.rb:92:in `wrap'
/usr/src/app/vendor/bundle/ruby/3.2.0/gems/activesupport-7.1.3.1/lib/active_support/reloader.rb:74:in `wrap'
/usr/src/app/vendor/bundle/ruby/3.2.0/gems/activejob-7.1.3.1/lib/active_job/railtie.rb:66:in `block (3 levels) in <class:Railtie>'
/usr/src/app/vendor/bundle/ruby/3.2.0/gems/activesupport-7.1.3.1/lib/active_support/callbacks.rb:130:in `instance_exec'
/usr/src/app/vendor/bundle/ruby/3.2.0/gems/activesupport-7.1.3.1/lib/active_support/callbacks.rb:130:in `block in run_callbacks'
/usr/src/app/vendor/bundle/ruby/3.2.0/gems/activesupport-7.1.3.1/lib/active_support/callbacks.rb:141:in `run_callbacks'
/usr/src/app/vendor/bundle/ruby/3.2.0/gems/activejob-7.1.3.1/lib/active_job/execution.rb:28:in `execute'
/usr/src/app/vendor/bundle/ruby/3.2.0/gems/activejob-7.1.3.1/lib/active_job/queue_adapters/async_adapter.rb:70:in `perform'
/usr/src/app/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.2.3/lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:359:in `run_task'
/usr/src/app/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.2.3/lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:350:in `block (3 levels) in create_worker'
/usr/src/app/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.2.3/lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:341:in `loop'
/usr/src/app/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.2.3/lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:341:in `block (2 levels) in create_worker'
/usr/src/app/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.2.3/lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:340:in `catch'
/usr/src/app/vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.2.3/lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:340:in `block in create_worker'

I successfully connected with the valid credentials using ports 587 (TLS) and 465 (SSL) from my workstation, but Greenlight doesn't want to take them.

Here is an example of the configuration which was working before:

### SMTP CONFIGURATION
# Emails are required for the basic features of Greenlight to function.
# Please refer to your SMTP provider to get the values for the variables below
SMTP_SENDER_EMAIL=noreply@REDACTED
SMTP_SENDER_NAME=BigBlueButton
#SMTP_STARTTLS=true
#SMTP_TLS=false
SMTP_SSL_VERIFY=true
SMTP_SERVER=smtp.sendgrid.net
SMTP_PORT=587
SMTP_DOMAIN=REDACTED
SMTP_USERNAME=apikey
SMTP_PASSWORD="REDACTED"
SMTP_AUTH=plain
#SMTP_STARTTLS_AUTO=false

Thanks in advance for your help!

farhatahmad commented 2 months ago

I don't believe there was any SMTP changes in 3.3.3. This seems to be a configuration issue on the SMTP server itself. Greenlight is trying to authenticate with it and it's returning that error

ghost commented 2 months ago

OK, weird it was working previously with the exact same credentials. And that it continues to work on my laptop without any problem, but Greenlight is now refusing to connect to SendGrid.

Thanks anyway.

ghost commented 2 months ago

For whatever reason, removing the " " around the password worked.