Project

General

Profile

Actions

Defect #9476

closed

Redmine silently fail to create an issue from a mail with a line that contains 3 simple quotes

Added by Jonathan Pasquier about 13 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Email receiving
Target version:
-
Start date:
2011-10-26
Due date:
% Done:

0%

Estimated time:
Resolution:
Cant reproduce
Affected version:

Description

When we send a mail that contains a line with 3 simple quotes in its body, it silently fails to create an issue.

Steps to reproduce:
- Configure your Redmine instance to accept mails
- Send a mail with 'test'test' in the body

----
Log:

Processing MailHandlerController#index (for 10.1.20.150 at 2011-10-20 10:55:36) [POST]
  Parameters: {"no_permission_check"=>"1", "unknown_user"=>"create", "allow_override"=>"project,tracker,priority,status", "issue"=>{"project"=>"general", "tracker"=>"tasques"}, "key"=>"xxxxxxxxxxxxxxxxx", "email"=>"test'test"}

TMail::SyntaxError (wrong mail header: '"test'test"'):
  app/models/mail_handler.rb:40:in `receive'
  app/controllers/mail_handler_controller.rb:29:in `index'
  /var/lib/gems/1.8/gems/passenger-2.2.11/lib/phusion_passenger/rack/request_handler.rb:92:in `process_request'
  /var/lib/gems/1.8/gems/passenger-2.2.11/lib/phusion_passenger/abstract_request_handler.rb:207:in `main_loop'
  /var/lib/gems/1.8/gems/passenger-2.2.11/lib/phusion_passenger/railz/application_spawner.rb:418:in `start_request_handler'
  /var/lib/gems/1.8/gems/passenger-2.2.11/lib/phusion_passenger/railz/application_spawner.rb:358:in `handle_spawn_application'
  /var/lib/gems/1.8/gems/passenger-2.2.11/lib/phusion_passenger/utils.rb:184:in `safe_fork'
  /var/lib/gems/1.8/gems/passenger-2.2.11/lib/phusion_passenger/railz/application_spawner.rb:354:in `handle_spawn_application'
  /var/lib/gems/1.8/gems/passenger-2.2.11/lib/phusion_passenger/abstract_server.rb:352:in `__send__'
  /var/lib/gems/1.8/gems/passenger-2.2.11/lib/phusion_passenger/abstract_server.rb:352:in `main_loop'
  /var/lib/gems/1.8/gems/passenger-2.2.11/lib/phusion_passenger/abstract_server.rb:196:in `start_synchronously'
  /var/lib/gems/1.8/gems/passenger-2.2.11/lib/phusion_passenger/abstract_server.rb:163:in `start'
  /var/lib/gems/1.8/gems/passenger-2.2.11/lib/phusion_passenger/railz/application_spawner.rb:213:in `start'
  /var/lib/gems/1.8/gems/passenger-2.2.11/lib/phusion_passenger/spawn_manager.rb:262:in `spawn_rails_application'
  /var/lib/gems/1.8/gems/passenger-2.2.11/lib/phusion_passenger/abstract_server_collection.rb:126:in `lookup_or_add'
  /var/lib/gems/1.8/gems/passenger-2.2.11/lib/phusion_passenger/spawn_manager.rb:256:in `spawn_rails_application'
  /var/lib/gems/1.8/gems/passenger-2.2.11/lib/phusion_passenger/abstract_server_collection.rb:80:in `synchronize'
  /var/lib/gems/1.8/gems/passenger-2.2.11/lib/phusion_passenger/abstract_server_collection.rb:79:in `synchronize'
  /var/lib/gems/1.8/gems/passenger-2.2.11/lib/phusion_passenger/spawn_manager.rb:255:in `spawn_rails_application'
  /var/lib/gems/1.8/gems/passenger-2.2.11/lib/phusion_passenger/spawn_manager.rb:154:in `spawn_application'
  /var/lib/gems/1.8/gems/passenger-2.2.11/lib/phusion_passenger/spawn_manager.rb:287:in `handle_spawn_application'
  /var/lib/gems/1.8/gems/passenger-2.2.11/lib/phusion_passenger/abstract_server.rb:352:in `__send__'
  /var/lib/gems/1.8/gems/passenger-2.2.11/lib/phusion_passenger/abstract_server.rb:352:in `main_loop'
  /var/lib/gems/1.8/gems/passenger-2.2.11/lib/phusion_passenger/abstract_server.rb:196:in `start_synchronously'

Rendering /home/www/redmine/public/500.html (500 Internal Server Error)

----
Information about our Redmine instance:

About your application's environment
Ruby version              1.8.7 (i486-linux)
RubyGems version          1.7.0
Rack version              1.1
Rails version             2.3.11
Active Record version     2.3.11
Active Resource version   2.3.11
Action Mailer version     2.3.11
Active Support version    2.3.11
Application root          /home/www/redmine
Environment               production
Database adapter          mysql
Database schema version   20110511000000

About your Redmine plugins
Stuff To Do Plugin   0.4.0
Contact form         0.0.1
Timesheet Plugin     0.6.0
Tab Plugin           0.3.1

Actions #1

Updated by Alex Shulgin about 13 years ago

That has nothing to do with the quotes. You're not sending a valid email (with envelope) to the mail handler.

How exactly do you post the request? Do you use rdm-mailhandler.rb supplied with redmine?

Actions #2

Updated by Jonathan Pasquier about 13 years ago

We send mails from Thunderbird or Outlook 2010.
Mails are processed by the rdm-mailhandler.rb script, and everything works fine most of the time.
I was also puzzled by the log entry: with other mails, I see the whole mail, with headers and everything.

Mails are forwarded from Postfix through a local alias as described in the documentation:

foo: "|/path/to/rdm-mailhandler.rb --url http://redmine.domain --key secret --project foo" 

Here is the postfix log:

Oct 26 10:22:16 our-server-name postfix/local[29197]: 593A212042B: to=<redmine@localhost>, orig_to=<redmine@xxx.net>, relay=local, delay=119, delays=118/0.02/0/0.18, dsn=4.3.0, status=deferred (temporary failure. Command output: Failed to contact your Redmine server (500).

Any idea?

Actions #3

Updated by Go MAEDA almost 6 years ago

  • Status changed from New to Closed
  • Resolution set to Cant reproduce

You can find from the stack trace that the exception is raised in TMail gem. However, TMail was replaced with Mail in Rails 3.0. This means that TMail is not used by Redmine 2.0 and later.
https://github.com/rails/rails/commit/71ffa760701d2240ece5f17b75df316611ecb3d0

Please reopen this issue if you are still experiencing the same problem in the latest version of Redmine.

Actions

Also available in: Atom PDF