Postfix stress test
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:
smtp-source
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.
smtp-sink
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:
Sujud Tilawah / Sujud Sajdah
Apache stress test
Postfix Debugger
Extended SMTP
Extended SMTP
Extended SMTP (ESMTP), sometimes referred to as Enhanced SMTP,is a definition of protocol extensions to the Simple Mail Transfer Protocol standard.
The extension format was defined in IETF publication RFC 1869 (1995) which established a general structure for all existing and future extensions.
ESMTP defines consistent and manageable means by which ESMTP clients and servers can be identified and servers can indicate supported extensions.
Extensions
The main identification feature is for ESMTP clients to open a transmission with the command EHLO (Extended HELLO), rather than HELO.
Some relatively common keywords (not all of them corresponding to commands) used today are:
The Difference Between HELO and EHLO
Memory
ECC Memory
ECC stands for Error Checking and Correction. ECC memory is widely used in workstation and server computers.
What Is ECC and How Does It Work?
As the name “Error Checking and Correction” suggests, ECC is technology that allows computers to correct memory errors. The most popular type of ECC used in memory modules is single bit error correction. This enables the detection and correction of single-bit errors (within a byte, or 8bits of data). It will also detect two-bit and some multiple bit errors, but is unable to correct them.
How dos ECC work? Take the most common single bit error correction for example. For each byte of data sent across the memory bus, a check-bit is generated by calculating that byte of data using an Exclusive OR algorithm. This check-bit will be stored in a separate memory chip. That is why memory modules with ECC capabilities sport 9 memory chips on each side, rather than the 8 chips per side we often see with non-ECC memory modules.
Postfix+DKIM email signatures in amavisd-new
DKIM is a system to verify the sender and integrity of emails.
A DKIM standard (RFC 4871) states the following, which applies to its predecessor DomainKeys (historical: RFC 4870) as well:
DomainKeys Identified Mail (DKIM) defines a mechanism by which email messages can be cryptographically signed, permitting a signing domain to claim responsibility for the introduction of a message into the mail stream. Message recipients can verify the signature by querying the signer’s domain directly to retrieve the appropriate public key, and thereby confirm that the message was attested to by a party in possession of the private key for the signing domain.
The DomainKeys specification was a primary source from which the DomainKeys Identified Mail [DKIM] specification has been derived. The purpose in submitting the RFC 4870 document is as an historical reference for deployed implementations written prior to the DKIM specification.
Implementation and mail flow
+------+
|verify| (verify)
+--+---+ | (by amavisd and/or SA)
^^^ milter |
incoming: ||| +---v-------+
MX ----> 25 smtpd ---> 10024 > >---> 10025 smtpd -->
|| | |
SASL --> 25 smtpd \ | amavisd | (notifications)
submission | +-> | >--->_
mynets-> 25 smtpd ---> 10026 >ORIGINATING>---> 10027 smtpd -->
submission +-> +-------^---+ |
--> 587 smtpd / : | v milter
(convert | +------+
to 7-bit) (sign) | sign |
+------+