piler-smtp changelog#
All notable changes to piler-smtp, the SMTP receiver of Piler Enterprise Edition, starting from 1.1.2. piler-smtp is versioned and released independently of the main application, see the Piler Enterprise changelog.
Packages (deb, rpm) and Docker images (sutoj/piler-smtp) are on the
releases page.
1.1.10 - 2026-11-17#
Changed#
smtp_access_listis on by default. The defaultpiler.confand the Docker image setsmtp_access_list=1: only the clients listed in/etc/piler/smtp.aclmay connect, and until that file has apermitrule every connection is refused. New installs need ansmtp.acl: copysmtp.acl.disttosmtp.acland list your mail servers. With the Docker image, mount it at/etc/piler/smtp.acl. Existingpiler.conffiles are not changed, but apiler.confwithout thesmtp_access_listkey now means 1 too. Such a server refuses every connection untilsmtp.aclexists. The ACL checks IPv4 addresses only: a client connecting over native IPv6 is refused, and no rule can permit it. IPv4 clients are checked as usual, also when the server listens on::. If IPv6 clients have to connect, setsmtp_access_list=0and protect the port another way.smtp_max_connections_per_ipdefaults to 100, also when the key is missing frompiler.conf.max_connectionsis enforced, it was ignored before. The total number of connections is limited to it (1 to 1024, default 1024); beyond it a client gets 451. A value outside that range is refused at startup.BDATgets502unlessenable_chunking=1, also when a client sends it without the CHUNKING extension. The connection is closed after the502, because the chunk data that follows is not processed as commands.- An empty message (DATA with just the dot, or
BDAT 0 LAST) gets554and is not archived. It used to be stored as a zero-byte file. - A DATA message is limited to
max_message_sizeexactly. It used to be accepted up to about 2 MB more. - A startup error exits with status 1 (it used to exit with 0), so systemd
(
Restart=on-failure) restarts the service. - A negative
epoll_timeout_msis refused at startup. - Log lines escape every byte that is not printable ASCII, so client data
(e.g. an escape sequence in
MAIL FROM) can't break the JSON. Non-ASCII addresses appear as\u00XXescapes in the logs. - A reload (SIGHUP) with an unreadable
smtp.aclkeeps the rules in use.
Added#
smtp_max_session_time(seconds, default 0 = no limit): a connection that lasts longer than this, however busy the client is, gets421and is closed. A client that didn't get250for its last email retries it.- The tenant probes (
Invalid tenant) are logged with the client address.
Security#
- The memory limit
max_smtp_memoryalso covers the DATA buffer and the session's read buffer, not only BDAT. A client can't use up the memory of the process by sending a large message. - The idle timeout (
smtp_timeout) counts from the last complete line, not from the last byte. A client trickling an unfinished line is disconnected. - piler-smtp refuses to run as
root(username=rootor a user in grouproot), and clears the supplementary groups when it drops privileges. - Client-initiated TLS renegotiation is disabled.
- The licence file decoder checks the size of every decoded value.
- Linux binaries are built as PIE with RELRO and BIND_NOW.
- The systemd unit sets
LimitNOFILE=4096, and piler-smtp raises its own descriptor limit. When it runs out of descriptors, new connections are paused for a moment instead of spinning the event loop.
Fixed#
- A reply the socket doesn't take at once is queued and sent later, instead
of being dropped. A dropped
250made the sending server resend the email, which was then archived twice. A client that doesn't read its replies is disconnected once 64 KB of them are waiting. - The staging file of an email is never truncated, and the stored email
is never replaced by a new one of the same name (
link()instead ofrename(), random names from the kernel). - A recipient refused with
452(too many envelope recipients) no longer leaves its tenant on the transaction.
1.1.9 - 2026-11-07#
Security#
- A client that stops in the middle of the TLS handshake no longer blocks
the other connections.
smtp_greet_timeoutlimits how long the handshake may take. - Data sent in plain text after
STARTTLSis discarded, and nothing of the transaction beforeSTARTTLScarries over into the encrypted session, so an attacker on the network path can't add recipients to an email sent over TLS (CVE-2011-0411). - A failed TLS handshake of one client no longer disconnects other TLS sessions.
- In multi-tenant mode, the recipients of an abandoned transaction no longer get the email of the next transaction on the same connection.
- The data of a rejected message is never processed as SMTP commands.
- Large BDAT chunks announced by slow clients can no longer use up
max_smtp_memoryand lock out the other clients.
Fixed#
- An email that can't be handed over to the archive gets a temporary error (451), so the sending server retries it. It used to be accepted and lost.
- Every email is written to the disk before it's accepted, so a power loss right after the acceptance no longer loses it.
- A message sent in several BDAT chunks (with
enable_chunking=1) is archived in full; only its first chunk was stored. - A message rejected as too big with BDAT gets its error reply instead of a connection reset, so the sending server bounces it instead of retrying.
- Settings written as
key = value(with spaces) inpiler.confare applied; they were ignored, e.g.smtp_access_list = 1left the access list off. - An invalid setting (e.g. a value that's not a number, or an unknown
tls_min_version) is reported, and piler-smtp doesn't start. On a reload (SIGHUP) the previous config stays. - With
tls_enable=0no TLS certificate is needed. - A reload (SIGHUP) with a config that can't be read keeps the previous config instead of falling back to the defaults.
- After a crash piler-smtp exits, so systemd or Docker restarts it. It used to hang at 100% CPU.
1.1.8 - 2026-11-04#
Fixed#
- With
smtp_access_list=1, a missing or unreadablesmtp.acl, or one without a valid rule, is logged as an error saying that piler-smtp refuses every SMTP connection. The startup message said it accepts SMTP connections from everywhere, although every connection was refused.
1.1.7 - 2026-10-18#
Security#
- Improved verification of the licensed hostname.
Fixed#
- In multi-tenant mode, a recipient piler-smtp rejects gets a permanent error (550) instead of a temporary one, so the sending server doesn't keep retrying it.
1.1.6 - 2026-10-17#
Fixed#
- An archive address encoded again by the mail server is no longer recorded as an envelope recipient. This happens when the mail server's archiving rules also run for the archive copies they added (seen with Axigen Acceptance & Routing rules). The address is logged, and the email is still archived with its other recipients.
1.1.5 - 2026-10-13#
Fixed#
- The ownership of
/var/pilerset by the deb package's post-install script.
1.1.4 - 2026-10-07#
Added#
- Envelope files (
enable_envelope_sidecar, off by default): the envelope of each email is written to a.envfile next to it, with the envelope sender and the envelope recipients encoded in the archive address (<tenant>+<local part>=<domain>@<archive host>), so that Bcc recipients can be archived. See Envelope recipients. Needs Piler Enterprise 2.2.4 or later.
Security#
- Hardened the SMTP input handling: limits on lines without a line ending,
correct handling of BDAT chunks (with
enable_chunking=1), bare LF line endings and NUL bytes in the message.
1.1.3 - 2026-09-01#
Added#
- Packages for Ubuntu 26.04.
Fixed#
- A deadline for every connection that sending a byte now and then can't extend, and a limit on the connections from one IP address, so one client can no longer keep others from connecting.
- With
smtp_access_list=1, an empty or unreadable access list now rejects every client instead of allowing all of them. - Package dependencies.
1.1.2 - 2026-01-12#
Fixed#
- Session handling.
- arm64 deb package build.