# Smarter message size limit

**URL:** <https://forum.delta.chat/t/smarter-message-size-limit/1802>\
**Category:** Feature Proposal\
**Created:** [August 11, 2021, 1:18pm UTC](https://forum.delta.chat/t/smarter-message-size-limit/1802 "2021-08-11T13:18:19Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![d0989348](https://forum.delta.chat/user_avatar/forum.delta.chat/d0989348/32/1239_2.png) [@d0989348](https://forum.delta.chat/u/d0989348)\
**Post date:** [August 11, 2021, 1:18pm UTC](https://forum.delta.chat/t/smarter-message-size-limit/1802/1 "2021-08-11T13:18:19Z")

</div>

Currently Delta Chat does not send messages which are larger than the recommeded message size (it’s 18 MB for me). I see this is because many email provider does not accept large attachments. I’d be really happy if somehow it supports large attachments. My email provider does not limit message size.

The ideal would be to detect the limit, but sadly mailserver softwares does not disclose it beforehand, just when you already uploaded a message to large.

An other workaround is to send multiple emails constituting a single large piece of message, altough it won’t be compatible with common email practices.

Thirdly, the user may set the limit as an app setting, but this is a bit annoying because 1 limit does not fit to all email providers, and setting this limit per each domain, per each contact is quite tiresome.

The best approach maybe is to keep not sending large messages but let users approve to sent them regardless: eg. by a “Send it anyway” button.

thanks for consideration.  
Andreas.

---

<div class="post-metadata">

**Author:** ![Andreas](https://forum.delta.chat/user_avatar/forum.delta.chat/andreas/32/2393_2.png) [@Andreas](https://forum.delta.chat/u/Andreas)\
**Post date:** [August 14, 2021, 10:44am UTC](https://forum.delta.chat/t/smarter-message-size-limit/1802/2 "2021-08-14T10:44:04Z")

</div>

I don’t know if this information could be inserted in the provider database, taking into account that some information the providers don’t even provide.  
If it were possible, I think that the maximum size of the attachments that can be sent could be inserted in the header and consequently DC could vary the size of the attachment. 🤔

---

<div class="post-metadata">

**Author:** ![d0989348](https://forum.delta.chat/user_avatar/forum.delta.chat/d0989348/32/1239_2.png) [@d0989348](https://forum.delta.chat/u/d0989348)\
**Post date:** [August 14, 2021, 5:42pm UTC](https://forum.delta.chat/t/smarter-message-size-limit/1802/3 "2021-08-14T17:42:37Z")

</div>

> [@Andreas](#):
>
> inserted in the header

hmm, hardly… which header? incoming and outgoing SMTP servers are often separated. an outgoing server can meaningfully insert such a header to indicate max message size to the outer world, but it’s the incoming server’s responsibility to manage this size limit. ok, they can be properly coordinated, but still, a past email from domain X is quite far removed from the workflow of sending email to domain X.

IMO it either should be indicated in the receiving SMTP server’s EHLO reply (besides other SMTP capabilities), or, in the worse case, in autoconfig xml (autoconfig xml is about setting up a MUA, so it only helps if you submit email directly to this SMTP server, not in generic server-to-server transaction).

…and it’d be a protocol extension which is difficult to introduce widely.

---

<div class="post-metadata">

**Author:** ![link2xt](https://forum.delta.chat/user_avatar/forum.delta.chat/link2xt/32/1971_2.png) [@link2xt](https://forum.delta.chat/u/link2xt)\
**Post date:** [August 14, 2021, 6:17pm UTC](https://forum.delta.chat/t/smarter-message-size-limit/1802/4 "2021-08-14T18:17:15Z")

</div>

> [@d0989348](#):
>
> An other workaround is to send multiple emails constituting a single large piece of message, altough it won’t be compatible with common email practices.

I think fragmenting the message is the best solution. It is probably not widely supported, but at least there is a standard which Delta Chat can implement to avoid reinventing the wheel:

> [@Newbie questions](https://support.delta.chat/t/newbie-questions/1503/5):
>
> There is a support for fragmentation in MIME format, but it is not implemented: [RFC 2046 - Multipurpose Internet Mail Extensions (MIME) Part Two: Media Types](https://tools.ietf.org/html/rfc2046#section-5.2.2) The idea is simple, split the message into numbered fragments, collect them in a separate database table, and once the message can be reassembled, process it as a whole. This could be a separate feature request.

---

<div class="post-metadata">

**Author:** ![d0989348](https://forum.delta.chat/user_avatar/forum.delta.chat/d0989348/32/1239_2.png) [@d0989348](https://forum.delta.chat/u/d0989348)\
**Post date:** [August 14, 2021, 6:20pm UTC](https://forum.delta.chat/t/smarter-message-size-limit/1802/5 "2021-08-14T18:20:52Z")

</div>

it’s great that there is an rfc for it! i can not wait to implement it in my home-made MUA 🙂

---

<div class="post-metadata">

**Author:** ![anon36435246](https://forum.delta.chat/letter_avatar_proxy/v4/letter/a/9dc877/32.png) [@anon36435246](https://forum.delta.chat/u/anon36435246)\
**Post date:** [October 9, 2022, 3:40am UTC](https://forum.delta.chat/t/smarter-message-size-limit/1802/6 "2022-10-09T03:40:41Z")

</div>

Hello people.

##### case 1: smarter message size limit with js

```javascript
var str = 'Some very long string';
if(str.length > 10) str = str.substring(0,10); // limit in 10 characters

```

##### case 2: limit 255 characters with js

```javascript
var str = 'Some very long string';
if(str.length > 255) str = str.substring(0,255); // limit in 255 characters

// or

var str2 = 'Some very long string';
if(str2.length > 1500) str = str.substring(1500); // limit in 1.500 characters

```

**code-description** It would be nice to limit the amount of text string - eg twitter limits it to 255 characters… we can do something similar to avoid large messages. Discord(app) limits… is 1500 characters.

#### or with html

- `<input maxlength="255">`
- `<input maxlength="1500">`

#### case 3: see how many messages the user has written

Another example would be… an example of a message limit… would be… gmail… gmail allows up to 350 messages per day. If you exceed 350 messages per day, you will be… blocked.

**Note:** As we can see in this use case… we have 2 limits… the amount of daily messages and the text size limit.

---

<div class="post-metadata">

**Author:** ![link2xt](https://forum.delta.chat/user_avatar/forum.delta.chat/link2xt/32/1971_2.png) [@link2xt](https://forum.delta.chat/u/link2xt)\
**Post date:** [October 9, 2022, 1:39pm UTC](https://forum.delta.chat/t/smarter-message-size-limit/1802/7 "2022-10-09T13:39:45Z")

</div>

This will not prevent others from using another email client and sending you a large message anyway.

If you look at fediverse (Mastodon, Pleroma etc.) instead of Twitter, there are servers which enforce sending limit, but users from other servers can still send you a whole blog post in a single message.

Besides that, the problem discussed in OP is not about text messages, but about attachments which are megabytes (millions of characters) in size.

---

<div class="post-metadata">

**Author:** ![anon36435246](https://forum.delta.chat/letter_avatar_proxy/v4/letter/a/9dc877/32.png) [@anon36435246](https://forum.delta.chat/u/anon36435246)\
**Post date:** [October 9, 2022, 4:59pm UTC](https://forum.delta.chat/t/smarter-message-size-limit/1802/8 "2022-10-09T16:59:39Z")

</div>

Hi link2xt.

> [@link2xt](#):
>
> This will not prevent others from using another email client and sending you a large message anyway.

This is not true… maybe… for this reason: - _If you want to reduce the size of the email message, consider the 4 alternatives: temporary file service, temporary messaging service, limit the amount of characters in the message, limit the amount of messages in the message group_

##### list of things to avoid large messages

1. temporary file service: some temporary file services limit the amount to 2g as file-io/web-transfer etc or 100mb or 10mb as tempmail etc.
2. temporary messaging service: some temporary messaging services limit the amount of sending messages to 10 messages per day, 100 messages daily as tempmail, temporary-email etc.
3. limit the amount of characters in the message: 255 characters(twitter), 1.500 characters(Discord) etc.
4. limit the amount of messages in the message group: you could check in a group of messages the total amount allowed, for example - gmail allows up to 350 contacts up to 350 messages.

_as we can see, there are 4 ways to avoid large messages_

> [@link2xt](#):
>
> Besides that, the problem discussed in OP is not about text messages, but about attachments which are megabytes (millions of characters) in size.

But… temp files site has file size limit, file-io enforces 2gb file limit for upload. [file-io-temporary-storage-in-delta-chat](https://support.delta.chat/t/file-io-temporary-storage-in-delta-chat/2264) - this would be another way to avoid large files. (What I mean is that you would not send a file to the email, but only the temporary download link to be downloaded on your mobile.)

- So… another way would be to… you can also limit the amount of file according to the space stored - I say in the download part.
- So… another way would be to have an delta-chat-api service to check the file size before uploading.
- So… another way… would be… protocols like ipfs, ftp, sftp etc can be used with some file limit. you could set the acceptable amount of file to transfer a file in ipfs/ftp/sftp for example.

_As we can see, we have other ways to avoid a large file, either through the use of the delta-chat-api service, or through third-party services that have an acceptable limit on the amount of file or some network protocol that limits the amount of file to be sent._

> [@link2xt](#):
>
> I think fragmenting the message is the best solution. It is probably not widely supported, but at least there is a standard which Delta Chat can implement to avoid reinventing the wheel:

this idea is interesting, fragmenting the messages… would be possible if these messages are binary.

---

<div class="post-metadata">

**Author:** ![link2xt](https://forum.delta.chat/user_avatar/forum.delta.chat/link2xt/32/1971_2.png) [@link2xt](https://forum.delta.chat/u/link2xt)\
**Post date:** [March 30, 2023, 7:53pm UTC](https://forum.delta.chat/t/smarter-message-size-limit/1802/9 "2023-03-30T19:53:39Z")

</div>

The next version past 1.36 releases is going to have no limitation other than the provider’s one. You can already test it on the next nightly versions.

> <https://github.com/deltachat/deltachat-core-rust/pull/4253>
>
> Recommended file size is used for recoding media.
> For the upper size, we rely o…n the provider to tell us back if the message cannot be delivered to some recipients. This allows to send large files, such as APKs,
> when using providers that don't have such strict limits.

---

<div class="post-metadata">

**Author:** ![r10s](https://forum.delta.chat/user_avatar/forum.delta.chat/r10s/32/1513_2.png) [@r10s](https://forum.delta.chat/u/r10s)\
**Post date:** [October 6, 2026, 3:11pm UTC](https://forum.delta.chat/t/smarter-message-size-limit/1802/10 "2026-10-06T15:11:42Z")

</div>


