1874 Commits

Author SHA1 Message Date
Peter Krawczyk
8ce6fc0db5 Chore: Set HELO/EHLO hostname when connecting to external SMTP server (#556)
When a message is forwarded or released, Mailpit introduces itself as
`localhost` to the upstream server. This happens because `net/smtp` forces the
value to be `localhost` if `client.Hello` is not called. This is explicitly
documented at https://pkg.go.dev/net/smtp#Client.Hello

Therefore, both `internal/smtpd/relay.go` (`createRelaySMTPClient`) and
`internal/smtpd/forward.go` (`createForwardingSMTPClient`) should either call
`client.Hello(os.Hostname())` or create a config (perhaps `config.HeloHostname`)
and use `client.Hello()` with that value immediately before returning from
either of those functions. (The HELO/EHLO command comes after TLS negotiation
but before any other SMTP commands.) This commit does the former.

Without this feature, Mailpit cannot be used in combination with Google
Workspace's SMTP Relay functionality, as it rejects any connection that
identifies itself as `localhost`.

Relates to #146
2025-08-22 16:04:03 +12:00
Ralph Slooten
933d064a51 Merge tag 'v1.27.5' into develop
Release v1.27.5
2025-08-17 12:41:46 +12:00
Ralph Slooten
ad26ca34e5 Merge branch 'release/v1.27.5' v1.27.5 2025-08-17 12:41:43 +12:00
Ralph Slooten
531801f934 Release v1.27.5 2025-08-17 12:41:42 +12:00
Ralph Slooten
0faa71310e Chore: Update caniemail test database 2025-08-17 12:35:45 +12:00
Ralph Slooten
646e93c58b Chore: Update node dependencies 2025-08-17 12:34:59 +12:00
Ralph Slooten
854844924f Chore: Update Go dependencies 2025-08-17 12:31:49 +12:00
Felipe
343db8bb61 Fix: Support optional UIDL argument in POP3 server (#552)
* fix: use single-line response when UIDL has an argument

The test changes included here don't necessarily deal with the fact that
the response used to be multi-line: the failure wouldn't occur during
the `c.Uidl()` calls, but rather on the next one as the client would
still have data from the server to receive, causing a parsing error like
so:

    pop3_test.go:103: strconv.Atoi: parsing "unique-id": invalid syntax

The server now correctly replies with a single line response when an
argument is passed, as required by [the spec][1]

[1]: https://www.rfc-editor.org/rfc/rfc1939.html#page-12

* fix: UIDL accepts at most one argument
2025-08-17 12:24:53 +12:00
Ralph Slooten
781d8d2332 Merge tag 'v1.27.4' into develop
Release v1.27.4
2025-08-10 21:26:12 +12:00
Ralph Slooten
618d1f77b5 Merge branch 'release/v1.27.4' v1.27.4 2025-08-10 21:25:52 +12:00
Ralph Slooten
5577b748af Release v1.27.4 2025-08-10 21:25:51 +12:00
Ralph Slooten
4619d9be88 Chore: Update caniemail test database 2025-08-10 21:18:23 +12:00
Ralph Slooten
6051952a9b Chore: Update node dependencies 2025-08-10 21:17:32 +12:00
Ralph Slooten
a54697b3de Chore: Update Go dependencies 2025-08-10 21:14:38 +12:00
Ralph Slooten
f6bb0d1ffd Merge branch 'feature/drop-rejected-recipients' into develop 2025-08-10 21:09:29 +12:00
Ralph Slooten
41ef4ecd60 Rename smtp-silently-drop-rejected-recipients to smtp-ignore-rejected-recipients 2025-08-10 21:04:22 +12:00
Matthias Gliwka
39d80df809 Feature: Allow rejected SMTP recipients to be silently dropped (#549) 2025-08-10 20:34:26 +12:00
Ralph Slooten
be95839838 Merge tag 'v1.27.3' into develop
Release v1.27.3
2025-07-29 01:22:02 +12:00
Ralph Slooten
8f187fe275 Merge branch 'release/v1.27.3' v1.27.3 2025-07-29 01:21:55 +12:00
Ralph Slooten
bb2793354a Release v1.27.3 2025-07-29 01:21:53 +12:00
Ralph Slooten
42aa38ddeb Fix: Fix sendmail when using an --smtp-addr <ip>:<port> (#542) 2025-07-29 01:20:55 +12:00
Ralph Slooten
7423b9660b Merge tag 'v1.27.2' into develop
Release v1.27.2
2025-07-27 12:36:34 +12:00
Ralph Slooten
0b7503261c Merge branch 'release/v1.27.2' v1.27.2 2025-07-27 12:36:30 +12:00
Ralph Slooten
e43be79968 Release v1.27.2 2025-07-27 12:36:29 +12:00
Ralph Slooten
70855a50c5 Chore: Update node dependencies 2025-07-27 12:29:56 +12:00
Ralph Slooten
0b21a3aba2 Chore: Update Go dependencies 2025-07-27 12:28:09 +12:00
Ralph Slooten
507217844b Security: Add ReadHeaderTimeout to Prometheus metrics server 2025-07-25 20:39:13 +12:00
Ralph Slooten
5a4d13b15a Security: Prevent integer overflow conversion to uint64 2025-07-25 20:33:27 +12:00
Ralph Slooten
fbc1dc6118 Do not expose unnecessary Prometheus functions 2025-07-25 20:33:27 +12:00
Ralph Slooten
2a7aa33a0a Fix: Do not check latest release for Prometheus statistics (#522) 2025-07-25 20:33:20 +12:00
dependabot[bot]
45f07d3c9b Bump form-data from 4.0.3 to 4.0.4
---
updated-dependencies:
- dependency-name: form-data
  dependency-version: 4.0.4
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-07-24 17:32:03 +12:00
dependabot[bot]
894220dc44 Bump axios from 1.10.0 to 1.11.0
Bumps [axios](https://github.com/axios/axios) from 1.10.0 to 1.11.0.
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md)
- [Commits](https://github.com/axios/axios/compare/v1.10.0...v1.11.0)

---
updated-dependencies:
- dependency-name: axios
  dependency-version: 1.11.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-07-24 17:30:56 +12:00
Ralph Slooten
cce21854b9 Chore: Refactor JS functions and remove unused parameters 2025-07-24 17:27:11 +12:00
Ralph Slooten
33fe814c34 Chore: Update eslint config, remove neostandard 2025-07-24 17:26:20 +12:00
Ralph Slooten
df75064009 Merge branch 'feature/snakeoil' into develop 2025-07-24 17:04:25 +12:00
Ralph Slooten
e1ed21abff Chore: Allow sendmail to send to untrusted TLS server 2025-07-24 17:04:15 +12:00
Ralph Slooten
f3e3536cdb Feature: Add ability to generate self-signed (snakeoil) certificates for UI, SMTP and POP3 (#539) 2025-07-24 17:02:50 +12:00
Ralph Slooten
38c343867e Merge branch 'feature/535-bug' into develop 2025-07-18 23:43:17 +12:00
Ralph Slooten
75504c7bba Fix: Support angle brackets for text/plain URLs with spaces (#535) 2025-07-18 23:43:05 +12:00
Dennis
79323df3bd Fix: Use MaxMessages to determine pruning (#536) 2025-07-16 22:16:25 +12:00
Ralph Slooten
5a672df0fc Merge tag 'v1.27.1' into develop
Release v1.27.1
2025-07-06 17:34:56 +12:00
Ralph Slooten
72730ba470 Merge branch 'release/v1.27.1' v1.27.1 2025-07-06 17:34:50 +12:00
Ralph Slooten
76d9a410b8 Release v1.27.1 2025-07-06 17:34:49 +12:00
Ralph Slooten
7ca84d3b0d Chore: Update node dependencies 2025-07-06 17:29:51 +12:00
Ralph Slooten
d430e38aad Chore: Update Go dependencies 2025-07-06 17:22:35 +12:00
Ralph Slooten
2d1fb7cf14 Chore: Allow unknown href link protocols in HTML view such as myapp:// (#532) 2025-07-01 08:01:09 +12:00
Ralph Slooten
8634c9e8f2 Rebuild CHANGELOG (glitch in the matrix) 2025-06-29 00:04:56 +12:00
Ralph Slooten
e74237e71c Merge tag 'v1.27.0' into develop
Release v1.27.0
2025-06-28 23:54:32 +12:00
Ralph Slooten
1f1eed8a8b Merge branch 'release/v1.27.0' v1.27.0 2025-06-28 23:54:26 +12:00
Ralph Slooten
643a7ed9d5 Release v1.27.0 2025-06-28 23:54:23 +12:00