18.1  Message size limits

18.1.1  Setting limit for messages delivered via SMTP
18.1.2  Setting limit for messages sent by a particular user
18.1.3  Setting limit for messages sent from a domain
18.1.4  Size limit for Kerio WebMail

Various limits for message size which will be accepted by Kerio MailServer can be set. All in all, the server includes three limit types.

The first is a limit for SMTP server that applies to all messages delivered via SMTP. This rule applies to messages forwarded from other SMTP servers as well as to messages from SMTP clients (this implies that the limit applies also to too large messages sent from Kerio MailServer where sending through SMTP protocol is set).

Another type is a limit for sent messages. This limit can be either set for a particular user (such a user who overloads the line by sending too large messages) or for an entire domain. This limit type does not apply only to messages delivered to the server via SMTP protocol, but also to all outgoing messages (i.e. it applies also to WebDAV interface, etc.).

The third limit type applies to messages sent from the Kerio WebMail interface. The purpose of this limit is focused in section 18.1.4  Size limit for Kerio WebMail.

18.1.1  Setting limit for messages delivered via SMTP

To set size limit for email received by the SMTP server, go to the administration interface:

  1. Open the Configuration → SMTP server section.

  2. Go to the Security options tab.

  3. Check and set the Max. number of failed commands in SMTP session: option.

18.1.2  Setting limit for messages sent by a particular user

To set a limit for a particular user, use the Kerio MailServer's administration console:

  1. In Domain Settings → Users, open the dialog for change of user parameters.

  2. Switch to the Email tab.

  3. Check the Limit outgoing message size to option and set a size limit.

If the limit is set to 0, Kerio MailServer behaves the same way as if no limit was set.

18.1.3  Setting limit for messages sent from a domain

To set a limit for a particular domain, use the Kerio MailServer's administration console:

  1. In Configuration → Domains, open the domain selection dialog.

  2. Switch to the Email tab.

  3. Check the Limit outgoing message size to option and set a maximal size limit (in MB).

If the limit is set to 0, Kerio MailServer behaves the same way as if no limit was set.

18.1.4  Size limit for Kerio WebMail

Setting of maximum message size can be used for the following purposes:

  • to limit size of attachments sent to Kerio WebMail by an HTTP POST request,

  • to set maximum size of memory allocated in  Kerio MailServer to each HTTP POST request.

Warning

Maximal value of the limit is 128 MB. It is not possible to enter a greater value in the Kerio Administration Console.

For better understanding of the limit, here is an explanation of how a message written in Kerio WebMail is sent to Kerio MailServer. Each new message composed in the web interface is sent by a browser via HTTP protocol using an HTTP POST request to Kerio WebMail. The interface receives the message and processes it so that Kerio MailServer can send it to the addressee by SMTP protocol.

Each HTTP POST request contains one message including a message body, all headers and attachments. The limit set by this option narrows size of any HTTP POST request directed from the Kerio WebMail interface to Kerio MailServer. This means that any limit set for requests also limits size of email messages.

Size limit set for HTTP POST requests is applied to any files sent from Kerio WebMail to Kerio MailServer and it is applied to all Kerio MailServer users. The default value for maximum size of messages sent from Kerio WebMail is 20 MB. This limit should be generally satisfactory for these purposes.

The minimum value for the limit is 2 MB. If a lower limit is set, Kerio MailServer sets the value back to 2 MB automatically.

If a message includes any attachments, they are encrypted by the Base64 method. This type of encoding is able to increase the size of transmitted data even by one third (in case of binary data). This means that, for example, the minimum 2 MB limit might also allow just 1 — 1,5 MB attachments.

It is necessary that a memory allocation value is specified in Kerio MailServer for HTTP POST requests. The more bulky the request is the more memory must be allocated. This implies that the size of the allocated memory changes according to changes in the size limit.

Warning

Any time the limit is changed, it is necessary to restart Kerio MailServer since the memory allocation is changed as well.

Setting limit for Kerio WebMail

To set limit for email sent via Kerio WebMail, open the Kerio MailServer's administration interface:

  1. Open the  Configuration → Advanced Options section.

  2. Switch to the WebMail tab.

  3. Check the Maximum size of message that can be sent from the WebMail interface option and set a value for the limit.