Sep 112009

Source: The Book of Postfix by Ralf Hildebrandt and Patrick Koetter.

In order to measure how much traffic our postfix  can handle, we need to perform some kind of stress testing. To put an adequate load on the server, We need a fast mail traffic generator. Postfix comes with two  programs named smtp-source and smtp-sink for this purpose. Here’s how they work:


This program connects to a host on a TCP port (port 25 by default) and sends one or more messages, either sequentially or in parallel. The program speaks both SMTP (default) or LMTP and is meant to aid in measuring server performance.


This test server listens on the named host (or address) and port. It recieves messages from the network and throws them away. You can measure client and network performance with this program.

The following example injects 100 total messages of size 5k each in 20 parallel sessions to a Postfix server running on localhost port 25. Because you’re also interested in how much time this takes, use the time command:

Continue reading »