Incoming emails dropped: TMail::SyntaxError "mail is began by space"

Added by Chris Platts over 12 years ago


I think this might be something internal to ActionMailer rather than Redmine-specific, but I'd be interested to see if anyone here has seen (or fixed/worked-around) this problem.

Frequently, an incoming email will trigger this error:

A TMail::SyntaxError occurred in mail_handler#index:

  mail is began by space
  /usr/lib/ruby/gems/1.8/gems/actionmailer-2.3.11/lib/action_mailer/vendor/tmail-1.2.7/tmail/mail.rb:395:in `parse_header'


  * URL       :
  * IP address:
  * Parameters: {"unknown_user"=>"create", "no_permission_check"=>"1", "action"=>"index", "allow_override"=>"", "issue"=>{"project"=>"support", "tracker"=>"Support"}, "controller"=>"mail_handler", "key"=>"OzbAo9T4lB6ehMiJy2Vm", "email"=>" title=3D\""}
  * Rails root: /var/redmine-latest

The emails are being sent to us from our clients -- most often using MS Outlook. Perhaps ActionMailer is being rather too strict in parsing the incoming email?

Is there a way to get ActionMailer to relax a bit and let these emails through?

My script/about:

About your application's environment
Ruby version              1.8.7 (i486-linux)
RubyGems version          1.3.6
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          /var/redmine-latest
Environment               production
Database adapter          mysql
Database schema version   20110511000000

About your Redmine plugins
Redmine Exception Handler plugin     0.2.0
Redmine DocPu plugin                 0.0.2
Redmine Charts                       0.1.0
Redmine System Notification plugin   0.2.0
Redmine Work Time plugin             0.0.63
Tab Plugin                           0.3.1
Redmine My Widgets plugin            0.1.0
Redmine Code Review plugin           0.3.0
Rate Plugin                          0.1.0
Redmine Repo Pygments plugin         0.0.2
Redmine Stealth plugin               0.1.0
ezFAQ plugin                         0.3.5
Timesheet Plugin                     0.5.0
Redmine Wiki Extensions plugin       0.2.2
Redmine ezLibrarian plugin           0.1.1
Stuff To Do Plugin                   0.4.0
Redmine Graphs plugin                0.1.0
Budget                               0.2.0
Embedded                             0.0.1