Project

General

Profile

Actions

Defect #35879

closed

mail handler failing when smilies inline

Added by Janeks Kamerovskis over 3 years ago. Updated about 3 years ago.

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

0%

Estimated time:
Resolution:
Duplicate
Affected version:

Description

My system info:

Environment:
  Redmine version                4.2.1.stable
  Ruby version                   2.7.3-p183 (2021-04-05) [aarch64-linux]
  Rails version                  5.2.5
  Environment                    production
  Database adapter               Mysql2
  Mailer queue                   ActiveJob::QueueAdapters::AsyncAdapter
  Mailer delivery                smtp
SCM:
  Subversion                     1.13.0
  Mercurial                      5.3.1
  Cvs                            1.12.13
  Bazaar                         3.0.2
  Git                            2.25.1
  Filesystem                     
Redmine plugins:
  accept                         0.0.2
  additionals                    3.0.2
  issue_recurring                1.4
  localizable                    0.4.0
  redmine_checklists             3.1.18
  redmine_contacts               4.3.4
  redmine_contacts_invoices      4.1.8
  redmine_dashboard              2.7.1
  redmine_issues_tree            0.0.14
  redmine_lightbox2              0.5.1
  redmine_logs                   0.2.0
  redmine_mentions               0.0.1
  redmine_tags                   4.0.0
  redmine_theme_changer          0.4.0
  redmine_timelog_timer          2.0.1
  redmine_work_time              0.4.1

I am using mail aliases to pipe mail to mailhandler.

Unfortunately it fails when an e-mail contains an emoji/smiley see attached.

In receiving replay form server it initially is reported as possible permission problem:

                  The mail system

<support@domain.my>: permission denied. Command output: Request was denied by
    your Redmine server. Possible reasons: email is sent from an invalid email
    address or is missing some information.

Reporting-MTA: dns; domain.my
X-Postfix-Queue-ID: 3521C1760
X-Postfix-Sender: rfc822; my.mail@domain.my
Arrival-Date: Wed, 15 Sep 2021 11:40:37 +0300 (EEST)

Final-Recipient: rfc822; support@domain.my
Original-Recipient: rfc822;support@domain.my
Action: failed
Status: 5.7.0
Diagnostic-Code: x-unix; Request was denied by your Redmine server. Possible
    reasons: email is sent from an invalid email address or is missing some
    information.

but further investigations shows:

MailHandler: an unexpected error occurred when receiving email: Mysql2::Error: Incorrect string value: '\xF0\x9F\x98\x8A' for column 'description' at row 1: INSERT INTO `issues` (`tracker_id`, `project_id`, `subject`, `description`, `status_id`, `assigned_to_id`, `priority_id`, `author_id`, `created_on`, `updated_on`, `start_date`, `lock_version`) VALUES (3, 6, 'Fwd: Fwd: FW: Forems', 'Ttestam\r\n\r\nItkā sīkums, bet ja to var sakārtot, varbūt ir vērts


Files

email-smiley.png (4.49 KB) email-smiley.png Janeks Kamerovskis, 2021-09-15 12:35

Related issues

Related to Redmine - Defect #30848: Error when creating issue with emoji in descriptionNew

Actions
Actions #1

Updated by Mischa The Evil about 3 years ago

  • Related to Defect #30848: Error when creating issue with emoji in description added
Actions #2

Updated by Mischa The Evil about 3 years ago

  • Status changed from New to Closed
  • Resolution set to Duplicate

This looks similar to #30848, which itself is related to #31921.

Quote from Marius BALTEANU in #34574#note-4:

The smiley issue is generated by your database configuration, most probably you are using MySQL with a column encoding such as utf8 which can not store 4-Byte unicode characters (such as most emojis or special characters) If that is the case, see #10772.

In Redmine 4.1 we fixed this problem for new fresh installations (#31921), but for existing installations, before making that change, you need to migrate your database. In the mentioned tickets, you can find various links to articles that describe the process. Please be aware that it's a sensitive process and I highly recommend to backup your data before proceeding.

Please reopen if I'm wrong.

Actions

Also available in: Atom PDF