📜 ⬆️ ⬇️

The truth about the mail archive of the operative client M2

Those who use the M2 email client, built into Opera's browser, have noticed that with the advent of the Opera-9.x version, the storage format for email messages has changed dramatically. Now, instead of one MBOX file that stores the contents of a large number of messages at once, individual folders are used for each year, month, day, and, of course, for each account. Moreover, even for each letter, a separate file format mbs. This explains the fact that when installing a new version of the browser, the mailer converts the entire mail database and thus excludes a return to the previous form (and, as a result, to the previous version of the browser). What's the matter? Ignorant people might think that Norwegian programmers simply “break” established traditions for the sake of their own whims and come up with new ways to annoy annoying users. In fact, everything is exactly the opposite.

But first, plunge into theory. At the moment there are two ways to store mail databases: traditional MBOX and more modern MAILDIR. The first allows you to store multiple messages in one file and has the following qualities:
pros
- a format widely supported by many email clients;
- the ability to quickly add a new message to an existing file;
- quick search in the text of messages inside one mbox-file;
Minuses
- problems often arise when closing a file;
- its use with network file systems is difficult;
- The format is subject to frequent violation of the integrity of stored information;

Now let's see what the second option offers us:
pros
- placement, search and deletion of individual messages is faster;
- minimum problems with closing the file;
- easily used with network file systems;
- practically not susceptible to the violation of the integrity of stored information (without taking into account hardware problems - any tricks are powerless here);
Minuses
- some file systems do not work well with sets of small-sized files;
- search, which requires viewing the entire mail database, is slower;

As you understand, at the moment the Norwegians have chosen the second option. But it still remains unclear why. After all, at first glance, and the one and the other formats in equal weight categories. For a deeper understanding of the issue, you can refer to the results of tests conducted with that and another option for storing mail archives. And the results say that when using outdated or low-power hardware, the MBOX format shows better results than the rival, but on more modern computers the situation changes radically: the MAILDIR mail data storage format is faster, and the better the hardware is, the more tangible difference. And finally, the last argument: in any case, the format of MAILDIR requires half the RAM, than MBOX.
')
It also makes sense to clarify that opera developers made an attempt to minimize the negative properties of the MAILDIR format. In particular, to reduce the load on file systems that do not like a lot of small-sized files that are collected in one place, new folders are created for each day, which allows you to disperse a mass of daily incoming letters. The problem was also solved with a slow search throughout the entire mail database - to speed up this procedure, constant indexing of email messages is used, so if you need to find something among thousands of letters, the email client does not need to shovel all the folders - according to the index data, he immediately knows where and what look for.

As a summary, we can say that Opera Software is faithful to its traditions and constantly keeps up with the times, while always looking halfway to the front - this explains the change in the storage format of mail archives. And, of course, clearly shows the desire of developers to maximize the use of computer memory - this plus even in solitude already causes respect for programmers of Opera Software.

The article used materials:
Mbox vs Maildir: Mail Storage Formats
Benchmarking mbox versus maildir

News source

Update

"Another new format is good for antiviruses - now they can simply delete the file with a bad email."
sprite

“In fact, there is one more (IMHO, the most important) reason - indexation and search in the mail database by third-party programs. For example, a search engine embedded in whist can now index and find your letters in opera archives. ”
shergin

Source: https://habr.com/ru/post/28774/


All Articles