Implements a per-destination worker pool,
so that connections to the same destination
are not parallelized, but instead queued.
If a queue is full, new messages are immediately
deferred, before mail data is sent from postfix.
Closes: #141
Signed-off-by: Jagoda Ślązak <jslazak@jslazak.com>
Implements a new mode "transport",
that allows filtermail to be used for
remote delivery.
In transport mode, filtermail listens for LMTP
connections, splits messages by domain
and performs delivery to remote MTAs over SMTP.
SMTP client tries to open socket on all resolved
addresses in parallel and uses one that succeeds
the first, fixing the issue described in:
chatmail/relay#900
Extends the built-in SMTP client
with STARTTLS support.
Extends the built-in SMTP server
with LMTP greeting support.
Groundwork required for mxdeliv endpoint
(HTTP channel for MTA-to-MTA communication):
chatmail/relay#900
Signed-off-by: Jagoda Ślązak <jslazak@jslazak.com>
BREAKING CHANGE: messages using domain-literal
addresses don't require to match the origin
SMTP connection IP anymore.
Signed-off-by: Jagoda Ślązak <jslazak@jslazak.com>
If the MAIL FROM doesn't match the From header,
we do not reject the mail, as this can be caused
by e.g. SRS forwarding. Instead, we reset the envelope
address, so it is reinjected as `MAIL FROM:<>`
to prevent sending a bounce message.
Closes#67
Signed-off-by: Jagoda Ślązak <jslazak@jslazak.com>
This way we won't be logging DKIM rejections on messages that
would be rejected anyway due to not being encrypted.
Fixes#69
Signed-off-by: Jagoda Ślązak <jslazak@jslazak.com>
If the incoming email comes from address that uses
domain literals `[<ipv4>]` or `[IPv6:<ipv6>]`,
skip DKIM verification and instead check IP
alignment with originating IP from XFORWARD
command.
Signed-off-by: Jagoda Ślązak <jslazak@jslazak.com>
* feat!: DKIM verifier
This implements a DKIM verification as well as a strict
DKIM signature alignment check with domain in `From`
header address.
Caches the retrieved RDATA using in-memory LRU.
BREAKING CHANGE: incoming messages now require DKIM signatures
aligned to domain of the `From` header address.
Signed-off-by: Jagoda Ślązak <jslazak@jslazak.com>
* chore(license): License binaries under GPLv3
Signed-off-by: Jagoda Ślązak <jslazak@jslazak.com>
---------
Signed-off-by: Jagoda Ślązak <jslazak@jslazak.com>