Troubleshooting retrieving emails via IMAP from GMAIL account (unknonw command)

Added by Sergi de Pablos almost 10 years ago

Hi,

I'm trying to test the creation of tickets via email, following the documentation at http://www.redmine.org/wiki/redmine/RedmineReceivingEmails with the "Fetching emails from an IMAP server" option, but everytime I receive an "unknown command error".

I run the following command:

rake -f redmine:email:receive_imap RAILS_ENV=production host=imap.gmail.com user=XXX@goodbuyamigo.com password=XXXXXXXX port=993 ssl=true folder=Inbox --trace

And I always receive the following answer:

(in /var/www/proyectos.goodbuyamigo.com)
** Invoke redmine:email:receive_imap (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute redmine:email:receive_imap
rake aborted!
Unknown command z23if12344036wbd.13
/opt/ruby-enterprise-1.8.7-2010.01/lib/ruby/1.8/net/imap.rb:985:in `pick_up_tagged_response'
/opt/ruby-enterprise-1.8.7-2010.01/lib/ruby/1.8/net/imap.rb:976:in `get_tagged_response'
/opt/ruby-enterprise-1.8.7-2010.01/lib/ruby/1.8/net/imap.rb:1034:in `send_command'
/opt/ruby-enterprise-1.8.7-2010.01/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/opt/ruby-enterprise-1.8.7-2010.01/lib/ruby/1.8/net/imap.rb:1019:in `send_command'
/opt/ruby-enterprise-1.8.7-2010.01/lib/ruby/1.8/net/imap.rb:398:in `select'
/opt/ruby-enterprise-1.8.7-2010.01/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/opt/ruby-enterprise-1.8.7-2010.01/lib/ruby/1.8/net/imap.rb:396:in `select'
/var/www/proyectos.goodbuyamigo.com/lib/redmine/imap.rb:31:in `check'
/var/www/proyectos.goodbuyamigo.com/lib/tasks/email.rake:133
/opt/ruby-enterprise-1.8.7-2010.01/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `call'
/opt/ruby-enterprise-1.8.7-2010.01/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `execute'
/opt/ruby-enterprise-1.8.7-2010.01/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `each'
/opt/ruby-enterprise-1.8.7-2010.01/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `execute'
/opt/ruby-enterprise-1.8.7-2010.01/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:597:in `invoke_with_call_chain'
/opt/ruby-enterprise-1.8.7-2010.01/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/opt/ruby-enterprise-1.8.7-2010.01/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_with_call_chain'
/opt/ruby-enterprise-1.8.7-2010.01/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:583:in `invoke'
/opt/ruby-enterprise-1.8.7-2010.01/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2051:in `invoke_task'
/opt/ruby-enterprise-1.8.7-2010.01/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level'
/opt/ruby-enterprise-1.8.7-2010.01/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `each'
/opt/ruby-enterprise-1.8.7-2010.01/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level'
/opt/ruby-enterprise-1.8.7-2010.01/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling'
/opt/ruby-enterprise-1.8.7-2010.01/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2023:in `top_level'
/opt/ruby-enterprise-1.8.7-2010.01/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2001:in `run'
/opt/ruby-enterprise-1.8.7-2010.01/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling'
/opt/ruby-enterprise-1.8.7-2010.01/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1998:in `run'
/opt/ruby-enterprise-1.8.7-2010.01/lib/ruby/gems/1.8/gems/rake-0.8.7/bin/rake:31
/usr/local/bin/rake:19:in `load'
/usr/local/bin/rake:19

The unknown command error changes on each execution: z23if12344036wbd.13, r71if3193348weq.44, l32if12361525wbe.15...

Any ideas?

Regards

Sergi

Replies (1)

RE: Troubleshooting retrieving emails via IMAP from GMAIL account (unknonw command) - Added by Jakob Skjerning over 8 years ago

I realize I way too late to probably help Sergi, however I ran into the same issue. Googling lead me to this post and I figured others might have the same experience and benefit from the solution:

I had

user=foo@gmail.com
- the proper syntax is
username=foo@gmail.com
.

That should solve it.

(1-1/1)