Content
Problem with inbound mails in docker compose setup
Added by Jan-Niklas Bogatka 3 days ago
Hey,
I just setup OpenProject a few days ago and came over a problem with the inbound mail config.
I setup openProject via Portainer using the github repository link to the compose file.
The initial setup works flawless, but after adding the env-vars for the inbound mail config, it doesn't works as expected:
-
When inviting to a meeting, the user gets an email with the info and invite as expected
-
Clicking on "confirm" (in Thunderbird) sends the response as expected (validated on the mailserver)
-
The user immediately receives another mail with the user shown as confirmed
-
the status of the user in the web-UI stays on "unknown"
In the cron-container log it shows repeatably:
[cron] Checking for new emails from IMAP
rake aborted!
Errno::ECONNREFUSED: Connection refused - connect(2) for 0.0.0.0:993 (Errno::ECONNREFUSED)
/app/vendor/bundle/ruby/4.0.0/gems/net-imap-0.6.4.1/lib/net/imap.rb:3505:in 'Net::IMAP#tcp_socket'
/app/vendor/bundle/ruby/4.0.0/gems/net-imap-0.6.4.1/lib/net/imap.rb:1142:in 'Net::IMAP#initialize'
/app/vendor/bundle/ruby/4.0.0/gems/net-imap-0.6.4.1/lib/net/imap/deprecated_client_options.rb:74:in 'Net::IMAP::DeprecatedClientOptions#initialize'
/app/lib/redmine/imap.rb:59:in 'Redmine::IMAP.connect_imap'
/app/lib/redmine/imap.rb:36:in 'Redmine::IMAP.check'
/app/lib/tasks/email.rake:152:in 'block (3 levels) in <top (required)>'
/app/vendor/bundle/ruby/4.0.0/gems/rake-13.4.2/exe/rake:27:in '<top (required)>'
/usr/local/bundle/bin/bundle:25:in '<main>'
Tasks: TOP => redmine:email:receive_imap
(See full trace by running task with --trace)
[cron] Rescheduling in 600s
The ENV-vars set in the stack:
TAG=17-slim
OPENPROJECT_HTTPS=true
SECRET_KEY_BASE=MySaltySalt
OPENPROJECT_HOST__NAME=op.mydomain.tld
PORT=127.0.0.1:3002
IMAP_ENABLED=true
DATABASE_URL=postgres://postgres:TOPSECRET@db/openproject?pool=20&encoding=unicode&reconnect=true
RAILS_MIN_THREADS=4
RAILS_MAX_THREADS=16
COLLABORATIVE_SERVER_URL=ws://op.mydomain.tld:3002/hocuspocus
COLLABORATIVE_SERVER_SECRET=MySecret
POSTGRES_VERSION=17
IMAP_PORT=993
IMAP_HOST=imap.provider.tld
IMAP_USERNAME=user@mydomain.tld
IMAP_PASSWORD=MySecretIMAPPassword
IMAP_CHECK_INTERVAL=120
IMAP_SSL=true
IMAP_SSL_VERIFICATION=true
The stack runs behind an Apache reverse proxy on localhost.
I'm not sure if I've missed some flag or var, or if this is indeed a bug.
Help is really appreciated as the instance should be used for our works council soon.