Skip to content

Conversation

@charliemirabile
Copy link
Contributor

fixes #246

Cause hard error preventing delivery of email that exceeds a preset limit.
We can hook into the existing code that runs each time data is appended to
the in progress mail item to enforce the limit and raise an error if it is
exceeded. The limit defaults to 64k, but a provision to change it could be
added to the makefile trivially, similar to the way that we can adjust the
server hostname.
@theyoyojo
Copy link
Contributor

tested by making a patch with a file generated with dd bs=1024 count=64 </dev/urandom >myfile and sending it to master and this branch. Master accepts it. This branch rejects. Approved

@theyoyojo theyoyojo merged commit b39a1c5 into master Mar 17, 2025
1 check passed
@theyoyojo theyoyojo deleted the mail_limit branch March 17, 2025 22:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SMTP: reject large emails

3 participants