Skip to content

mail-lua: Document %{lua_file} and %{lua_call}#1423

Open
cmouse wants to merge 1 commit intodovecot:mainfrom
cmouse:mail-lua
Open

mail-lua: Document %{lua_file} and %{lua_call}#1423
cmouse wants to merge 1 commit intodovecot:mainfrom
cmouse:mail-lua

Conversation

@cmouse
Copy link
Contributor

@cmouse cmouse commented Feb 9, 2026

DOV-8705


```[get_home.lua]
# This is not a good way to do this, provided here for example
# purposes only. Do not use this.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lua uses -- as comments, not #

Example:
```[dovecot.conf]
mail_plugins {
mail_lua = yes
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

normally 2 spaces indent, not 3

Example:
```[dovecot.conf]
mail_plugins {
mail_lua = yes
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indent

### `%{lua_call(<function>,...)}`

Executes Lua function in the mail lua script file, and it's successful, use the string
result. If values are provided after function name, they are passed to
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Executes Lua function in the [[setting,mail_lua_file]], and if it's successful, expand to the returned string value.


```[mail.lua]
# This is not a good way to do this, provided here for example
# purposes only. Do not use this.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

--, not #

| `ldap_dn` | String | String | Converts any `.` into `,dc=`. For example `domain.com` converts into `domain,dc=com`. |
| `lenumber` | Bytes | Number | Convert little-endian encoded input into a number. |
| `lfill(width, filler)` | Any | Any | Pads value from left with filler until length is width. Default filler is `0`. |
| `lfill(width, filler)` | Any | Any | Pads value from left with filler until length is width. Default filler is `0`. |i
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

garbage

| `oauth2:<name>` | Return oauth2 field "name". This is only present in [[setting,oauth2_fields]]. |

## Conditionals
| `oauth2:<name>` | Return oauth2 field "name". This is only present in [[setting,oauth2_fields]]. |## Conditionals
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

garbage

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants