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
99 changes: 99 additions & 0 deletions data/lua.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,53 @@ as the parent.`
`Expand variables in the input string, [[link,settings_variables]].`
},

{
name: 'str_sanitize',
args: {
input: {
type: 'string',
text: `String to sanitize.`
},
max_bytes: {
type: 'int',
text: `Maximum length of the result in bytes, including the appended \`...\`. Must be at least 1.`
},
},
return: `The sanitized string.`,
tags: [ 'dovecot' ],
text: `
[[added,lua_str_sanitize_added]] Replace all control characters in the input
with \`?\`, and truncate it to \`max_bytes\` bytes.

A truncated result ends with \`...\`. The input is treated as UTF-8, so a
multi-byte character is never cut in half, but \`max_bytes\` counts bytes
rather than characters. Use \`str_sanitize_utf8()\` to count characters.

This is mainly useful for including untrusted data in log messages.`
},

{
name: 'str_sanitize_utf8',
args: {
input: {
type: 'string',
text: `String to sanitize.`
},
max_cps: {
type: 'int',
text: `Maximum length of the result in unicode code points, including the appended ellipsis. Must be at least 1.`
},
},
return: `The sanitized string.`,
tags: [ 'dovecot' ],
text: `
[[added,lua_str_sanitize_added]] Like \`str_sanitize()\`, but counts unicode
code points instead of bytes.

Control characters are replaced with the unicode replacement character
(U+FFFD), and a truncated result ends with a horizontal ellipsis (U+2026).`
},

{
name: 'base64.encode',
args: {
Expand Down Expand Up @@ -354,6 +401,58 @@ Optionally you can set \`synchronous\`, which will cause "100 Continue"
header to be sent.`
},

{
name: 'set_timeout',
args: {
value: {
type: 'string',
text: `Time interval, e.g. \`2s\` or \`500ms\`.`
},
},
tags: [ 'http_request' ],
text: `
[[added,lua_http_request_overrides_added]] Override the client's
\`request_timeout\` ([[setting,http_client_request_timeout]]) for this
request.

This is the timeout for a single attempt, so a request that is retried can
take up to \`max_attempts\` times this long. Use \`set_absolute_timeout()\`
to limit the total time instead.`
},

{
name: 'set_absolute_timeout',
args: {
value: {
type: 'string',
text: `Time interval, e.g. \`2s\` or \`500ms\`.`
},
},
tags: [ 'http_request' ],
text: `
[[added,lua_http_request_overrides_added]] Override the client's
\`request_absolute_timeout\` ([[setting,http_client_request_absolute_timeout]])
for this request.

This is the maximum total time the request may take, counted from
\`submit()\` and including any retries.`
},

{
name: 'set_max_attempts',
args: {
value: {
type: 'int',
text: `Maximum number of attempts. Must be at least 1.`
},
},
tags: [ 'http_request' ],
text: `
[[added,lua_http_request_overrides_added]] Override the client's
\`request_max_attempts\` ([[setting,http_client_request_max_attempts]]) for
this request.`
},

{
name: 'set_event',
args: {
Expand Down
3 changes: 3 additions & 0 deletions data/updates.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ export const updates = {
dict_protocol_v4: '2.4.0',
doveadm_ex_expired_code: '2.4.0',
doveadm_mailbox_commands_user: '2.4.0',
doveadm_who_ps_added: '2.4.6',
extra_fields_default: '2.4.0',
extra_fields_empty: '2.4.0',
event_export_drivers_file_unix_added: '2.4.0',
Expand All @@ -53,7 +54,9 @@ export const updates = {
login_proxy_rawlog_dir_changed: '2.4.2',
lua_auth_init: '2.4.0',
lua_dns_client: '2.4.0',
lua_http_request_overrides_added: '2.4.6',
lua_script_init: '2.4.0',
lua_str_sanitize_added: '2.4.6',
mail_attachment_detection_options_changed: '2.4.2',
mail_attachment_detection_options_maildir_changed: '2.4.3',
mail_cache_fields_changed: '2.4.1',
Expand Down
6 changes: 6 additions & 0 deletions docs/core/man/doveadm-who.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ dovecotComponent: core

**doveadm** [*GLOBAL OPTIONS*] **who**
[**-1**]
[**--ps**]
[**-f** *passdb_field*]
[**-a** *anvil_socket_path*]
[*user_mask*]
Expand Down Expand Up @@ -45,6 +46,11 @@ This command uses by default the output formatter **table**.
Only the passdb fields beginning with the *user_* prefix are
tracked.

**--ps**
: Print one line per process, with the process title as shown by ps(1).
This shows what each of the user's processes is currently doing. Can't
be used together with **-1**. [[added,doveadm_who_ps_added]]

## ARGUMENTS

*ip* [**/** *bits*]
Expand Down
Loading