Skip to content

fix(table/regexp): rename expand_replaceholders to expand_placeholders - #902

Merged
foxcpp merged 1 commit into
foxcpp:masterfrom
troioi-vn:fix/regexp-expand-placeholders
Nov 12, 2026
Merged

foxcpp merged 1 commit into
foxcpp:masterfrom
troioi-vn:fix/regexp-expand-placeholders

Conversation

@troioi-vn

Copy link
Copy Markdown
Contributor

The documented expand_placeholders directive currently fails with "unexpected directive" because the implementation reads expand_replaceholders.

As agreed in #896, accept the documented name and keep the old spelling working with a deprecation warning. Expansion still defaults to yes. This also corrects the directive name in the Vim syntax file and adds tests for expansion behavior and invalid configuration.

Validation: go test ./... and golangci-lint run passed.

Together with #898, this addresses both problems in #896.

Fixes #896

Description drafted with Claude Code, reviewed by me.

The old name still works for now and logs a deprecation warning.

Fixes foxcpp#896

Assisted-By: Claude Code (claude-opus-5-5)
Signed-off-by: troioi-vn <chusovitin@gmail.com>
@foxcpp

foxcpp commented Nov 12, 2026

Copy link
Copy Markdown
Owner

I am not a big fan of Callback duplicating config.Map code but we don't have a proper solution for deprecating/renaming of configuration directives so let's merge this for now.

@github-project-automation github-project-automation Bot moved this from First Feedback Needed to Approved in Maddy Mail Server PR Review Nov 12, 2026
@foxcpp
foxcpp merged commit 765744d into foxcpp:master Nov 12, 2026
3 checks passed
@github-project-automation github-project-automation Bot moved this from Approved to Merged in Maddy Mail Server PR Review Nov 12, 2026
gabrielcosi pushed a commit to gabrielcosi/home-ops that referenced this pull request Nov 20, 2026
…828)

