Skip to content

Commit

Permalink
Updated directory expressions
Browse files Browse the repository at this point in the history
  • Loading branch information
mdecimus committed Feb 14, 2024
1 parent 9472456 commit 53f0222
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 9 deletions.
1 change: 1 addition & 0 deletions UPGRADING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion crates/utils/src/config/listener.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Binary file modified resources/config.zip
Binary file not shown.
6 changes: 4 additions & 2 deletions resources/config/directory/internal.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 4 additions & 2 deletions resources/config/directory/ldap.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 4 additions & 2 deletions resources/config/directory/memory.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
6 changes: 4 additions & 2 deletions resources/config/directory/sql.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 53f0222

Please sign in to comment.