Defect #3746

Receiving IMAP mails fails with 'undefined method'

Added by Samuel Vogel almost 4 years ago. Updated almost 3 years ago.

Status:ReopenedStart date:2009-08-17
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:Email receiving
Target version:-
Affected version:devel Resolution:Cant reproduce

Description

I am running redmine trunk r2835, with ruby 1.8.7 and rails 2.2.2.
When I try to receive mails from our IMAP Server at Strato.de , I get the following exception.
Don't know what other information you need, if there is anything I can help you with, please let me know.

# rake -f /var/www/redmine/Rakefile redmine:email:receive_imap RAILS_ENV="production" host=imap.strato.de ssl=true \
    port=993 username=binoli@redmine.domain.de password=******** project=binoli \
    move_on_success=redmine-success move_on_failure=redmine-failure --trace
(in /root)
** Invoke redmine:email:receive_imap (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute redmine:email:receive_imap
rake aborted!
undefined method `[]' for nil:NilClass
/usr/lib/ruby/1.8/net/imap.rb:1160:in `search_internal'
/usr/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/usr/lib/ruby/1.8/net/imap.rb:1154:in `search_internal'
/usr/lib/ruby/1.8/net/imap.rb:679:in `search'
/var/www/redmine/lib/redmine/imap.rb:32:in `check'
/var/www/redmine/lib/tasks/email.rake:127
/usr/lib/ruby/1.8/rake.rb:617:in `call'
/usr/lib/ruby/1.8/rake.rb:617:in `execute'
/usr/lib/ruby/1.8/rake.rb:612:in `each'
/usr/lib/ruby/1.8/rake.rb:612:in `execute'
/usr/lib/ruby/1.8/rake.rb:578:in `invoke_with_call_chain'
/usr/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/usr/lib/ruby/1.8/rake.rb:571:in `invoke_with_call_chain'
/usr/lib/ruby/1.8/rake.rb:564:in `invoke'
/usr/lib/ruby/1.8/rake.rb:2027:in `invoke_task'
/usr/lib/ruby/1.8/rake.rb:2005:in `top_level'
/usr/lib/ruby/1.8/rake.rb:2005:in `each'
/usr/lib/ruby/1.8/rake.rb:2005:in `top_level'
/usr/lib/ruby/1.8/rake.rb:2044:in `standard_exception_handling'
/usr/lib/ruby/1.8/rake.rb:1999:in `top_level'
/usr/lib/ruby/1.8/rake.rb:1977:in `run'
/usr/lib/ruby/1.8/rake.rb:2044:in `standard_exception_handling'
/usr/lib/ruby/1.8/rake.rb:1974:in `run'
/usr/bin/rake:28

History

#1 Updated by Patrice Bonhomme over 3 years ago

Same problem !

#2 Updated by Patrice Bonhomme over 3 years ago

Patrice Bonhomme wrote:

Same problem !

It seems to happend when here is no mail to process within the IMAP folder.

#3 Updated by Jean-Philippe Lang over 3 years ago

  • Resolution set to Cant reproduce

I can't reproduce and this error is raised by ruby net/imap. So I can't fix anything.

#4 Updated by Jean-Philippe Lang over 3 years ago

  • Status changed from New to Closed

#5 Updated by Samuel Vogel over 3 years ago

  • Status changed from Closed to Reopened

I can still reproduce this behavior. I'm not that fond in Ruby/Rails, so any pointers on how to go on about this bug would be appreciated.
Any more info I can provide?

The access to the mailbox seems fine, as it says "Login incorrect" when I try it with a different password.
Also this error seems to happen while the mailbox is empty.

#6 Updated by Jean-Philippe Lang over 3 years ago

  • Category changed from Email notifications to Email receiving

#7 Updated by Felix Schäfer over 3 years ago

I have this problem too, although only on one of the two installations I have running with the imap thingie.

@Jena-Philippe: Would it help you to get a test account on this imap server so that you can try to reproduce the error yourself?

#8 Updated by Matt Hamilton almost 3 years ago

Also available in: Atom PDF