This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [ghcr.io/foxcpp/maddy](https://maddy.email) ([source](https://github.com/foxcpp/maddy)) | patch | `0.9.7` → `0.9.8` |

---

### Release Notes

<details>
<summary>foxcpp/maddy (ghcr.io/foxcpp/maddy)</summary>

### [`v0.9.8`](https://github.com/foxcpp/maddy/releases/tag/v0.9.8): [SECURITY] maddy 0.9.8

[Compare Source](foxcpp/maddy@v0.9.7...v0.9.8)

## Summary

This release includes fixes for two reported security issues: IMAP
parsing now limits command size and nesting depth, and LDAP
authentication cleanup avoids a nil-pointer panic in a connection error
path.

Operators using IMAP or LDAP authentication should upgrade to receive
these fixes.

IMAP behavior is corrected for read-only `EXAMINE` sessions and `RENAME
INBOX`, and searches using `SINCE` or `ON` now include messages from the
specified day. The release also adds optional SMTP reverse-DNS lookup
control, bounded command execution for `check.command`, and
platform-specific default directories.

## Security

- endpoint/imap: Limit command size and nested list depth
  (GHSA-3gp8-jmrg-pq2v).

The IMAP parser now rejects excessively long commands and deeply nested
lists, limiting resource use while parsing client input. Previously, a
client able to reach an IMAP listener could send input without these
parser bounds.

Affects configurations exposing an IMAP endpoint to clients. No
additional configuration is required for the parser limits.

- auth/ldap: Stop cleanup after invalidating a connection
  (GHSA-854c-vjm7-rqw8).

If rebinding a pooled LDAP connection failed, cleanup could clear the
shared connection and then dereference it while trying to close it
again, panicking the process. Cleanup now returns after invalidating the
connection.

Affects configurations using `auth.ldap`; the problematic path requires
a rebind failure while returning a connection to the pool.

## Bug fixes

- endpoint/imap: Do not expunge a read-only mailbox on `CLOSE`, and
  reject `MOVE` and `UID MOVE` on a read-only selection ([#&#8203;906](foxcpp/maddy#906)).
- endpoint/imap: After `RENAME INBOX`, make the new empty `INBOX`
  visible in the same session while preserving messages in the renamed
  mailbox ([#&#8203;907](foxcpp/maddy#907)).
- endpoint/imap: Include messages dated on the specified day in `SINCE`
  and `ON` searches ([#&#8203;887](foxcpp/maddy#887)).
- endpoint/imap: Wait for active connections to finish during shutdown,
  avoiding a data race ([#&#8203;886](foxcpp/maddy#886)).
- endpoint/smtp: Snapshot connection metadata per message so
  asynchronous delivery does not race with changes to session state
  ([#&#8203;899](foxcpp/maddy#899)).
- auth/pass_table: Return an error instead of panicking on malformed
  Argon2 hashes ([#&#8203;888](foxcpp/maddy#888)) (PR [#&#8203;891](foxcpp/maddy#891), thanks [@&#8203;kabeer7121](https://github.com/kabeer7121)).
- auth: Apply `auth_map` only once during SASL LOGIN authentication.
- target/queue: Preserve enhanced SMTP status codes when converting
  delivery errors.
- target/remote: Do not pool a connection used when a TLS policy
  override bypassed MX authentication policies.
- check/milter: Accept IPv4- and IPv6-specific TCP endpoints, and reject
  TLS endpoints explicitly because the milter client does not support
  TLS.
- DMARC and address checks: Decode RFC 2047 display names in address
  lists, including supported legacy character sets ([#&#8203;894](foxcpp/maddy#894)).

## Improvements

- endpoint/smtp: Add `rdns_lookup` to disable client reverse-DNS
  lookups. It defaults to `yes`; setting it to `no` skips PTR lookups
  and dependent checks ([#&#8203;150](foxcpp/maddy#150)) (PR [#&#8203;889](foxcpp/maddy#889), thanks [@&#8203;kabeer7121](https://github.com/kabeer7121)).
- check/command: Add `timeout` and `interrupt_timeout` controls for
  external commands. Both default to one minute; a timed-out command
  receives SIGINT and is killed if it does not stop within the interrupt
  timeout.
- imap.filter.command: Add a one-minute default command timeout and
  close message-body readers after filtering.
- config: Use platform-specific default directories on Windows, macOS
  and BSD. Windows uses `%ProgramData%\maddy` for configuration,
  separate `data` and `run` directories, and `%ProgramFiles%\maddy` for
  libexec. macOS and BSD use `/var/run/maddy` for runtime files and
  `/usr/lib/maddy` for libexec ([#&#8203;290](foxcpp/maddy#290)) (PR [#&#8203;900](foxcpp/maddy#900), thanks [@&#8203;AdamMagued](https://github.com/AdamMagued)).
- config: Support `tcp4`, `tcp6`, `fd` and `fdname` endpoint addresses,
  including TLS modifiers for inherited file descriptors.
- auth.pass_table: Log specific diagnostics when a credentials table has
  no entry for a username, while keeping client-facing authentication
  errors generic ([#&#8203;649](foxcpp/maddy#649)) (PR [#&#8203;890](foxcpp/maddy#890), thanks [@&#8203;mvanhorn](https://github.com/mvanhorn)).
- table/regexp: Accept the documented `expand_placeholders` directive
  while retaining the old `expand_replaceholders` spelling with a
  deprecation warning ([#&#8203;896](foxcpp/maddy#896)) (PR [#&#8203;902](foxcpp/maddy#902), thanks [@&#8203;troioi-vn](https://github.com/troioi-vn)).

## Documentation

- Document configuration macros and variable expansion syntax ([#&#8203;335](foxcpp/maddy#335)).
- Add documentation for the Dovecot SASL endpoint ([#&#8203;438](foxcpp/maddy#438)).
- Correct the `+tag` stripping example for `table.chain` ([#&#8203;896](foxcpp/maddy#896)) (PR
  [#&#8203;898](foxcpp/maddy#898), thanks [@&#8203;troioi-vn](https://github.com/troioi-vn)).

## Misc

- tests: Reserve test ports with shared listening sockets to avoid port
  collisions
- tests: Use Parallel for all integration tests and fix encountered data
  races in test code.

</details>

---

### Configuration

📅 **Schedule**: (in timezone Europe/Berlin)

- Branch creation
  - At any time (no schedule defined)
- Automerge
  - At any time (no schedule defined)

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about these updates again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Operator](https://github.com/mogenius/renovate-operator).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4yMzkuMSIsInVwZGF0ZWRJblZlciI6IjQ0LjIzOS4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJyZW5vdmF0ZS9jb250YWluZXIiLCJ0eXBlL3BhdGNoIl19-->

Reviewed-on: https://git.xcd.dev/gabrielcosi/home-ops/pulls/1828
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

docs: table.chain +tag example doesn't parse, and table.regexp documents the wrong directive name

2 participants