All email providers have limits to how large attachments can be, but they can often be non-whole numbers that can seem arbitrary. An engineer, though, has explained why this is the case.
“How did they come up with that number,” X user @uncle_deluge had posted, while sharing a Gmail notification saying that the file the user was attaching had a 26.2 MB attachment limit.
The post garnered over 700 reposts, indicating that lots of people had the same question. At this point, X user @rabcyr_alt chimed in. “Email systems engineer here,” they said. “Many systems put a 30 MB limit on individual emails, and you need to leave a buffer for the body and headers of an email,” he explained.
“(But people say) “that’s a 3.8 MB buffer! a typical html email is only like 50 KB!!””, they continued. “True, but many (older) systems cannot handle binary data in emails, so it is converted into 7-bit ASCII. this makes a 26.2 MB binary file 29.94 MB,” they added.
Understanding these seemingly odd limits requires a peek under the hood of how email works. Every email isn’t just the message you type and the files you attach; it also includes “headers.” Think of email headers like the addressing information on a physical letter – they contain crucial details such as the sender’s address, recipient’s address, subject line, date, and a record of all the servers the email passed through on its journey. These headers, though invisible to the average user, take up space, contributing to the overall email size. Moreover, email systems need a small “buffer” or overhead capacity to ensure smooth processing and to handle any unforeseen data fluctuations during transmission.
The real game-changer, and the reason for those peculiar non-whole numbers, lies in how non-textual data, like your images, documents, or videos, is handled. Email systems were originally designed to transfer plain text (7-bit ASCII) characters. Binary files, which make up most attachments today, aren’t directly compatible with this older system. To overcome this, a process called MIME (Multipurpose Internet Mail Extensions) encoding converts these binary files into a text-based format that email servers can understand. This conversion, however, isn’t lossless in terms of size; it typically increases the file’s size by about 30-40%. So, a 26.2 MB binary file, once MIME-encoded, actually becomes closer to 30 MB for transmission. This behind-the-scenes magic ensures your attachments arrive intact, but it also explains why your email provider might cap attachments at a seemingly arbitrary 26.2 MB when the actual transmission limit is a rounder 30 MB. It’s a testament to the ingenious, if sometimes arcane, engineering that underpins our everyday digital communications.