email processing stuck because of msg ID field length

This plugin allows you to report an issue in MantisBT by sending an email to a particular mail account

Moderators: Developer, Contributor

Post Reply
Posts: 1
Joined: 25 Feb 2021, 12:03

email processing stuck because of msg ID field length

Post by weilai_irl »

We have seen an issue occasionally when processing certain emails failed. The email will be added multiple times as new tickets/notes, but will not be deleted/archived. As a result, all future emails will not be processed, unless the one with the issue gets moved out of inbox manually.

After some investigation, we noticed that the issue is with the length of the msg_id field in the mantis_plugin_EmailReporting_msgids_table table. The exact error we have seen is:

Code: Select all

Message: Reporter: 1000 - --> Issue ID: #99999

APPLICATION ERROR #401: Database query failed. Error received from database was #1406: Data too long for column 'msg_id' at row 1 for the query: INSERT INTO mantis_plugin_EmailReporting_msgids_table( issue_id, msg_id ) VALUES (?, ?).
2021-01-01 01:00 GMT MAIL_VERBOSE email_api.php:2377 email_shutdown_function() Shutdown function called for /var/www/
This was resolved after the length of the msg_id field was increased from 255 to a higher value in the database.

The msg_id of the email in question was actually over 300 chars, it's something like:

According to, the msg ID of an email can be as long as 955 chars. Maybe this is something that can be fixed in the plugin?

Posts: 729
Joined: 06 Jul 2011, 14:17

Re: email processing stuck because of msg ID field length

Post by SL-Gundam »

I take it you are running 0.10.1?
This was fixed in 0.11.0-DEV here: ... 5bb7939d35

We choose to ignore anything longer then 255 chars per message id.

Please update to the latest DEV version
Post Reply