Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions docs/core/settings/types.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,6 @@ dovecotlinks:

String can contain any character. Strings support [[variable]].

::: tip
If you need the `%` character verbatim you have to escape it as `%%`.
:::

## String without variables

Certain settings require specific variables and thus don't use the default
Expand Down
6 changes: 5 additions & 1 deletion docs/core/settings/variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,11 @@ Filters can accept parameters, both positional and named. E.g. `%{literal('\r\n\
to CR LF. `%{user | substr(0, 1)}` will take first character of username. Example of named parameters
would be `%{user | md5(rounds=1000,salt='pepper')}`

You can use `%%{variable}` to escape this, and emit `%{variable}`.
For escaping:
* `%%{text}` emits `%{text}`
* `%%%{text}` emits `%%{text}`
* `%{concat('%', variable)}` emits `%<expanded variable>`
* Otherwise `%` doesn't need any escaping. `%%` emits the same `%%`.

Filters accept strings, numbers and variables as parameters. Parameters can be positional or
named key-value pairs. Key names cannot be variables.
Expand Down