Trouble setting up receive mail SocketError

Added by Peter Lustig 4 months ago

Hello,

I have been trying to get the mail to issue feature to work for a few hours now and progress is very slow.
I am using the following command:
rake redmine:email:receive_imap unknown_user=accept no_permission_check=1 RAILS_ENV="production" host=imap.gmail.com port=993 username=xxx password=xxx ssl=1 --trace

I also tried dig/nslookup with the host and it works fine

I get the following message:
  • Invoke redmine:email:receive_imap (first_time)
  • Invoke environment (first_time)
  • Execute environment
  • Execute redmine:email:receive_imap
    rake aborted!
    SocketError: getaddrinfo: Name or service not known
    /usr/local/rbenv/versions/2.3.3/lib/ruby/2.3.0/net/imap.rb:1082:in `initialize'
    /usr/local/rbenv/versions/2.3.3/lib/ruby/2.3.0/net/imap.rb:1082:in `open'
    /usr/local/rbenv/versions/2.3.3/lib/ruby/2.3.0/net/imap.rb:1082:in `initialize'
    /var/www/redmine/lib/redmine/imap.rb:30:in `new'
    /var/www/redmine/lib/redmine/imap.rb:30:in `check'
    /var/www/redmine/lib/tasks/email.rake:117:in `block (4 levels) in <top (required)>'
    /var/www/redmine/app/models/mailer.rb:433:in `with_synched_deliveries'
    /var/www/redmine/lib/tasks/email.rake:116:in `block (3 levels) in <top (required)>'
    /usr/local/rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/rake-12.0.0/lib/rake/task.rb:250:in `block in execute'
    /usr/local/rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/rake-12.0.0/lib/rake/task.rb:250:in `each'
    /usr/local/rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/rake-12.0.0/lib/rake/task.rb:250:in `execute'
    /usr/local/rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/rake-12.0.0/lib/rake/task.rb:194:in `block in invoke_with_call_chain'
    /usr/local/rbenv/versions/2.3.3/lib/ruby/2.3.0/monitor.rb:214:in `mon_synchronize'
    /usr/local/rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/rake-12.0.0/lib/rake/task.rb:187:in `invoke_with_call_chain'
    /usr/local/rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/rake-12.0.0/lib/rake/task.rb:180:in `invoke'
    /usr/local/rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/rake-12.0.0/lib/rake/application.rb:152:in `invoke_task'
    /usr/local/rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/rake-12.0.0/lib/rake/application.rb:108:in `block (2 levels) in top_level'
    /usr/local/rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/rake-12.0.0/lib/rake/application.rb:108:in `each'
    /usr/local/rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/rake-12.0.0/lib/rake/application.rb:108:in `block in top_level'
    /usr/local/rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/rake-12.0.0/lib/rake/application.rb:117:in `run_with_threads'
    /usr/local/rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/rake-12.0.0/lib/rake/application.rb:102:in `top_level'
    /usr/local/rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/rake-12.0.0/lib/rake/application.rb:80:in `block in run'
    /usr/local/rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/rake-12.0.0/lib/rake/application.rb:178:in `standard_exception_handling'
    /usr/local/rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/rake-12.0.0/lib/rake/application.rb:77:in `run'
    /usr/local/rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/rake-12.0.0/exe/rake:27:in `<top (required)>'
    /usr/local/rbenv/versions/2.3.3/bin/rake:23:in `load'
    /usr/local/rbenv/versions/2.3.3/bin/rake:23:in `<main>'
    Tasks: TOP => redmine:email:receive_imap

Help would be appreciated