1
SMTP In set to 20 MB but rsp sent to sending server says 26 MB
Question asked by John Quest - 8/20/2024 at 11:35 AM
Answered
I have the Protocols SMTP In Max message size set to 20 MB. However, it seems that Smartermail on the EHLO response to the sending server is saying 26 MB is allowed, but then subsequently enforces the 20 MB max size.

NOTE: This is for a gateway configuration, not a domain hosted by Smartermail.

Has anyone seen this and can explain this?

4 Replies

Reply to Thread
0
Matt Petty Replied
Employee Post Marked As Answer
We add a little extra to the size in some spots since emails when they are encoded tend to use a bit more size then what you'd expect.
Base64 encoding can increase the data size by roughly 20-30%, we perform this formula to calculate the extra size, (bytesIn * 4) / 3

There does appear to be some mis-alignment in this behavior in this area. I'll add a task to correct it, haven't looked at the code yet but there is a chance the text in this response is just wrong, but the actual logic is still correct.
Matt Petty Senior Software Developer SmarterTools Inc. www.smartertools.com
0
John Quest Replied
Yes please review it.

The problem is that the announced size needs to be correct so that the sending server will properly identify that the email will be rejected and therefore notify the sender of the issue correctly. In this case, instead of clearly sending an NDR to the sender saying it is too large, the sending server sent an NDR to the sender saying "suspects your message is spam and rejected it" as Smartermail ended the session by sending a 552 but the sending server (a cuda) reported it as a 550 to the sender.
0
Jay Dubb Replied
Based on the formula cited by Matt, it appears that your server IS limiting to 20 MB, before the allowance for encoding bloat.  My calculator says your setting is 20,480 MB currently, based on your screenshot.
 
 
0
Andrew Barker Replied
Employee Post
I just finished reviewing our SMTP code, and we are using the adjusted value for the comparison. The error message uses the raw value because rejection messages are often displayed to a user in some way, either by being included in a DSN bounce message or being shown by a client like Thunderbird.

This behavior is consistent with other protocols and webmail where we use the adjusted limit when checking the size of the message, but use the raw limit in messages that might be displayed to a user.
Andrew Barker Software Developer SmarterTools Inc. www.smartertools.com

Reply to Thread