Defect #16122
openredmine:email:receive should not abort with buggy mail
0%
Description
Hi
I'm testing issue creation via email with redmine-2.4.3. It works fine when I have plain Ascii mails, but fails with Croatian characters. Gmail chooses to use latin2 for them, and that works fine in all other apps, but not with redmine 2.4.3 when receiving email. I've attached the .eml file that gmail sends to our mail server.
I've also tried with patch in http://www.redmine.org/projects/redmine/repository/revisions/12474, but issue is still present.
rake -f ~/redmine-2.4.3/Rakefile redmine:email:receive_imap RAILS_ENV="production" host=xxxxxxx username=xxxxx password=xxxx project=operativa tracker=Bug allow_override=tracker,priority
rake aborted!
"\xB9" from ASCII-8BIT to UTF-8
/home/redmine/.rvm/gems/ruby-1.9.3-p484/gems/mail-2.5.4/lib/mail/fields/unstructured_field.rb:149:in `encode!'
/home/redmine/.rvm/gems/ruby-1.9.3-p484/gems/mail-2.5.4/lib/mail/fields/unstructured_field.rb:149:in `fold'
/home/redmine/.rvm/gems/ruby-1.9.3-p484/gems/mail-2.5.4/lib/mail/fields/unstructured_field.rb:103:in `wrapped_value'
/home/redmine/.rvm/gems/ruby-1.9.3-p484/gems/mail-2.5.4/lib/mail/fields/unstructured_field.rb:69:in `do_encode'
/home/redmine/.rvm/gems/ruby-1.9.3-p484/gems/mail-2.5.4/lib/mail/fields/unstructured_field.rb:51:in `encoded'
/home/redmine/.rvm/gems/ruby-1.9.3-p484/gems/mail-2.5.4/lib/mail/field.rb:167:in `method_missing'
/home/redmine/.rvm/gems/ruby-1.9.3-p484/gems/mail-2.5.4/lib/mail/header.rb:206:in `block in encoded'
/home/redmine/.rvm/gems/ruby-1.9.3-p484/gems/mail-2.5.4/lib/mail/header.rb:205:in `each'
/home/redmine/.rvm/gems/ruby-1.9.3-p484/gems/mail-2.5.4/lib/mail/header.rb:205:in `encoded'
/home/redmine/.rvm/gems/ruby-1.9.3-p484/gems/mail-2.5.4/lib/mail/message.rb:1801:in `encoded'
/home/redmine/.rvm/gems/ruby-1.9.3-p484/gems/actionmailer-3.2.16/lib/action_mailer/base.rb:434:in `set_payload_for_mail'
/home/redmine/.rvm/gems/ruby-1.9.3-p484/gems/actionmailer-3.2.16/lib/action_mailer/base.rb:403:in `block in receive'
/home/redmine/.rvm/gems/ruby-1.9.3-p484/gems/activesupport-3.2.16/lib/active_support/notifications.rb:123:in `block in instrument'
/home/redmine/.rvm/gems/ruby-1.9.3-p484/gems/activesupport-3.2.16/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/home/redmine/.rvm/gems/ruby-1.9.3-p484/gems/activesupport-3.2.16/lib/active_support/notifications.rb:123:in `instrument'
/home/redmine/.rvm/gems/ruby-1.9.3-p484/gems/actionmailer-3.2.16/lib/action_mailer/base.rb:401:in `receive'
/home/redmine/redmine-2.4.3/app/models/mail_handler.rb:46:in `receive'
/home/redmine/redmine-2.4.3/lib/redmine/imap.rb:35:in `block in check'
/home/redmine/redmine-2.4.3/lib/redmine/imap.rb:32:in `each'
/home/redmine/redmine-2.4.3/lib/redmine/imap.rb:32:in `check'
/home/redmine/redmine-2.4.3/lib/tasks/email.rake:125:in `block (3 levels) in <top (required)>'
/home/redmine/.rvm/gems/ruby-1.9.3-p484/bin/ruby_executable_hooks:15:in `eval'
/home/redmine/.rvm/gems/ruby-1.9.3-p484/bin/ruby_executable_hooks:15:in `<main>'
Tasks: TOP => redmine:email:receive_imap
(See full trace by running task with --trace)
Please tell if you need more data or testing.
Issue looks very similar as the one here: http://stackoverflow.com/questions/19450199/redmine-receive-mail-field
Related issues