text compression in postfix

Prove that it is the network that is your bottleneck.

300KB messages over gigabit ethernet have a theoretical transfer time of about 2.5ms each; this indicates that you could send hundreds of them per second between the source and postfix.

However, postfix also has to store these messages in an on-disk queue, which is far slower - storing 100*300KB messages on disk (~30MB) would probably take up to a second or more, several times slower than the network transit time.

Gather accurate data first, then complain that something is a bottleneck.


My preference would be to compress emails BEFORE they reach postfix with PHP:Zlib for example. After all an SMTP server handles email/SMTP traffic not compression/decompression.