pglombardo / PasswordPusher

🔐 Securely share sensitive information with automatic expiration & deletion after a set number of views or duration. Track who, what and when with full audit logs.
https://docs.pwpush.com
Apache License 2.0
1.98k stars 343 forks source link

smtp mails not send #755

Open kuehnel-net opened 1 year ago

kuehnel-net commented 1 year ago

🐛 Bug Report

No mails send for registration/forgot password/etc.

🔬 How To Reproduce

Steps to reproduce the behavior:

  1. setup with docker image pglombardo/pwpush-postgres:release
  2. configure db connection and environment
  3. register new user -> no registration mail send
  4. test with forgot password -> no mail send

Code sample

smtp configuration via environment:

PWP__DEFAULT_LOCALE=de
PWP__ENABLE_LOGINS=true
PWP__MAIL__RAISE_DELIVERY_ERRORS=true
PWP__MAIL__SMTP_ADDRESS=pm-mgw01.akb.lokal
PWP__MAIL__SMTP_PORT=26
PWP__MAIL__SMTP_STARTTLS=false
PWP__MAIL__OPEN_TIMEOUT=10
PWP__MAIL__READ_TIMEOUT=10
PWP__HOST_DOMAIN=pass.akb.lokal
PWP__HOST_PROTOCOL=https
PWP__MAIL__MAILER_SENDER="noreply" <noreply@akb.lokal>
PWP__ALLOW_ANONYMOUS=true
PWP__DISABLE_SIGNUPS=false
PWP__MAIL__SMTP_OPENSSL_VERIFY_MODE=none

Environment

Where are you running/using Password Pusher?

If applicable, what version of Password Pusher?

Screenshots

image

📈 Expected behavior

Mail send to user.

📎 Additional context

from log/production.log:

