[GH-ISSUE #277] failed delivery code column too long causing SQL error #238

Closed
opened 2026-03-01 17:45:56 +03:00 by kerem · 5 comments
Owner

Originally created by @makua104 on GitHub (Mar 14, 2022).
Original GitHub issue: https://github.com/anonaddy/anonaddy/issues/277

This happened in a self-hosted v10.1 instance when trying to send to a google workspace address' alias.

I sent an email to a google workspace address' alias bbbbb+aaaaa@xxxxxxxxx.xxxx.xx instead of aaaaa+bbbbb@xxxxxxxxx.xxxx.xx causing a failed delivery.

The beginning of the error in the AnonAddy storage logs looks like this

production.ERROR: SQLSTATE[xxxxx]: String data, right truncated: 1406 Data too long for column 'code' at row 1`
(SQL: insert into failed_deliveries (recipient_id, alias_id, bounce_type, remote_mta, sender, email_type, status, code, attempted_at, user_id, id, updated_at, created_at)
...

The contents of the code column were

smtp; 550-5.1.1 The email account that you tried to reach does     not exist. Please try 550-5.1.1 double-checking the recipient's email     address for typos or 550-5.1.1 		unnecessary spaces. Learn more at 550 5.1.1     https://support.google.com/mail/?p=NoSuchUser     xxx-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.xx - gsmtp
Originally created by @makua104 on GitHub (Mar 14, 2022). Original GitHub issue: https://github.com/anonaddy/anonaddy/issues/277 This happened in a self-hosted v10.1 instance when trying to send to a google workspace address' alias. I sent an email to a google workspace address' alias `bbbbb+aaaaa@xxxxxxxxx.xxxx.xx` instead of `aaaaa+bbbbb@xxxxxxxxx.xxxx.xx` causing a failed delivery. The beginning of the error in the AnonAddy storage logs looks like this ``` production.ERROR: SQLSTATE[xxxxx]: String data, right truncated: 1406 Data too long for column 'code' at row 1` (SQL: insert into failed_deliveries (recipient_id, alias_id, bounce_type, remote_mta, sender, email_type, status, code, attempted_at, user_id, id, updated_at, created_at) ... ``` The contents of the code column were ``` smtp; 550-5.1.1 The email account that you tried to reach does not exist. Please try 550-5.1.1 double-checking the recipient's email address for typos or 550-5.1.1 unnecessary spaces. Learn more at 550 5.1.1 https://support.google.com/mail/?p=NoSuchUser xxx-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.xx - gsmtp ```
kerem closed this issue 2026-03-01 17:45:56 +03:00
Author
Owner

@willbrowningme commented on GitHub (Mar 14, 2022):

The diagnostic code is already limited in ReceiveEmail.php - https://github.com/anonaddy/anonaddy/blob/master/app/Console/Commands/ReceiveEmail.php#L321

What version of MariaDB are you using and what charset?

<!-- gh-comment-id:1066593574 --> @willbrowningme commented on GitHub (Mar 14, 2022): The diagnostic code is already limited in `ReceiveEmail.php` - https://github.com/anonaddy/anonaddy/blob/master/app/Console/Commands/ReceiveEmail.php#L321 What version of MariaDB are you using and what charset?
Author
Owner

@makua104 commented on GitHub (Mar 14, 2022):

Oh that's strange.

  • Version from mariadb --version is 15.1
  • Output of select @@character_set_database; of the AnonAddy db is utf8mb4

Is that what you're looking for?

<!-- gh-comment-id:1066627255 --> @makua104 commented on GitHub (Mar 14, 2022): Oh that's strange. - Version from `mariadb --version` is `15.1` - Output of `select @@character_set_database;` of the AnonAddy db is `utf8mb4` Is that what you're looking for?
Author
Owner

@willbrowningme commented on GitHub (Mar 14, 2022):

Is the distribution output from that command Distrib 10.5.15-MariaDB?

<!-- gh-comment-id:1066629742 --> @willbrowningme commented on GitHub (Mar 14, 2022): Is the distribution output from that command `Distrib 10.5.15-MariaDB`?
Author
Owner

@makua104 commented on GitHub (Mar 14, 2022):

Yes

<!-- gh-comment-id:1066642192 --> @makua104 commented on GitHub (Mar 14, 2022): Yes
Author
Owner

@willbrowningme commented on GitHub (Mar 14, 2022):

I've just pushed a new release that should fix this - https://github.com/anonaddy/anonaddy/releases/tag/v0.11.1

<!-- gh-comment-id:1066665432 --> @willbrowningme commented on GitHub (Mar 14, 2022): I've just pushed a new release that should fix this - https://github.com/anonaddy/anonaddy/releases/tag/v0.11.1
Sign in to join this conversation.
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/anonaddy#238
No description provided.