Alex V.
1d8e44a948
test: add error-path tests for all bug fixes
...
- test_doveauth: invalid localpart chars rejected, concurrent same-account creation
- test_expire: --mdir filtering uses msg.path correctly
- test_metadata: TURN exception returns N\n, success returns credentials
- test_turnserver: socket timeout, connection refused, happy path
- test_dns: get_dkim_entry returns (None, None) on CalledProcessError
- test_rshell: dovecot_recalc_quota handles empty/malformed output
2026-02-07 21:45:22 +03:00
Alex V.
447c0ee33d
fix: handle turn_credentials exceptions in metadata proxy
...
ConnectionRefusedError/FileNotFoundError/TimeoutError from
turn_credentials() would kill the dict proxy connection.
Return N (not found) response instead and log the error.
2026-02-07 16:51:30 +03:00
Alex V.
47c9586b67
fix: add 5s timeout to TURN credential socket
...
Hung TURN daemon would block dict proxy handler thread indefinitely.
Per Python docs, settimeout() raises TimeoutError on expiry.
2026-02-07 16:51:19 +03:00
Alex V.
e32816b477
fix(security): validate localpart chars and fix account creation race
...
- Reject localparts with chars outside [a-z0-9._-] to prevent
filesystem issues from crafted usernames via IMAP/SMTP auth
- Use filelock to serialize concurrent account creation for same
address, preventing TOCTOU race where two threads both create
an account and last writer wins
2026-02-07 16:51:01 +03:00
Alex V.
c48a7d80dc
fix(security): use secrets.choice instead of random.choices for username
...
Per Python docs, secrets module should be used for security-sensitive
data. random.choices uses Mersenne Twister PRNG which is predictable.
secrets.choice was already used for password generation in the same file.
2026-02-07 16:50:24 +03:00
Alex V.
0443965f63
fix: use msg.path instead of nonexistent msg.relpath in fsreport
...
FileEntry namedtuple has (path, mtime, size), not relpath.
Crashes with AttributeError when --mdir flag is used.
2026-02-07 16:28:42 +03:00
Jagoda Ślązak
e42139e97b
chore(deps): upgrade to filtermail v0.2
...
Signed-off-by: Jagoda Ślązak <jslazak@jslazak.com >
2026-01-28 20:46:02 +00:00
Jagoda Estera Ślązak
ab3492d9a1
feat(filtermail): Replace filtermail with rust reimplementation ( #808 )
...
Signed-off-by: Jagoda Ślązak <jslazak@jslazak.com >
2026-01-23 16:31:45 +01:00
Jagoda Estera Ślązak
032faf0a94
feat(config): Set default internal SMTP ports in Config ( #819 )
...
Signed-off-by: Jagoda Ślązak <jslazak@jslazak.com >
2026-01-23 09:34:16 +01:00
Mark Felder
325cc7a7b4
expire.py: use absolute path to maildirsize
2026-01-15 12:50:38 +01:00
link2xt
c2acbad802
docs: pin Dovecot documentation URLs to version 2.3
...
At least some old URLs are 404 already.
2026-01-07 20:08:45 +00:00
373
2f8199a7c6
test: update config test for proper assertion
2025-12-26 20:46:03 +01:00
373
4eeead2826
feat: increases default max mailbox size
...
this changeset increases the default max mailbox or quota size per a conversation in our development channel
2025-12-26 20:46:03 +01:00
link2xt
0d890274fd
feat: use daemon_name for OpenDKIM sign-verify decision instead of IP
...
On FreeBSD 127.0.0.2 is not assigned to any interface by default,
so 127.0.0.2 source address hack cannot be used to make OpenDKIM
verify the signature instead of signing.
This change sets InternalHosts to `-` so no IP addresses
make OpenDKIM sign the message. Instead of IP address,
OpenDKIM in the outgoing pipeline is explicitly told
to sign messages by setting `{daemon_name}` macro to `ORIGINATING`.
2025-12-19 17:09:33 +00:00
holger krekel
f04a624e19
fix: use absolute path instead of relative path, and streamline some code parts according to comments at https://github.com/chatmail/relay/pull/785
2025-12-18 23:31:39 +01:00
holger krekel
24e3f33acd
fix: expire messages also from DeltaChat IMAP subfolders
2025-12-18 23:04:50 +01:00
cliffmccarthy
d76b33def1
feat: Remove echo from passthrough recipients
2025-12-17 10:35:47 +01:00
cliffmccarthy
49c66116bf
feat: Remove echobot special cases
2025-12-17 10:35:47 +01:00
Rodrigo Camacho
c98853570b
updated location of the documentation for custom webpage location
2025-12-11 22:50:02 +01:00
adbenitez
55cfd00505
add imap_compress option to chatmail.ini
2025-12-09 09:32:53 +01:00
holger krekel
b000213c68
remove echobot from relay deployment and make sure it's un-installed during "cmdeploy run"
2025-12-07 20:14:35 +01:00
link2xt
33c67d22fa
Add execnet dependency
2025-12-07 15:21:44 +01:00
missytake
f24bc99c6f
config: xstore@testrun.org is deprecated ( #722 )
2025-11-11 11:46:35 +01:00
Lars-Dominik Braun
d42f579291
turnserver: Strip newline from response.
2025-11-03 22:57:43 +00:00
holger krekel
fa9aa5b015
guard expire/fsreport file iteration against vanishing, improve reporting
...
also activates actual deletion (after quite some dry test runs on nine)
2025-10-22 20:30:12 +02:00
holger krekel
9ddd5d8b2b
Replace expiry "find" commands with a new chatmaild.expire python module + a reporting one
2025-10-21 20:50:46 +00:00
missytake
4cfe228a1f
filtermail: further optimize check_armored_payload()
2025-10-21 00:57:27 +02:00
holger krekel
741a20450c
Add a system test for running the filtermail module
2025-10-20 19:02:14 +00:00
adb
b7fadcd4be
filtermail: improve check_armored_payload() ( #679 )
2025-10-20 09:55:53 +02:00
link2xt
2b90f7db37
filtermail: run CPU-intensive handle_DATA in a thread pool executor
...
See
<https://docs.python.org/3/library/asyncio-eventloop.html#executing-code-in-thread-or-process-pools >
for the documentation.
This should avoid processing of large messages from hogging asyncio
thread and delaying async operations like accepting new connections.
2025-10-19 10:43:11 +00:00
holger krekel
e37dd5153a
remove logging and just print to sys.stderr
2025-10-18 19:50:13 +00:00
missytake
6f600fa329
config: add www_folder to default config ( #634 )
2025-10-14 21:17:08 +02:00
missytake
262e98f0ba
filtermail: allow Version comment in incoming PGP messages ( #655 )
...
fix #616
* filtermail: accept any Version comment in incoming messages
2025-10-14 19:15:13 +02:00
link2xt
d7f50183ea
feat: setup TURN server
2025-10-10 18:32:32 +00:00
Keonik1
65c0bf13f2
cmdeploy: add acme_email config value
2025-10-08 13:06:48 +02:00
link2xt
d091b865c7
fix: ignore all RCPT TO: parameters
...
Stalwart sends `NOTIFY=DELAY,FAILURE`
to request Delivery Status Notifications.
aiosmtpd does not support any parameters,
not just ORCPT, so we have to ignore all of them.
2025-10-05 02:36:40 +00:00
cliffmccarthy
9b6dfa9cdc
Use max username length in newemail.py, not min
...
- username_min_length and username_max_length are both set to a
default value of 9 in the chatmail.ini.f template. When they have
the same value, it doesn't matter which one we use in newemail.py
(which handles the /new URL). However, if they are configured to
different values by the admin, then the current implementation using
username_min_length chooses from a smaller set of possible
usernames.
- Revised create_newemail_dict() in newemail.py to use
username_max_length as the length of the random username it offers
via the /new URL. This randomizes within a much larger set of
possible usernames.
2025-10-03 19:48:32 +00:00
missytake
d6fb38750a
www: make www_folder behavior testable
2025-09-11 19:51:32 +02:00
missytake
3b73457de3
www: introduce www_folder config item
...
fix #529
2025-09-11 19:51:32 +02:00
missytake
1f5b2e947c
CI: ignore PLC0415 in ruff (imports outside top level)
2025-06-29 19:49:17 +02:00
holger krekel
8a59d94105
Update notifier.py docs
...
Update to current status and naming
2025-06-27 11:08:31 +02:00
link2xt
96a1dbac08
Expire push notification tokens after 90 days
2025-06-10 22:27:21 +00:00
missytake
0c28310861
make cmdeploy fmt happy
2025-05-24 08:47:49 +02:00
missytake
0125dda6d7
echo: add echo@ to passthrough_senders in default config
2025-05-24 08:47:49 +02:00
missytake
fe38fcbeba
filtermail: add echo to passthrough_recipients by default
2025-05-24 08:47:49 +02:00
missytake
b4af6df55c
chatmaild: allow echobot to receive unencrypted messages by default
2025-05-24 08:47:49 +02:00
missytake
15244f6462
lint: make ruff happy
2025-05-17 19:31:33 +02:00
missytake
b925f3b5ab
filtermail: respect message size limit in the config
2025-05-17 19:31:33 +02:00
adbenitez
09ff56e5b9
add test
2025-05-05 12:59:09 +02:00
adbenitez
b35e84e479
avoid crash on spurious empty file in the pending_notifications dir
2025-05-05 12:59:09 +02:00