diff --git a/UPGRADING.md b/UPGRADING.md index af46e851..11f2fdb5 100644 --- a/UPGRADING.md +++ b/UPGRADING.md @@ -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. diff --git a/crates/utils/src/config/listener.rs b/crates/utils/src/config/listener.rs index d2494653..0de92242 100644 --- a/crates/utils/src/config/listener.rs +++ b/crates/utils/src/config/listener.rs @@ -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) diff --git a/resources/config.zip b/resources/config.zip index df6620ee..c134fc48 100644 Binary files a/resources/config.zip and b/resources/config.zip differ diff --git a/resources/config/directory/internal.toml b/resources/config/directory/internal.toml index 36e60531..7cbbe7a3 100644 --- a/resources/config/directory/internal.toml +++ b/resources/config/directory/internal.toml @@ -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 diff --git a/resources/config/directory/ldap.toml b/resources/config/directory/ldap.toml index 11ea5894..85dd75ae 100644 --- a/resources/config/directory/ldap.toml +++ b/resources/config/directory/ldap.toml @@ -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 diff --git a/resources/config/directory/memory.toml b/resources/config/directory/memory.toml index 8b90c768..ea13bc58 100644 --- a/resources/config/directory/memory.toml +++ b/resources/config/directory/memory.toml @@ -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" diff --git a/resources/config/directory/sql.toml b/resources/config/directory/sql.toml index ffd4ebc2..25941dee 100644 --- a/resources/config/directory/sql.toml +++ b/resources/config/directory/sql.toml @@ -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