Thanks for the links!

Although now I'm able to get results, I still fail to understand that formula :/

In Ralf example, the forumla:

n * (1 + max(expansionfactor)) * $message_size_limit

Would translate to something like:

5 * (1 + max(expansionfactor)) * 10MB

1. First thing I see here are units. In the formula no units are expressed so I must assume based on examples that MB is the unit for $message_size_limit.

2. I'm still riddle by "max(expansionfactor)".

3. Parenthesis here are use as in a proper math forumla so this would translate to something like: 1 + max * expansionfactor which also makes no much sense to me.

4. Ralf also mentions a "1:2" ratio...which has no clear mapping to this formula.

5. The total gives him 130MB but then he maps a disk of 150MB...is that overhead necessay? And if so, should it be part of the formula too?

On top of all of this, the end result just makes no sense to this formula...unless my math are plain wrong (which is likely the case). He speaks about 5*10MB (n * message_size_limit) and 5*8MB (n * message_size_limit binary size), then he comes up with a ratio that i assume is not fixed (otherwise it should be part of the formula) of 1:2 to multiply the result of 5*8MB...which later on he just adds to the initial 5*10MB. idk...as I said, I can come up with an alternate formula that will deliver the same result as in his example, but lord it has nothing to do with the initial presented formula. New formula based on his example would be like:

[(n * message_size_limit in MB) + ( n * message_size_limit in MB * binary_ratio * unpack_ratio)] + extra_room =

-> "n" comes from the value set for max_servers in /opt/zimbra/conf/amavisd.conf

-> "message_size_limit" is defined in the zimbra global configuration zimbraMtaMaxMessageSize and corresponds to the raw size of the mail

-> binary_ratio corresponds to the binary size of the mail and it can vary. This formula will consier a value of 4/5 of the mail size (mail_size * 0.8)

-> unpack_ratio seems to corresponds to (message_size_limit in MB * binary_ratio) * 2 but idk if this number is variable or is a fixed value

-> As we have 2 fixed ratios, I will just write it as a new_ratio of value 1.6 (0.8 * 2)

-> extra_room corresponds to the extra size provided in the Ralf example during fstab configuration, which is ~ a +20% of the total

Making use of the new formula, examples would look like this...which at least for me now make some sense:

[(n * message_size_limit in MB) + (n * message_size_limit in MB * new_ratio )] * 1.2 = value in MB that should be placed in fstab for the RAM disk

[(5 * 10MB) + (5 * 10MB * 1.6 )] * 1.2 =

( 50MB + 80MB ) * 1.2 =

130MB * 1.2 = 156MB

This result matches the example provided in

https://www.arschkrebs.de/postfix/amavisd_tmpfs.shtmlIf we change the values to the default values, as the example used in here (which also uses Ralf forumla), n would take a 10 instance value:

[(n * message_size_limit in MB) + (n * message_size_limit in MB * 0.8 * 2)] * 1.2 =

[( 10 * 10MB ) + (10 * 10MB * 1.6)] * 1.2 =

[( 100MB ) + ( 160MB )] * 1.2 =

260MB * 1.2 = 312MB

This will not match what is provided in the example, because they do not provide "overhead" in the fstab, in fact the example there looks like a copy/past from Ralf where the "150MB" value used in the Ralf webpage was not adapted to the 10MB value used in zimbra wiki example.

So for an installation with a size limit policy of 20MB email which should be configured with a value around 27MB, and the default number of max_servers instances configured (10). We would have something like this:

[(10 * 27MB) + (10 * 27MB * 1.6)] * 1.2 =

(270MB + 432MB) * 1.2 = 518MB to configure in the fstab

Anyways, just trying to make sense of all. Gosh...now I kind of want to buy this guy book