Skip to content

Replica: Add support for configurable dequeue size#20

Merged
lucaforni merged 1 commit intomain-modalsourcefrom
schueffi-postal-add_configurable_batch_size
Nov 24, 2025
Merged

Replica: Add support for configurable dequeue size#20
lucaforni merged 1 commit intomain-modalsourcefrom
schueffi-postal-add_configurable_batch_size

Conversation

@lucaforni
Copy link

Questa PR replica la PR originale: postalserver#3031

Autore originale: @schueffi
Branch originale: add_configurable_batch_size
Repository originale: schueffi/postal


When sending messages to remote MTAs, the messages get dequeued in batches from the local queue. As the batch-key is the given remote MX server, those messages will be delivered to this remote MTA in one SMTP session. Although this is good for performance (to reuse the same SMTP session for many mails), many of the real-world MTAs do not like sending too much mails at once in one single session.

Example error messages are similar to "421 too many messages in this connection"

Therefore, we make the limit adjustable (with the default value of 100 to be backwards compatible). From our experiences with the last 5 million emails sent, having a batch size of 10 works almost ever, and 50 seems to be the upper "real world" limit before hitting those rate limits by the remote MTAs.

When sending messages to remote MTAs, the messages get dequeued in batches
from the local queue. As the batch-key is the given remote MX server, those
messages will be delivered to this remote MTA in one SMTP session.
Although this is good for performance (to reuse the same SMTP session for
many mails), many of the real-world MTAs do not like sending too much mails
at once in one single session.

Example error messages are similar to "421 too many messages in this connection"

Therefore, we make the limit adjustable (with the default value of 100 to be
backwards compatible). From our experiences with the last 5 million emails
sent, having a batch size of 10 works almost ever, and 50 seems to be the upper
"real world" limit before hitting those rate limits by the remote MTAs.
@github-actions
Copy link

github-actions bot commented Sep 2, 2025

This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 10 days.

@github-actions github-actions bot added the stale label Sep 2, 2025
@github-actions
Copy link

github-actions bot commented Nov 7, 2025

This PR was closed because it has been stalled for 10 days with no activity.

@github-actions github-actions bot closed this Nov 7, 2025
@lucaforni lucaforni reopened this Nov 24, 2025
@lucaforni lucaforni merged commit 05a329f into main-modalsource Nov 24, 2025
13 of 15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants