Updated directory expressions

This commit is contained in:
mdecimus 2024-02-14 15:44:35 +01:00
parent 9472456ea0
commit 53f0222f30
7 changed files with 18 additions and 9 deletions

View file

@ -2,6 +2,7 @@ Upgrading from `v0.5.3` to `v0.6.0`
-----------------------------------
- In order to support [expressions](https://stalw.art/docs/configuration/expressions/overview), version `0.6.0` introduces multiple breaking changes in the SMTP server configuration file. It is recommended to download the new SMTP configuration files from the [repository](https://github.com/stalwartlabs/mail-server/tree/main/resources/config/smtp), make any necessary changes and replace the old files under `INSTALL_DIR/etc/smtp` with the new ones.
- If you are using custom subaddressing of catch-all rules, you'll need to replace these rules with expressions. Check out the updated [syntax](https://stalw.art/docs/directory/addresses).
- Message queues are now distributed and stored in the backend specified by the `storage.data` and `storage.blob` settings. Make sure to flush your SMTP message queue before upgrading to `0.6.0` to avoid losing any outgoing messages pending delivery.
- Replace the binary with the new version.
- Restart the service.

View file

@ -389,7 +389,7 @@ impl ParseValue for ServerProtocol {
Ok(Self::Jmap)
} else if value.eq_ignore_ascii_case("imap") {
Ok(Self::Imap)
} else if value.eq_ignore_ascii_case("http") {
} else if value.eq_ignore_ascii_case("http") | value.eq_ignore_ascii_case("https") {
Ok(Self::Http)
} else if value.eq_ignore_ascii_case("managesieve") {
Ok(Self::ManageSieve)

Binary file not shown.

View file

@ -9,9 +9,11 @@ disable = true
[directory."internal".options]
catch-all = true
#catch-all = { map = "(.+)@(.+)$", to = "info@${2}" }
#catch-all = [ { if = "matches('(.+)@(.+)$', address)", then = "'info@' + $2" },
# { else = false } ]
subaddressing = true
#subaddressing = { map = "^([^.]+)\.([^.]+)@(.+)$", to = "${2}@${3}" }
#subaddressing = [ { if = "matches('^([^.]+)\.([^.]+)@(.+)$', address)", then = "$2 + '@' + $3" },
# { else = false } ]
[directory."internal".cache]
entries = 500

View file

@ -27,9 +27,11 @@ ttl = {positive = '1h', negative = '10m'}
[directory."ldap".options]
catch-all = true
#catch-all = { map = "(.+)@(.+)$", to = "info@${2}" }
#catch-all = [ { if = "matches('(.+)@(.+)$', address)", then = "'info@' + $2" },
# { else = false } ]
subaddressing = true
#subaddressing = { map = "^([^.]+)\.([^.]+)@(.+)$", to = "${2}@${3}" }
#subaddressing = [ { if = "matches('^([^.]+)\.([^.]+)@(.+)$', address)", then = "$2 + '@' + $3" },
# { else = false } ]
[directory."ldap".pool]
max-connections = 10

View file

@ -8,9 +8,11 @@ disable = true
[directory."memory".options]
catch-all = true
#catch-all = { map = "(.+)@(.+)$", to = "info@${2}" }
#catch-all = [ { if = "matches('(.+)@(.+)$', address)", then = "'info@' + $2" },
# { else = false } ]
subaddressing = true
#subaddressing = { map = "^([^.]+)\.([^.]+)@(.+)$", to = "${2}@${3}" }
#subaddressing = [ { if = "matches('^([^.]+)\.([^.]+)@(.+)$', address)", then = "$2 + '@' + $3" },
# { else = false } ]
[[directory."memory".principals]]
name = "admin"

View file

@ -9,9 +9,11 @@ disable = true
[directory."sql".options]
catch-all = true
#catch-all = { map = "(.+)@(.+)$", to = "info@${2}" }
#catch-all = [ { if = "matches('(.+)@(.+)$', address)", then = "'info@' + $2" },
# { else = false } ]
subaddressing = true
#subaddressing = { map = "^([^.]+)\.([^.]+)@(.+)$", to = "${2}@${3}" }
#subaddressing = [ { if = "matches('^([^.]+)\.([^.]+)@(.+)$', address)", then = "$2 + '@' + $3" },
# { else = false } ]
[directory."sql".cache]
entries = 500