Skip to content

Commit

Permalink
submission: Truly enforce a configurable message size limit (default …
Browse files Browse the repository at this point in the history
…40 MB).

Before, it was only checking a provided SIZE parameter to the MAIL command and
not the size of the actually submitted message.
  • Loading branch information
stephanbosch authored and cmouse committed May 12, 2018
1 parent e14d34f commit b022cf8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/submission/submission-client.c
Expand Up @@ -207,6 +207,7 @@ struct client *client_create(int fd_in, int fd_out,
smtp_set.login_greeting = set->login_greeting;
smtp_set.max_recipients = set->submission_max_recipients;
smtp_set.max_client_idle_time_msecs = CLIENT_IDLE_TIMEOUT_MSECS;
smtp_set.max_message_size = set->submission_max_mail_size;
smtp_set.debug = user->mail_debug;

if ((workarounds & WORKAROUND_WHITESPACE_BEFORE_PATH) != 0) {
Expand Down
2 changes: 1 addition & 1 deletion src/submission/submission-settings.c
Expand Up @@ -100,7 +100,7 @@ static const struct submission_settings submission_default_settings = {
.login_greeting = PACKAGE_NAME" ready.",
.login_trusted_networks = "",

.submission_max_mail_size = 0,
.submission_max_mail_size = 40*1024*1024,
.submission_max_recipients = 0,
.submission_client_workarounds = "",
.submission_logout_format = "in=%i out=%o",
Expand Down

0 comments on commit b022cf8

Please sign in to comment.