F, [2023-01-26T16:31:49.228026 #58] FATAL -- : [80ce4e9d-9ce0-40c9-bc01-c4e95f2f3685]   
[80ce4e9d-9ce0-40c9-bc01-c4e95f2f3685] TypeError (no implicit conversion of Symbol into Integer):
[80ce4e9d-9ce0-40c9-bc01-c4e95f2f3685]   
[80ce4e9d-9ce0-40c9-bc01-c4e95f2f3685] net-smtp (0.3.3) lib/net/smtp.rb:681:in `initialize'
[80ce4e9d-9ce0-40c9-bc01-c4e95f2f3685] net-smtp (0.3.3) lib/net/smtp.rb:681:in `new'
[80ce4e9d-9ce0-40c9-bc01-c4e95f2f3685] net-smtp (0.3.3) lib/net/smtp.rb:681:in `ssl_socket'
[80ce4e9d-9ce0-40c9-bc01-c4e95f2f3685] net-smtp (0.3.3) lib/net/smtp.rb:686:in `tlsconnect'
[80ce4e9d-9ce0-40c9-bc01-c4e95f2f3685] net-smtp (0.3.3) lib/net/smtp.rb:666:in `do_start'
[80ce4e9d-9ce0-40c9-bc01-c4e95f2f3685] net-smtp (0.3.3) lib/net/smtp.rb:611:in `start'
[80ce4e9d-9ce0-40c9-bc01-c4e95f2f3685] mail (2.8.0.1) lib/mail/network/delivery_methods/smtp.rb:109:in `start_smtp_session'
[80ce4e9d-9ce0-40c9-bc01-c4e95f2f3685] mail (2.8.0.1) lib/mail/network/delivery_methods/smtp.rb:100:in `deliver!'
[80ce4e9d-9ce0-40c9-bc01-c4e95f2f3685] mail (2.8.0.1) lib/mail/message.rb:2145:in `do_delivery'
[80ce4e9d-9ce0-40c9-bc01-c4e95f2f3685] mail (2.8.0.1) lib/mail/message.rb:253:in `block in deliver'
[80ce4e9d-9ce0-40c9-bc01-c4e95f2f3685] actionmailer (7.0.4) lib/action_mailer/base.rb:588:in `block in deliver_mail'
[80ce4e9d-9ce0-40c9-bc01-c4e95f2f3685] activesupport (7.0.4) lib/active_support/notifications.rb:206:in `block in instrument'
[80ce4e9d-9ce0-40c9-bc01-c4e95f2f3685] activesupport (7.0.4) lib/active_support/notifications/instrumenter.rb:24:in `instrument'
[80ce4e9d-9ce0-40c9-bc01-c4e95f2f3685] activesupport (7.0.4) lib/active_support/notifications.rb:206:in `instrument'
[80ce4e9d-9ce0-40c9-bc01-c4e95f2f3685] actionmailer (7.0.4) lib/action_mailer/base.rb:586:in `deliver_mail'
[80ce4e9d-9ce0-40c9-bc01-c4e95f2f3685] mail (2.8.0.1) lib/mail/message.rb:253:in `deliver'
[80ce4e9d-9ce0-40c9-bc01-c4e95f2f3685] actionmailer (7.0.4) lib/action_mailer/message_delivery.rb:119:in `block in deliver_now'
[80ce4e9d-9ce0-40c9-bc01-c4e95f2f3685] actionmailer (7.0.4) lib/action_mailer/rescuable.rb:17:in `handle_exceptions'
[80ce4e9d-9ce0-40c9-bc01-c4e95f2f3685] actionmailer (7.0.4) lib/action_mailer/message_delivery.rb:118:in `deliver_now'
[80ce4e9d-9ce0-40c9-bc01-c4e95f2f3685] devise (4.8.1) lib/devise/models/authenticatable.rb:204:in `send_devise_notification'
[80ce4e9d-9ce0-40c9-bc01-c4e95f2f3685] devise (4.8.1) lib/devise/models/confirmable.rb:121:in `send_confirmation_instructions'
[80ce4e9d-9ce0-40c9-bc01-c4e95f2f3685] devise (4.8.1) lib/devise/models/confirmable.rb:183:in `send_on_create_confirmation_instructions'
[80ce4e9d-9ce0-40c9-bc01-c4e95f2f3685] activesupport (7.0.4) lib/active_support/callbacks.rb:400:in `block in make_lambda'
[80ce4e9d-9ce0-40c9-bc01-c4e95f2f3685] activesupport (7.0.4) lib/active_support/callbacks.rb:261:in `block in conditional'
[80ce4e9d-9ce0-40c9-bc01-c4e95f2f3685] activesupport (7.0.4) lib/active_support/callbacks.rb:599:in `block in invoke_after'
[80ce4e9d-9ce0-40c9-bc01-c4e95f2f3685] activesupport (7.0.4) lib/active_support/callbacks.rb:599:in `each'
[80ce4e9d-9ce0-40c9-bc01-c4e95f2f3685] activesupport (7.0.4) lib/active_support/callbacks.rb:599:in `invoke_after'
[80ce4e9d-9ce0-40c9-bc01-c4e95f2f3685] activesupport (7.0.4) lib/active_support/callbacks.rb:108:in `run_callbacks'
[80ce4e9d-9ce0-40c9-bc01-c4e95f2f3685] activesupport (7.0.4) lib/active_support/callbacks.rb:929:in `_run_commit_callbacks'
[80ce4e9d-9ce0-40c9-bc01-c4e95f2f3685] activerecord (7.0.4) lib/active_record/transactions.rb:321:in `committed!'
[80ce4e9d-9ce0-40c9-bc01-c4e95f2f3685] activerecord (7.0.4) lib/active_record/connection_adapters/abstract/transaction.rb:155:in `commit_records'
[80ce4e9d-9ce0-40c9-bc01-c4e95f2f3685] activerecord (7.0.4) lib/active_record/connection_adapters/abstract/transaction.rb:304:in `block in commit_transaction'
[80ce4e9d-9ce0-40c9-bc01-c4e95f2f3685] activesupport (7.0.4) lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `handle_interrupt'
[80ce4e9d-9ce0-40c9-bc01-c4e95f2f3685] activesupport (7.0.4) lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `block in synchronize'
[80ce4e9d-9ce0-40c9-bc01-c4e95f2f3685] activesupport (7.0.4) lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `handle_interrupt'
[80ce4e9d-9ce0-40c9-bc01-c4e95f2f3685] activesupport (7.0.4) lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `synchronize'
[80ce4e9d-9ce0-40c9-bc01-c4e95f2f3685] activerecord (7.0.4) lib/active_record/connection_adapters/abstract/transaction.rb:294:in `commit_transaction'
[80ce4e9d-9ce0-40c9-bc01-c4e95f2f3685] activerecord (7.0.4) lib/active_record/connection_adapters/abstract/transaction.rb:345:in `block in within_new_transaction'
[80ce4e9d-9ce0-40c9-bc01-c4e95f2f3685] activesupport (7.0.4) lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `handle_interrupt'
[80ce4e9d-9ce0-40c9-bc01-c4e95f2f3685] activesupport (7.0.4) lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `block in synchronize'
[80ce4e9d-9ce0-40c9-bc01-c4e95f2f3685] activesupport (7.0.4) lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `handle_interrupt'
[80ce4e9d-9ce0-40c9-bc01-c4e95f2f3685] activesupport (7.0.4) lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `synchronize'
[80ce4e9d-9ce0-40c9-bc01-c4e95f2f3685] activerecord (7.0.4) lib/active_record/connection_adapters/abstract/transaction.rb:317:in `within_new_transaction'
[80ce4e9d-9ce0-40c9-bc01-c4e95f2f3685] activerecord (7.0.4) lib/active_record/connection_adapters/abstract/database_statements.rb:316:in `transaction'
[80ce4e9d-9ce0-40c9-bc01-c4e95f2f3685] activerecord (7.0.4) lib/active_record/transactions.rb:350:in `with_transaction_returning_status'
[80ce4e9d-9ce0-40c9-bc01-c4e95f2f3685] activerecord (7.0.4) lib/active_record/transactions.rb:298:in `save'
[80ce4e9d-9ce0-40c9-bc01-c4e95f2f3685] activerecord (7.0.4) lib/active_record/suppressor.rb:50:in `save'
[80ce4e9d-9ce0-40c9-bc01-c4e95f2f3685] devise (4.8.1) app/controllers/devise/registrations_controller.rb:19:in `create'
[80ce4e9d-9ce0-40c9-bc01-c4e95f2f3685] actionpack (7.0.4) lib/action_controller/metal/basic_implicit_render.rb:6:in `send_action'
[80ce4e9d-9ce0-40c9-bc01-c4e95f2f3685] actionpack (7.0.4) lib/abstract_controller/base.rb:215:in `process_action'
[80ce4e9d-9ce0-40c9-bc01-c4e95f2f3685] actionpack (7.0.4) lib/action_controller/metal/rendering.rb:53:in `process_action'
[80ce4e9d-9ce0-40c9-bc01-c4e95f2f3685] actionpack (7.0.4) lib/abstract_controller/callbacks.rb:234:in `block in process_action'
[80ce4e9d-9ce0-40c9-bc01-c4e95f2f3685] activesupport (7.0.4) lib/active_support/callbacks.rb:118:in `block in run_callbacks'
[80ce4e9d-9ce0-40c9-bc01-c4e95f2f3685] route_translator (13.1.0) lib/route_translator/extensions/action_controller.rb:18:in `set_locale_from_url'
[80ce4e9d-9ce0-40c9-bc01-c4e95f2f3685] activesupport (7.0.4) lib/active_support/callbacks.rb:127:in `block in run_callbacks'
[80ce4e9d-9ce0-40c9-bc01-c4e95f2f3685] actiontext (7.0.4) lib/action_text/rendering.rb:20:in `with_renderer'
[80ce4e9d-9ce0-40c9-bc01-c4e95f2f3685] actiontext (7.0.4) lib/action_text/engine.rb:69:in `block (4 levels) in <class:Engine>'
[80ce4e9d-9ce0-40c9-bc01-c4e95f2f3685] activesupport (7.0.4) lib/active_support/callbacks.rb:127:in `instance_exec'
[80ce4e9d-9ce0-40c9-bc01-c4e95f2f3685] activesupport (7.0.4) lib/active_support/callbacks.rb:127:in `block in run_callbacks'
[80ce4e9d-9ce0-40c9-bc01-c4e95f2f3685] activesupport (7.0.4) lib/active_support/callbacks.rb:138:in `run_callbacks'
[80ce4e9d-9ce0-40c9-bc01-c4e95f2f3685] actionpack (7.0.4) lib/abstract_controller/callbacks.rb:233:in `process_action'
[80ce4e9d-9ce0-40c9-bc01-c4e95f2f3685] actionpack (7.0.4) lib/action_controller/metal/rescue.rb:22:in `process_action'
[80ce4e9d-9ce0-40c9-bc01-c4e95f2f3685] actionpack (7.0.4) lib/action_controller/metal/instrumentation.rb:67:in `block in process_action'
[80ce4e9d-9ce0-40c9-bc01-c4e95f2f3685] activesupport (7.0.4) lib/active_support/notifications.rb:206:in `block in instrument'
[80ce4e9d-9ce0-40c9-bc01-c4e95f2f3685] activesupport (7.0.4) lib/active_support/notifications/instrumenter.rb:24:in `instrument'
[80ce4e9d-9ce0-40c9-bc01-c4e95f2f3685] activesupport (7.0.4) lib/active_support/notifications.rb:206:in `instrument'
[80ce4e9d-9ce0-40c9-bc01-c4e95f2f3685] actionpack (7.0.4) lib/action_controller/metal/instrumentation.rb:66:in `process_action'
[80ce4e9d-9ce0-40c9-bc01-c4e95f2f3685] actionpack (7.0.4) lib/action_controller/metal/params_wrapper.rb:259:in `process_action'
[80ce4e9d-9ce0-40c9-bc01-c4e95f2f3685] activerecord (7.0.4) lib/active_record/railties/controller_runtime.rb:27:in `process_action'
[80ce4e9d-9ce0-40c9-bc01-c4e95f2f3685] actionpack (7.0.4) lib/abstract_controller/base.rb:151:in `process'
[80ce4e9d-9ce0-40c9-bc01-c4e95f2f3685] actionview (7.0.4) lib/action_view/rendering.rb:39:in `process'
[80ce4e9d-9ce0-40c9-bc01-c4e95f2f3685] actionpack (7.0.4) lib/action_controller/metal.rb:188:in `dispatch'
[80ce4e9d-9ce0-40c9-bc01-c4e95f2f3685] actionpack (7.0.4) lib/action_controller/metal.rb:251:in `dispatch'
[80ce4e9d-9ce0-40c9-bc01-c4e95f2f3685] actionpack (7.0.4) lib/action_dispatch/routing/route_set.rb:49:in `dispatch'
[80ce4e9d-9ce0-40c9-bc01-c4e95f2f3685] actionpack (7.0.4) lib/action_dispatch/routing/route_set.rb:32:in `serve'
[80ce4e9d-9ce0-40c9-bc01-c4e95f2f3685] actionpack (7.0.4) lib/action_dispatch/routing/mapper.rb:18:in `block in <class:Constraints>'
[80ce4e9d-9ce0-40c9-bc01-c4e95f2f3685] actionpack (7.0.4) lib/action_dispatch/routing/mapper.rb:48:in `serve'
[80ce4e9d-9ce0-40c9-bc01-c4e95f2f3685] actionpack (7.0.4) lib/action_dispatch/journey/router.rb:50:in `block in serve'
[80ce4e9d-9ce0-40c9-bc01-c4e95f2f3685] actionpack (7.0.4) lib/action_dispatch/journey/router.rb:32:in `each'
[80ce4e9d-9ce0-40c9-bc01-c4e95f2f3685] actionpack (7.0.4) lib/action_dispatch/journey/router.rb:32:in `serve'
[80ce4e9d-9ce0-40c9-bc01-c4e95f2f3685] actionpack (7.0.4) lib/action_dispatch/routing/route_set.rb:852:in `call'
[80ce4e9d-9ce0-40c9-bc01-c4e95f2f3685] apipie-rails (0.9.1) lib/apipie/static_dispatcher.rb:68:in `call'
[80ce4e9d-9ce0-40c9-bc01-c4e95f2f3685] apipie-rails (0.9.1) lib/apipie/extractor/recorder.rb:137:in `call'
[80ce4e9d-9ce0-40c9-bc01-c4e95f2f3685] rack-attack (6.6.1) lib/rack/attack.rb:127:in `call'
[80ce4e9d-9ce0-40c9-bc01-c4e95f2f3685] rack-throttle (0.7.0) lib/rack/throttle/limiter.rb:35:in `call'
[80ce4e9d-9ce0-40c9-bc01-c4e95f2f3685] rack-throttle (0.7.0) lib/rack/throttle/limiter.rb:35:in `call'
[80ce4e9d-9ce0-40c9-bc01-c4e95f2f3685] rack-throttle (0.7.0) lib/rack/throttle/limiter.rb:35:in `call'
[80ce4e9d-9ce0-40c9-bc01-c4e95f2f3685] rack-throttle (0.7.0) lib/rack/throttle/limiter.rb:35:in `call'
[80ce4e9d-9ce0-40c9-bc01-c4e95f2f3685] warden (1.2.9) lib/warden/manager.rb:36:in `block in call'
[80ce4e9d-9ce0-40c9-bc01-c4e95f2f3685] warden (1.2.9) lib/warden/manager.rb:34:in `catch'
[80ce4e9d-9ce0-40c9-bc01-c4e95f2f3685] warden (1.2.9) lib/warden/manager.rb:34:in `call'
[80ce4e9d-9ce0-40c9-bc01-c4e95f2f3685] rack (2.2.6) lib/rack/tempfile_reaper.rb:15:in `call'
[80ce4e9d-9ce0-40c9-bc01-c4e95f2f3685] rack (2.2.6) lib/rack/etag.rb:27:in `call'
[80ce4e9d-9ce0-40c9-bc01-c4e95f2f3685] rack (2.2.6) lib/rack/conditional_get.rb:40:in `call'
[80ce4e9d-9ce0-40c9-bc01-c4e95f2f3685] rack (2.2.6) lib/rack/head.rb:12:in `call'
[80ce4e9d-9ce0-40c9-bc01-c4e95f2f3685] actionpack (7.0.4) lib/action_dispatch/http/permissions_policy.rb:38:in `call'
[80ce4e9d-9ce0-40c9-bc01-c4e95f2f3685] actionpack (7.0.4) lib/action_dispatch/http/content_security_policy.rb:36:in `call'
[80ce4e9d-9ce0-40c9-bc01-c4e95f2f3685] rack (2.2.6) lib/rack/session/abstract/id.rb:266:in `context'
[80ce4e9d-9ce0-40c9-bc01-c4e95f2f3685] rack (2.2.6) lib/rack/session/abstract/id.rb:260:in `call'
[80ce4e9d-9ce0-40c9-bc01-c4e95f2f3685] actionpack (7.0.4) lib/action_dispatch/middleware/cookies.rb:696:in `call'
[80ce4e9d-9ce0-40c9-bc01-c4e95f2f3685] actionpack (7.0.4) lib/action_dispatch/middleware/callbacks.rb:27:in `block in call'
[80ce4e9d-9ce0-40c9-bc01-c4e95f2f3685] activesupport (7.0.4) lib/active_support/callbacks.rb:99:in `run_callbacks'
[80ce4e9d-9ce0-40c9-bc01-c4e95f2f3685] actionpack (7.0.4) lib/action_dispatch/middleware/callbacks.rb:26:in `call'
[80ce4e9d-9ce0-40c9-bc01-c4e95f2f3685] rollbar (3.4.0) lib/rollbar/middleware/rails/rollbar.rb:25:in `block in call'
[80ce4e9d-9ce0-40c9-bc01-c4e95f2f3685] rollbar (3.4.0) lib/rollbar.rb:145:in `scoped'
[80ce4e9d-9ce0-40c9-bc01-c4e95f2f3685] rollbar (3.4.0) lib/rollbar/middleware/rails/rollbar.rb:22:in `call'
[80ce4e9d-9ce0-40c9-bc01-c4e95f2f3685] actionpack (7.0.4) lib/action_dispatch/middleware/debug_exceptions.rb:28:in `call'
[80ce4e9d-9ce0-40c9-bc01-c4e95f2f3685] rollbar (3.4.0) lib/rollbar/middleware/rails/show_exceptions.rb:22:in `call_with_rollbar'
[80ce4e9d-9ce0-40c9-bc01-c4e95f2f3685] actionpack (7.0.4) lib/action_dispatch/middleware/show_exceptions.rb:26:in `call'
[80ce4e9d-9ce0-40c9-bc01-c4e95f2f3685] lograge (0.12.0) lib/lograge/rails_ext/rack/logger.rb:18:in `call_app'
[80ce4e9d-9ce0-40c9-bc01-c4e95f2f3685] railties (7.0.4) lib/rails/rack/logger.rb:25:in `block in call'
[80ce4e9d-9ce0-40c9-bc01-c4e95f2f3685] activesupport (7.0.4) lib/active_support/tagged_logging.rb:99:in `block in tagged'
[80ce4e9d-9ce0-40c9-bc01-c4e95f2f3685] activesupport (7.0.4) lib/active_support/tagged_logging.rb:37:in `tagged'
[80ce4e9d-9ce0-40c9-bc01-c4e95f2f3685] activesupport (7.0.4) lib/active_support/tagged_logging.rb:99:in `tagged'
[80ce4e9d-9ce0-40c9-bc01-c4e95f2f3685] railties (7.0.4) lib/rails/rack/logger.rb:25:in `call'
[80ce4e9d-9ce0-40c9-bc01-c4e95f2f3685] actionpack (7.0.4) lib/action_dispatch/middleware/remote_ip.rb:93:in `call'
[80ce4e9d-9ce0-40c9-bc01-c4e95f2f3685] request_store (1.5.1) lib/request_store/middleware.rb:19:in `call'
[80ce4e9d-9ce0-40c9-bc01-c4e95f2f3685] rack-timeout (0.6.3) lib/rack/timeout/core.rb:148:in `block in call'
[80ce4e9d-9ce0-40c9-bc01-c4e95f2f3685] rack-timeout (0.6.3) lib/rack/timeout/support/timeout.rb:19:in `timeout'
[80ce4e9d-9ce0-40c9-bc01-c4e95f2f3685] rack-timeout (0.6.3) lib/rack/timeout/core.rb:147:in `call'
[80ce4e9d-9ce0-40c9-bc01-c4e95f2f3685] actionpack (7.0.4) lib/action_dispatch/middleware/request_id.rb:26:in `call'
[80ce4e9d-9ce0-40c9-bc01-c4e95f2f3685] rack (2.2.6) lib/rack/method_override.rb:24:in `call'
[80ce4e9d-9ce0-40c9-bc01-c4e95f2f3685] rack (2.2.6) lib/rack/runtime.rb:22:in `call'
[80ce4e9d-9ce0-40c9-bc01-c4e95f2f3685] actionpack (7.0.4) lib/action_dispatch/middleware/executor.rb:14:in `call'
[80ce4e9d-9ce0-40c9-bc01-c4e95f2f3685] actionpack (7.0.4) lib/action_dispatch/middleware/static.rb:23:in `call'
[80ce4e9d-9ce0-40c9-bc01-c4e95f2f3685] rack (2.2.6) lib/rack/sendfile.rb:110:in `call'
[80ce4e9d-9ce0-40c9-bc01-c4e95f2f3685] actionpack (7.0.4) lib/action_dispatch/middleware/host_authorization.rb:131:in `call'
[80ce4e9d-9ce0-40c9-bc01-c4e95f2f3685] rack-cors (1.1.1) lib/rack/cors.rb:100:in `call'
[80ce4e9d-9ce0-40c9-bc01-c4e95f2f3685] railties (7.0.4) lib/rails/engine.rb:530:in `call'
[80ce4e9d-9ce0-40c9-bc01-c4e95f2f3685] railties (7.0.4) lib/rails/railtie.rb:226:in `public_send'
[80ce4e9d-9ce0-40c9-bc01-c4e95f2f3685] railties (7.0.4) lib/rails/railtie.rb:226:in `method_missing'
[80ce4e9d-9ce0-40c9-bc01-c4e95f2f3685] puma (6.0.2) lib/puma/configuration.rb:268:in `call'
[80ce4e9d-9ce0-40c9-bc01-c4e95f2f3685] puma (6.0.2) lib/puma/request.rb:93:in `block in handle_request'
[80ce4e9d-9ce0-40c9-bc01-c4e95f2f3685] puma (6.0.2) lib/puma/thread_pool.rb:340:in `with_force_shutdown'
[80ce4e9d-9ce0-40c9-bc01-c4e95f2f3685] puma (6.0.2) lib/puma/request.rb:92:in `handle_request'
[80ce4e9d-9ce0-40c9-bc01-c4e95f2f3685] puma (6.0.2) lib/puma/server.rb:429:in `process_client'
[80ce4e9d-9ce0-40c9-bc01-c4e95f2f3685] puma (6.0.2) lib/puma/server.rb:232:in `block in run'
[80ce4e9d-9ce0-40c9-bc01-c4e95f2f3685] puma (6.0.2) lib/puma/thread_pool.rb:147:in `block in spawn_thread'

Thanks

github-actions[bot] commented 1 year ago

Hello @kuehnel-net, thanks for contributing to the Password Pusher community! We will respond as soon as possible.

pglombardo commented 1 year ago

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?

kuehnel-net commented 1 year ago

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.

pglombardo commented 1 year ago

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)"
kuehnel-net commented 1 year ago

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.

pglombardo commented 1 year ago

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.

kuehnel-net commented 1 year ago

Hi, the bug is still present.

kuehnel-net commented 1 year ago

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.

chadniko commented 1 year ago

@kuehnel-net ---- I have confirmed your workaround does work for my issue #718 also....THANKS

pglombardo commented 1 year ago

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.

pglombardo commented 5 months ago

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...

chadniko commented 5 months ago

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: @.***>

pglombardo commented 5 months ago

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?

chadniko commented 5 months ago

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: @.***>

pglombardo commented 4 months ago

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.