Error in create issues from email in Redmine
Added by Eduardo HM over 3 years ago
Hi to everyone
Good Morning,
I am trying to configure the Redmine environment that we have in the company so that it automatically generates issues to specific proyect as emails arrive to a specific account.
We have followed the documentation to perform this task by obtaining the mails from an imap server.
https://www.redmine.org/projects/redmine/wiki/redminereceivingemails
According to the documentation it does not have much greater complication, but when launching the command to obtain the emails that are sent to the configured account and convert them into issues in a specific project, it gives the following error:
rake -f /path_redmine/Rakefile redmine:email:receive_imap RAILS_ENV="production" host=mail.mydomain.com username=******@mydomain.com password=***** project=test-mail ssl=1 port=993 --trace ** Execute redmine:email:receive_imap rake aborted! Errno::ECONNRESET: Connection reset by peer - SSL_connect /usr/local/rvm/rubies/ruby-2.3.8/lib/ruby/2.3.0/net/imap.rb:1492:in `connect' /usr/local/rvm/rubies/ruby-2.3.8/lib/ruby/2.3.0/net/imap.rb:1492:in `start_tls_session' /usr/local/rvm/rubies/ruby-2.3.8/lib/ruby/2.3.0/net/imap.rb:1085:in `initialize' /var/www/educacion/cau_ce/servicioinformatica/redmine_pre/lib/redmine/imap.rb:39:in `new' /var/www/educacion/cau_ce/servicioinformatica/redmine_pre/lib/redmine/imap.rb:39:in `check' /var/www/educacion/cau_ce/servicioinformatica/redmine_pre/lib/tasks/email.rake:124:in `block (4 levels) in <top (required)>' /var/www/educacion/cau_ce/servicioinformatica/redmine_pre/app/models/mailer.rb:630:in `with_synched_deliveries' /var/www/educacion/cau_ce/servicioinformatica/redmine_pre/lib/tasks/email.rake:123:in `block (3 levels) in <top (required)>' /usr/local/rvm/gems/ruby-2.3.8/gems/rake-13.0.3/lib/rake/task.rb:281:in `block in execute' /usr/local/rvm/gems/ruby-2.3.8/gems/rake-13.0.3/lib/rake/task.rb:281:in `each' /usr/local/rvm/gems/ruby-2.3.8/gems/rake-13.0.3/lib/rake/task.rb:281:in `execute' /usr/local/rvm/gems/ruby-2.3.8/gems/rake-13.0.3/lib/rake/task.rb:219:in `block in invoke_with_call_chain' /usr/local/rvm/rubies/ruby-2.3.8/lib/ruby/2.3.0/monitor.rb:214:in `mon_synchronize' /usr/local/rvm/gems/ruby-2.3.8/gems/rake-13.0.3/lib/rake/task.rb:199:in `invoke_with_call_chain' /usr/local/rvm/gems/ruby-2.3.8/gems/rake-13.0.3/lib/rake/task.rb:188:in `invoke' /usr/local/rvm/gems/ruby-2.3.8/gems/rake-13.0.3/lib/rake/application.rb:160:in `invoke_task' /usr/local/rvm/gems/ruby-2.3.8/gems/rake-13.0.3/lib/rake/application.rb:116:in `block (2 levels) in top_level' /usr/local/rvm/gems/ruby-2.3.8/gems/rake-13.0.3/lib/rake/application.rb:116:in `each' /usr/local/rvm/gems/ruby-2.3.8/gems/rake-13.0.3/lib/rake/application.rb:116:in `block in top_level' /usr/local/rvm/gems/ruby-2.3.8/gems/rake-13.0.3/lib/rake/application.rb:125:in `run_with_threads' /usr/local/rvm/gems/ruby-2.3.8/gems/rake-13.0.3/lib/rake/application.rb:110:in `top_level' /usr/local/rvm/gems/ruby-2.3.8/gems/rake-13.0.3/lib/rake/application.rb:83:in `block in run' /usr/local/rvm/gems/ruby-2.3.8/gems/rake-13.0.3/lib/rake/application.rb:186:in `standard_exception_handling' /usr/local/rvm/gems/ruby-2.3.8/gems/rake-13.0.3/lib/rake/application.rb:80:in `run' /usr/local/rvm/gems/ruby-2.3.8/gems/rake-13.0.3/exe/rake:27:in `<top (required)>' /usr/local/rvm/gems/ruby-2.3.8/bin/rake:23:in `load' /usr/local/rvm/gems/ruby-2.3.8/bin/rake:23:in `<main>' /usr/local/rvm/gems/ruby-2.3.8/bin/ruby_executable_hooks:22:in `eval' /usr/local/rvm/gems/ruby-2.3.8/bin/ruby_executable_hooks:22:in `<main>' Tasks: TOP => redmine:email:receive_imap <pre> </pre>
Redmine enviroment info
Environment: Redmine version 4.1.0.stable Ruby version 2.3.8-p459 (2018-10-18) [x86_64-linux] Rails version 5.2.4.1 Environment production Database adapter Mysql2 Mailer queue ActiveJob :: QueueAdapters :: AsyncAdapter Mailer delivery smtp SCM: Git 1.8.3.1 Filesystem GitRemote 1.8.3.1
What could be going wrong when doing this configuration?
Best regards.
Replies (4)
RE: Error in create issues from email in Redmine - Added by Lorenzo Meneghetti over 3 years ago
Hi, seem the issue is related to newtworking/firewalling.
How do you reach smtp server?
Is it public or in the company?
Are you going through proxies/firewalls?
Thanks
Lorenzo
RE: Error in create issues from email in Redmine - Added by Eduardo HM over 3 years ago
Thanks Lorezon for quick reply.
I comment you all your questions.
The server where I have the redmine installation is behind a proxy and has access to the Internet. We have disabled the firewall on the Redmine server (Redhat 7).
We have the mail server in the company, it is a corporate email that uses Zimbra.
Here I have the configuration that I have for sending notifications that is inside the config/configuration.yml file
default: # Outgoing emails configuration (see examples above) email_delivery: delivery_method:: smtp smtp_settings: enable_starttls_auto: true address: "mail.mydomain.org" port: 25 domain: "mydomain.org" authentication:: login user_name: "redmine.educacion@mydomain.org" password: "********"
I have made checks to see if the ports I connect to on the mail server are open via telnet
[root @ scvs0019 redmine_pre] # telnet mail.mydomain.org 993 Trying 10.140.139.18 ... Connected to mail.mydomain.org. Escape character is '^]'.
I can't think of any more tests that I can run to find out exactly where the error is.
I have also tried to perform this configuration but against a test gmail account that we have to see but still I can not make it work, that is, I send a standard email to create an incident to an email account (gmail or corporate) and launch the command for which I put in the previous thread.
If you need more information, do not hesitate to ask me
Thnaks in advanced!!!
RE: Error in create issues from email in Redmine - Added by Lorenzo Meneghetti over 3 years ago
Eduardo HM wrote:
Thanks Lorezon for quick reply.
I comment you all your questions.
The server where I have the redmine installation is behind a proxy and has access to the Internet. We have disabled the firewall on the Redmine server (Redhat 7).
We have the mail server in the company, it is a corporate email that uses Zimbra.
Could be Zimbra has got a filter on addresses, already checked your IP is permitted?
Thanks
Lorenzo
RE: Error in create issues from email in Redmine - Added by Eduardo HM over 3 years ago
Thanks again
The Zimbra server does not have source IPs restricted.
I have done another test. I have created a completely new gmail account, I have enabled both pop3 and imap, and I have launched the command to process both mails by pop3 and imap and I get the same error:
[root@scvs0019 redmine_pre]# rake -s -f Rakefile --trace redmine:email:receive_pop3 RAILS_ENV="production" host=pop.gmail.com username=cauce@gmail.com password=***** ssl=1 port=995 project=test-mail [root@scvs0019 redmine_pre]# rake -s -f Rakefile --trace redmine:email:receive_imap RAILS_ENV="production" host=imap.gmail.com username=cauce@gmail.com password=***** ssl=1 port=993 project=test-mail ** Invoke redmine:email:receive_pop3 (first_time) ** Invoke environment (first_time) ** Execute environment ** Execute redmine:email:receive_pop3 rake aborted! Errno::ECONNRESET: Connection reset by peer - SSL_connect /usr/local/rvm/rubies/ruby-2.3.8/lib/ruby/2.3.0/net/pop.rb:553:in `connect' /usr/local/rvm/rubies/ruby-2.3.8/lib/ruby/2.3.0/net/pop.rb:553:in `do_start' /usr/local/rvm/rubies/ruby-2.3.8/lib/ruby/2.3.0/net/pop.rb:531:in `start' /var/www/educacion/cau_ce/servicioinformatica/redmine_pre/lib/redmine/pop3.rb:45:in `check' /var/www/educacion/cau_ce/servicioinformatica/redmine_pre/lib/tasks/email.rake:155:in `block (4 levels) in <top (required)>' /var/www/educacion/cau_ce/servicioinformatica/redmine_pre/app/models/mailer.rb:630:in `with_synched_deliveries' /var/www/educacion/cau_ce/servicioinformatica/redmine_pre/lib/tasks/email.rake:154:in `block (3 levels) in <top (required)>' /usr/local/rvm/gems/ruby-2.3.8/gems/rake-13.0.3/lib/rake/task.rb:281:in `block in execute' /usr/local/rvm/gems/ruby-2.3.8/gems/rake-13.0.3/lib/rake/task.rb:281:in `each' /usr/local/rvm/gems/ruby-2.3.8/gems/rake-13.0.3/lib/rake/task.rb:281:in `execute' /usr/local/rvm/gems/ruby-2.3.8/gems/rake-13.0.3/lib/rake/task.rb:219:in `block in invoke_with_call_chain' /usr/local/rvm/rubies/ruby-2.3.8/lib/ruby/2.3.0/monitor.rb:214:in `mon_synchronize' /usr/local/rvm/gems/ruby-2.3.8/gems/rake-13.0.3/lib/rake/task.rb:199:in `invoke_with_call_chain' /usr/local/rvm/gems/ruby-2.3.8/gems/rake-13.0.3/lib/rake/task.rb:188:in `invoke' /usr/local/rvm/gems/ruby-2.3.8/gems/rake-13.0.3/lib/rake/application.rb:160:in `invoke_task' /usr/local/rvm/gems/ruby-2.3.8/gems/rake-13.0.3/lib/rake/application.rb:116:in `block (2 levels) in top_level' /usr/local/rvm/gems/ruby-2.3.8/gems/rake-13.0.3/lib/rake/application.rb:116:in `each' /usr/local/rvm/gems/ruby-2.3.8/gems/rake-13.0.3/lib/rake/application.rb:116:in `block in top_level' /usr/local/rvm/gems/ruby-2.3.8/gems/rake-13.0.3/lib/rake/application.rb:125:in `run_with_threads' /usr/local/rvm/gems/ruby-2.3.8/gems/rake-13.0.3/lib/rake/application.rb:110:in `top_level' /usr/local/rvm/gems/ruby-2.3.8/gems/rake-13.0.3/lib/rake/application.rb:83:in `block in run' /usr/local/rvm/gems/ruby-2.3.8/gems/rake-13.0.3/lib/rake/application.rb:186:in `standard_exception_handling' /usr/local/rvm/gems/ruby-2.3.8/gems/rake-13.0.3/lib/rake/application.rb:80:in `run' /usr/local/rvm/gems/ruby-2.3.8/gems/rake-13.0.3/exe/rake:27:in `<top (required)>' /usr/local/rvm/gems/ruby-2.3.8/bin/rake:23:in `load' /usr/local/rvm/gems/ruby-2.3.8/bin/rake:23:in `<main>' /usr/local/rvm/gems/ruby-2.3.8/bin/ruby_executable_hooks:22:in `eval' /usr/local/rvm/gems/ruby-2.3.8/bin/ruby_executable_hooks:22:in `<main>' Tasks: TOP => redmine:email:receive_pop3
From the Redmine server I can reach Gmail ports 993 and 995 by telnet.
I don't understand why is too difficult this setting in redmine.
Regards again.