Open kuehnel-net opened 1 year ago
Hello @kuehnel-net, thanks for contributing to the Password Pusher community! We will respond as soon as possible.
HI @kuehnel-net - apologies for the issue.
To better diagnose, could you open a console in the pwpush container and run the following:
docker exec -it <containerId> /bin/bash
./bin/rails console
Rails.application.config.action_mailer.smtp_settings
That last command will output the Mail settings. Could you post that here without any sensitive information?
Then run this code snippet to manually send an email. Replace those email addresses with something valid:
Mail.deliver do
to 'your@email.com'
from 'your@email.com'
subject 'testing mail'
body 'testing mail'
end
Could you let me know what the output is. And did you get the email?
Hi,
From rails console:
{:address=>"pm-mgw01.akb.lokal",
:port=>26,
:user_name=>nil,
:password=>nil,
:authentication=>"plain",
:enable_starttls_auto=>true,
:open_timeout=>10,
:read_timeout=>10,
:openssl_verify_mode=>:none}
From code snippet (tested with different adresses):
/usr/local/lib/ruby/3.1.0/socket.rb:1214:in `__connect_nonblock': Cannot assign requested address - connect(2) for [::1]:25 (Errno::EADDRNOTAVAIL)
...and there is no mail send.
Ok another test that should tell us something. Could you shell into the docker container again and run:
docker exec -it <containerId> /bin/bash
ruby -e 'require "socket"' -e "TCPSocket.open('pm-mgw01.akb.lokal', 26)"
Hi,
...run's without output:
root@7678aa7b2d22:~# ruby -e 'require "socket"' -e "TCPSocket.open('pm-mgw01.akb.lokal', 26)"
root@7678aa7b2d22:~#
The connection attempt is in the smtp server log.
Hi @kuehnel-net - I just released 1.25.6 that includes a mail system update that claims:
Bug Fixes: Regression: sendmail accepts string :arguments (@sebbASF) Regression: accept enable_starttls_auto: false @ahorek
A regression in that library would explain this change of behavior despite no changes in Password Pusher. Let's see if this has any affect for you. 1.25.6 is building now.
Hi, the bug is still present.
Hi, i have play with PWPMAILSMTP_ENABLE_STARTTLS_AUTO option. If i set this to false, the error is gone and the mail is send, with true the error is persistent.
@kuehnel-net ---- I have confirmed your workaround does work for my issue #718 also....THANKS
Thanks for investigating this issue @kuehnel-net & @chadniko. The release I mentioned in this comment was changing the starttls_auto setting - I'm still not sure exactly what is going on. If this workaround resolves the issue though - that is excellent.
Hi all - just an update on the email story: in v1.39.8, I added a tool to test email configurations. Could you update to that version and try this out?
It should reveal where the issue is...
Ok here is what I got:Password Pusher Version: 1.39.8Loading production environment (Rails 7.1.3.2)irb(main):001> @.***').deliver_now/opt/PasswordPusher/vendor/bundle/ruby/3.2.0/gems/net-smtp-0.5.0/lib/net/smtp.rb:698:in `initialize': no implicit conversion of Symbol into Integer (TypeError) OpenSSL::SSL::SSLSocket.new socket, context ^^^^^^^^^^^^^^^
here's the environment: environment: PWPENABLE_LOGINS: true PWP__DISABLE_SIGNUPS: false PWPALLOW_ANONYMOUS: false PWPHOST_DOMAIN: pp.xxxx.com PWP__HOST_PROTOCOL: https PWPOVERRIDE_BASE_URL: https://pp.xxxx.com PWPBRANDTITLE: 'Password Pusher' PWPMAILOPEN_TIMEOUT: 10 PWPMAILRAISE_DELIVERY_ERRORS: true PWPMAILREAD_TIMEOUT: 10 PWPMAILSMTP_ADDRESS: mail.xxxx.com PWPMAILSMTP_USER_NAME: @. PWPMAILSMTP_PASSWORD: xxxxx PWPMAILSMTP_DOMAIN: pp.xxxx.com PWPMAILSMTP_PORT: 587 PWPMAILSMTP_AUTHENTICATION: plain PWPMAILSMTP_STARTTLS: true #PWPMAILMAILER_SENDER: '"PW Pusher" @.' PWPMAILSMTP_OPENSSL_VERIFY_MODE: none It's been awhile but I seem to remember the type conversion error before......
On Monday, April 8, 2024 at 01:40:36 PM PDT, Peter Giacomo Lombardo ***@***.***> wrote:
Hi all - just an update on the email story: in v1.39.8, I added a tool to test email configurations. Could you update to that version and try this out?
It should reveal where the issue is...
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>
Hi @chadniko - The error is raised in this library here so it is likely related to SSL/TLS connection establishment.
If that's the case, then the issue could be with PWP__MAIL__SMTP_STARTTLS
and PWP__MAIL__SMTP_ENABLE_STARTTLS_AUTO
. Could you try removing those, changing those and comparing with known working configurations here?
Much like @kuehnel-net's work-around in this comment here.
Do you still have email issues? Are emails able to be sent at all?
Will do when I get a chance and report back to you.... On Wednesday, April 10, 2024 at 01:24:09 AM PDT, Peter Giacomo Lombardo @.***> wrote:
Hi @chadniko - The error is raised in this library here so it is likely related to SSL/TLS connection establishment.
If that's the case, then the issue could be with PWPMAILSMTP_STARTTLS and PWPMAILSMTP_ENABLE_STARTTLS_AUTO. Could you try removing those, changing those and comparing with known working configurations here?
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>
Just an update for this thread: As for smtp.rb:698:in initialize: no implicit conversion
- we seem to have the fix in v1.40.7.
See this thread.
🐛 Bug Report
No mails send for registration/forgot password/etc.
🔬 How To Reproduce
Steps to reproduce the behavior:
Code sample
smtp configuration via environment:
Environment
Where are you running/using Password Pusher?
If applicable, what version of Password Pusher?
Screenshots
📈 Expected behavior
Mail send to user.
📎 Additional context
from log/production.log:
Thanks