Commit Graph
5 Commits
Author SHA1 Message Date
dualfroz fd864f1379 feat: add --outgoing-ignore-tls to keep the relay off STARTTLS (#377)
The relay connection only had `secure`, so with `secure: false` nodemailer
still upgraded to STARTTLS whenever the server advertised it, and there was
no way to talk cleartext to such a server. Pass nodemailer's `ignoreTLS`
through as `ignoreTLS` on the relay config, wired to
--outgoing-ignore-tls / MAILDEV_OUTGOING_IGNORE_TLS / `outgoingIgnoreTls`.
2026-10-03 02:24:38 +02:00
upstream a9a83f64f1 Upstream maildev/maildev state of the touched files before f000b5e316 2026-10-03 02:24:38 +02:00
dualfroz 53640c6990 fix(smtp): reject the relay when the outgoing server cannot be reached
SMTPConnection only calls the connect() callback once the handshake
succeeds; a refused or timed out connection is emitted as an 'error'
event, which was only logged. relay() then never settled, so its finally
block (which now releases the email stream) never ran, auto-relay held
the incoming SMTP transaction open without a reply, and the REST relay
request hung. Reject the connect promise from the 'error' handler.
2026-10-02 15:59:20 +02:00
dualfroz 5479067fab fix(smtp): close the raw email stream when a relay does not send it (#423)
relayEmail opens a read stream on the .eml file for every relay, and only
client.send() ever consumed it. When the auto-relay rules left no
recipients, or the outgoing server failed the send (e.g. rejected a
recipient), the stream was never read or destroyed and its file
descriptor stayed open. Destroy it on the early return and in the finally
block; after a successful send it is already fully read, so that is a
no-op.
2026-10-02 15:57:49 +02:00
upstream 27e7633a30 Upstream maildev/maildev state of the touched files before 661742ab9d 2026-10-02 15:57:49 +02:00