Project

General

Profile

Defect #27691

Updated by Toshi MARUYAMA almost 7 years ago

Env : redmine 3.2.8 - PRODUCTION 
 OS: Debian 8.9 
 Mailhandler: source:tags/3.2.8/extra/mail_handler/rdm-mailhandler.rb https://github.com/redmine/redmine/blob/master/extra/mail_handler/rdm-mailhandler.rb 

 Migrating our production redmine from 3.2.1 to 3.2.8 , we noticed that some emails with french sepcial characters were creating empty issues. 

 Here are the details: 

 - mail is sent to ticket@ourdomain.com 
 - on mailserver, we use latest version of rdm-mailhandler.rb which forwards email to our redmine in specific projects. 
 - on redmine server, we see both succeeding emails and some others who are not correctly transformed into issues. 


 On production.log, we don't see any particular problem 
 Here is an example of an email becoming an empty issue: 


 <pre> 
 Started POST "/mail_handler" for 10.123.1.3 at 2017-12-01 11:49:52 +0100 
 Processing by MailHandlerController#index as HTML 
   Parameters: {"key"=>"XIQlZmuj8wzsyWBC4ucB", "email"=>"From julinux@mycompany.fr    Fri Dec    1 11:49:52 2017\nReturn-Path: <julinux@mycompany.fr>\nX-Original-To: ticket@mycompany.fr\nDelivered-To: ticket@mycompany.fr\nReceived: from localhost (unknown [127.0.0.1])\n\tby mail.mycompany.fr (Postfix::smtpd) with ESMTP id 5E1A7559\n\tfor <ticket@mycompany.fr>; Fri,    1 Dec 2017 11:49:52 +0100 (CET)\nDKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=mycompany.fr;\n\ts=mycompany.fr; t=1512125392;\n\tbh=+cEL8GCaNKPGfAl6U7yCNuKL4UTN2UkhX+jOBsmT7iY=;\n\th=To:From:Subject:Date:From;\n\tb=QuPhO2+UuQM8K5Bc8AMNRXC/bC7pTaXq42ambTZz89BZcyzAFKiSZzLdAr99T+o/o\n\t thGNDzH26zgG4oxQK3szqxKzsJgsXijhJPftgDECFWIb5HOiCnb77hbYvBJ5dQ1ECz\n\t BlyasjpiMHrsALRjNAEettV58VMlDhqQaj8J7rSc=\nDKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=mycompany.fr;\n\ts=mycompany.fr; t=1512125392;\n\tbh=+cEL8GCaNKPGfAl6U7yCNuKL4UTN2UkhX+jOBsmT7iY=;\n\th=To:From:Subject:Date:From;\n\tb=QuPhO2+UuQM8K5Bc8AMNRXC/bC7pTaXq42ambTZz89BZcyzAFKiSZzLdAr99T+o/o\n\t thGNDzH26zgG4oxQK3szqxKzsJgsXijhJPftgDECFWIb5HOiCnb77hbYvBJ5dQ1ECz\n\t BlyasjpiMHrsALRjNAEettV58VMlDhqQaj8J7rSc=\nX-Virus-Scanned: Debian amavisd-new at debian8amd64prodOE\nX-Spam-Flag: NO\nX-Spam-Score: -2.998\nX-Spam-Level:\nX-Spam-Status: No, score=-2.998 tagged_above=-999 required=5.5\n\ttests=[ALL_TRUSTED=-1, BAYES_00=-1.9, DKIM_SIGNED=0.1,\n\tDKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=0.001,\n\tURIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no\nReceived: from mail.mycompany.fr ([127.0.0.1])\n\tby localhost (mail.mycompany.fr [127.0.0.1]) (amavisd-new, port 10024)\n\twith LMTP id c9qer7n5h2LZ for <ticket@mycompany.fr>;\n\tFri,    1 Dec 2017 11:49:51 +0100 (CET)\nReceived: from [192.168.103.194] (unknown [109.190.128.27])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))\n\t(No client certificate requested)\n\tby mail.mycompany.fr (Postfix::smtpd) with ESMTPSA id 994FA4D1\n\tfor <ticket@mycompany.fr>; Fri,    1 Dec 2017 11:49:51 +0100 (CET)\nDKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=mycompany.fr;\n\ts=mycompany.fr; t=1512125391;\n\tbh=+cEL8GCaNKPGfAl6U7yCNuKL4UTN2UkhX+jOBsmT7iY=;\n\th=To:From:Subject:Date:From;\n\tb=TMesqjQtZ7ut1zYR91GtKcyz6GxYHjO7zoV6tKtAlGlT1K7EQlCC+LX0NVKGBWkgp\n\t mP4FjKVN+W1lTvgeHxFd1zcHDISeC0WGqHv5S5D94PEdaj8bpbluS0IeROPxgo8fhH\n\t IRR0nOqnWXRi15ck3qm7WR61kg/0I02o4MpQSryQ=\nDKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=mycompany.fr;\n\ts=mycompany.fr; t=1512125391;\n\tbh=+cEL8GCaNKPGfAl6U7yCNuKL4UTN2UkhX+jOBsmT7iY=;\n\th=To:From:Subject:Date:From;\n\tb=TMesqjQtZ7ut1zYR91GtKcyz6GxYHjO7zoV6tKtAlGlT1K7EQlCC+LX0NVKGBWkgp\n\t mP4FjKVN+W1lTvgeHxFd1zcHDISeC0WGqHv5S5D94PEdaj8bpbluS0IeROPxgo8fhH\n\t IRR0nOqnWXRi15ck3qm7WR61kg/0I02o4MpQSryQ=\nTo: ticket@mycompany.fr\nFrom: Julien TEHERY <julinux@mycompany.fr>\nSubject: TEST 16\nMessage-ID: <e51fd0a1-b014-ef78-2ff2-4ef38a130388@mycompany.fr>\nDate: Fri, 1 Dec 2017 11:49:51 +0100\nUser-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101\n Thunderbird/52.4.0\nMIME-Version: 1.0\nContent-Type: multipart/alternative;\n boundary=\"------------4858C4CCDE564230BCC36310\"\nContent-Language: fr\n\nThis is a multi-part message in MIME format.\n--------------4858C4CCDE564230BCC36310\nContent-Type: text/plain; charset=utf-8; format=flowed\nContent-Transfer-Encoding: 8bit\n\nTEST 16\n\n-- \nCordialement,\n\nJulien Téhéry - Ingénieur Systèmes et Réseaux\nSociété mycompany - www.mycompany.ff 
 r <http://www.mycompany.fr>\nTél Support : 05 49 62 26 07\n\n\n--------------4858C4CCDE564230BCC36310\nContent-Type: text/html; charset=utf-8\nContent-Transfer-Encodii 
 ng: 8bit\n\n<html>\n    <head>\n\n      <meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\">\n    </head>\n    <body text=\"#000000\" bgcolor=\"#FFFFFF\">\n      <p>TEST 16<br>\n      </p>\n      <div class=\"moz-signature\">-- <br>\n        Cordialement,<br>\n        <br>\n        Julien Téhéry - Ingénieur Systèmes et Réseaux<br>> 
 \n        Société mycompany - <a href=\"http://www.mycompany.fr\"\n          title=\"mycompany\" target=\"_blank\">www.mycompany.fr</a><br>\n        Tél Suppoo 
 rt : 05 49 62 26 07<br>\n        <br>\n      </div>\n    </body>\n</html>\n\n--------------4858C4CCDE564230BCC36310--\n", "allow_override"=>"project,tracker,priority,status", "unknown_user"=>"accept", "default_group"=>nil, "no_account_notice"=>nil, "no_notification"=>nil, "no_permission_check"=>"1", "project_from_subaddress"=>nil, "issue"=>{"project"=>"clients-mycompany", "tracker"=>"Support"}} 
   Rendered queries/_filters.html.erb (12.5ms) 
   Rendered queries/_columns.html.erb (1.8ms) 
   Rendered issues/_list.html.erb (35.5ms) 
   Rendered issues/_sidebar.html.erb (21.2ms) 
   Rendered issues/index.html.erb within layouts/base (81.4ms) 
 Completed 200 OK in 566ms (Views: 132.4ms | ActiveRecord: 12.4ms) 
 </pre> 

 So I tried to figure out what was different in the incoming emails, looking at the source of them. 
 Didn't find anything particular excepted that "good emails" had "Content-Transfer-Encoding: quoted-printable" in their source code. 

 I don't know if this can be related or not to my problem. 
 But the fact is we did'nt changed anything regarding mail_handler or mailserver, and we lost the ability to get emails from everyone. 
 I must precise that we allready used latest version of mail_handler (see links above) before upgrading. 

 Any help would be appreciated ! 

Back