[GH-ISSUE #205] SMTPAddressFailedException: 452 4.5.3 Too many recipients #135

Closed
opened 2026-03-15 12:47:29 +03:00 by kerem · 7 comments
Owner

Originally created by @peter-bielik-atos on GitHub (Nov 6, 2023).
Original GitHub issue: https://github.com/axllent/mailpit/issues/205

Hello.
First of all, thank you for your great tool.
Currently, we are migrating from MailHog to MailPit & during our tests, we have found out, that, when email contains more than 100 recipients, it reports back status code "452 4.5.3 Too many recipients" and sending operation fails.
Is there a way to configure total number of recipients (enviroment variable or cmd line switch)?

Many thanks. :)

Originally created by @peter-bielik-atos on GitHub (Nov 6, 2023). Original GitHub issue: https://github.com/axllent/mailpit/issues/205 Hello. First of all, thank you for your great tool. Currently, we are migrating from MailHog to MailPit & during our tests, we have found out, that, when email contains more than 100 recipients, it reports back status code "452 4.5.3 Too many recipients" and sending operation fails. Is there a way to configure total number of recipients (enviroment variable or cmd line switch)? Many thanks. :)
kerem 2026-03-15 12:47:29 +03:00
  • closed this issue
  • added the
    stale
    label
Author
Owner

@axllent commented on GitHub (Nov 6, 2023):

You're welcome @peter-bielik-atos! Unfortunately this 100 recipient limit is imposed (hardcoded) in the SMTPD package Mailpit uses (see here) - probably due to the fact that RFC 5321 states that an SMTPD server must handle at the very least a maximum of 100 recipients (you'll need to search for that and read a lot of documentation of RFC 5321 to verify). Many mailservers do in fact impose a maximum of 100 recipients including Gmail, so this is probably a safe limit for testing purposes.

In order to make this configurable in Mailpit, either mhale/smtpd needs to make this configurable (preferable), or I have to bundle a modified version of it into Mailpit (I'd really prefer to avoid this).

How many recipients are you actually trying to send with?

<!-- gh-comment-id:1796126330 --> @axllent commented on GitHub (Nov 6, 2023): You're welcome @peter-bielik-atos! Unfortunately this 100 recipient limit is imposed (hardcoded) in the SMTPD package Mailpit uses ([see here](https://github.com/mhale/smtpd/blob/master/smtpd.go#L428-L430)) - probably due to the fact that RFC 5321 states that an SMTPD server must handle at the very least a maximum of 100 recipients (you'll need to search for that and read a lot of documentation of RFC 5321 to verify). Many mailservers do in fact impose a maximum of 100 recipients including Gmail, so this is probably a safe limit for testing purposes. In order to make this configurable in Mailpit, either mhale/smtpd needs to make this configurable (preferable), or I have to bundle a modified version of it into Mailpit (I'd really prefer to avoid this). How many recipients are you actually trying to send with?
Author
Owner

@peter-bielik-atos commented on GitHub (Nov 7, 2023):

Hello.
It depends on the testcase, could be up to 400-500 recipients...
Anyway, thank you for the clarification, we will try to solve this other way at our side...
Please, add this info regarding limit to the documentation.
Thank you.

<!-- gh-comment-id:1798656457 --> @peter-bielik-atos commented on GitHub (Nov 7, 2023): Hello. It depends on the testcase, could be up to 400-500 recipients... Anyway, thank you for the clarification, we will try to solve this other way at our side... Please, add this info regarding limit to the documentation. Thank you.
Author
Owner

@axllent commented on GitHub (Nov 7, 2023):

Thanks for the tip. I have added this now to the documentation in the meantime. I do understand that having this configurable, so I have opened a ticket to see if the module maintainer is open to this.

<!-- gh-comment-id:1798789555 --> @axllent commented on GitHub (Nov 7, 2023): Thanks for the tip. I have added this now to [the documentation](https://mailpit.axllent.org/docs/configuration/troubleshooting/#452-453-too-many-recipients) in the meantime. I do understand that having this configurable, so I have opened [a ticket](https://github.com/mhale/smtpd/issues/39) to see if the module maintainer is open to this.
Author
Owner

@peter-bielik-atos commented on GitHub (Nov 13, 2023):

You are great!
Thank you very much for the smtpd ticket... :)

<!-- gh-comment-id:1807810148 --> @peter-bielik-atos commented on GitHub (Nov 13, 2023): You are great! Thank you very much for the smtpd ticket... :)
Author
Owner

@github-actions[bot] commented on GitHub (Nov 28, 2023):

This issue is stale because it has been open for 14 days with no activity.

<!-- gh-comment-id:1828946172 --> @github-actions[bot] commented on GitHub (Nov 28, 2023): This issue is stale because it has been open for 14 days with no activity.
Author
Owner

@github-actions[bot] commented on GitHub (Dec 5, 2023):

This issue was closed because it has been inactive for 7 days since being marked as stale.

<!-- gh-comment-id:1839877792 --> @github-actions[bot] commented on GitHub (Dec 5, 2023): This issue was closed because it has been inactive for 7 days since being marked as stale.
Author
Owner

@axllent commented on GitHub (Dec 11, 2023):

@peter-bielik-atos This is just a heads-up that mhale/smtpd has now added support as per my request to set the maximum recipients (still default 100), so I have implemented this feature in Mailpit too (not yet released). I expect to release a new version of Mailpit later this week.

<!-- gh-comment-id:1849299483 --> @axllent commented on GitHub (Dec 11, 2023): @peter-bielik-atos This is just a heads-up that `mhale/smtpd` has now added support as per my request to set the maximum recipients (still default 100), so I have implemented this feature in Mailpit too (not yet released). I expect to release a new version of Mailpit later this week.
Sign in to join this conversation.
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/mailpit#135
No description provided.