decidim-install icon indicating copy to clipboard operation
decidim-install copied to clipboard

SMTP authentication error (doh?)

Open Rggb opened this issue 4 years ago • 2 comments

I'm trying to configure a local Postfix installation to deliver mails.

All things work fine with an external service (eg. Google). After setting up the parameters needed by postfix for a particular organization:

image

mail delivery fails due to Net::SMTPAuthenticationError (in this example, using a newsletter):

E, [2020-07-07T17:21:43.722460 #15284] ERROR -- : [ActiveJob] [Decidim::Admin::NewsletterDeliveryJob] [4fc8365c-26bb-4745-9a76-558349a53097] Error performing Decidim::Admin::NewsletterDeliveryJob (Job ID: 4fc8365c-26bb-4745-9a76-558349a53097) from Async(newsletter) in 2058.78ms: Net::SMTPAuthenticationError (503 5.5.1 Error: authentication not enabled ): /var/www/.rbenv/versions/2.6.3/lib/ruby/2.6.0/net/smtp.rb:981:in check_auth_response' /var/www/.rbenv/versions/2.6.3/lib/ruby/2.6.0/net/smtp.rb:736:in auth_plain' /var/www/.rbenv/versions/2.6.3/lib/ruby/2.6.0/net/smtp.rb:728:in authenticate' /var/www/.rbenv/versions/2.6.3/lib/ruby/2.6.0/net/smtp.rb:565:in do_start' /var/www/.rbenv/versions/2.6.3/lib/ruby/2.6.0/net/smtp.rb:518:in `start'

Of course I don't need authentication using local Postfix server, while I (others) need it for external services.

I tried to play with config, without success. Suggestions?

Rggb avatar Jul 08 '20 10:07 Rggb

If you are using postfix, simply use sendmail as delivery method and comment everything else. This values won't be used (leave them empty)

In config/environments/production.rb:

imatge

microstudi avatar Jul 22 '20 09:07 microstudi

Thanks for your reply.

This will affect the entire environment afaik. so every organization will use sendmail method (in my config, the local Postfix), that's not what I'm trying to do.

By now I configured authentication for Postfix. I need an hack, will play with the code again in the future when worktime < lifetime ;)

Thanks again

Rggb avatar Jul 28 '20 08:07 Rggb