From 9472456ea04dadb5a8f5544ea6e5e669d66b2b79 Mon Sep 17 00:00:00 2001 From: mdecimus Date: Wed, 14 Feb 2024 14:38:04 +0100 Subject: [PATCH] v0.6.0 --- .github/ISSUE_TEMPLATE/bug_report.yml | 1 + .github/ISSUE_TEMPLATE/feature_request.yml | 2 +- CHANGELOG.md | 16 ++++++++++++++++ UPGRADING.md | 8 ++++++++ crates/smtp/src/core/eval.rs | 2 ++ crates/smtp/src/reporting/mod.rs | 1 - resources/config.zip | Bin 171400 -> 171355 bytes resources/config/smtp/queue.toml | 4 ---- resources/config/smtp/report.toml | 2 -- 9 files changed, 28 insertions(+), 8 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index ce3f939d5..c8a18730a 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -31,6 +31,7 @@ body: label: Version description: What version of our software are you running? options: + - v0.6.x - v0.5.x - v0.4.x - v0.3.x or lower diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml index 63ea268bc..3c96598ba 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.yml +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -23,7 +23,7 @@ body: label: Is your feature request related to a problem? description: Write a clear and concise description of what the problem is. placeholder: Tell us what the problem is! - value: "I'm always frustrated when..." + value: "I'm having a problem with..." - type: checkboxes id: terms attributes: diff --git a/CHANGELOG.md b/CHANGELOG.md index 61362e9ba..fa6495303 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,22 @@ All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). +## [0.6.0] - 2024-02-14 + +This version introduces breaking changes in the configuration file. Please read the [UPGRADING.md](UPGRADING.md) file for more information on how to upgrade from previous versions. + +## Added +- Distributed and fault-tolerant SMTP message queues. +- Distributed rate-limiting and fail2ban. +- Expressions in configuration files. + +### Changed + +### Fixed +- Do not include `STATUS` in IMAP `NOOP` responses (#234). +- Allow multiple SMTP `HELO` commands. +- Redirect OAuth using a `301` instead of a `307` code. + ## [0.5.3] - 2024-01-14 Please read the [UPGRADING.md](UPGRADING.md) file for more information on how to upgrade from previous versions. diff --git a/UPGRADING.md b/UPGRADING.md index 270d50c61..af46e8515 100644 --- a/UPGRADING.md +++ b/UPGRADING.md @@ -1,3 +1,11 @@ +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. +- 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. + Upgrading from `v0.5.2` to `v0.5.3` ----------------------------------- diff --git a/crates/smtp/src/core/eval.rs b/crates/smtp/src/core/eval.rs index 1b90750a2..f1d6bca60 100644 --- a/crates/smtp/src/core/eval.rs +++ b/crates/smtp/src/core/eval.rs @@ -47,8 +47,10 @@ pub const VARIABLES_MAP: &[(&str, u32)] = &[ pub const FUNCTIONS_MAP: &[(&str, u32, u32)] = &[ ("is_local_domain", F_IS_LOCAL_DOMAIN, 2), + ("is_local_address", F_IS_LOCAL_ADDRESS, 2), ("key_get", F_KEY_GET, 2), ("key_exists", F_KEY_EXISTS, 2), + ("dns_query", F_DNS_QUERY, 2), ]; impl SMTP { diff --git a/crates/smtp/src/reporting/mod.rs b/crates/smtp/src/reporting/mod.rs index b8a194a1c..cc834850a 100644 --- a/crates/smtp/src/reporting/mod.rs +++ b/crates/smtp/src/reporting/mod.rs @@ -152,7 +152,6 @@ impl SMTP { #[cfg(not(feature = "test_mode"))] { use rand::Rng; - use std::time::Duration; let delivery_time = rand::thread_rng().gen_range(0u64..10800u64); for domain in &mut message.domains { diff --git a/resources/config.zip b/resources/config.zip index a79ac6fbef7cd08b8e9cca2161ca24660db3dbb0..df6620eef5eee1abc87208e1f6fdc32b1ce4dd4f 100644 GIT binary patch delta 3829 zcmZ`*c{r6_*FR?;WS%+ZslhB9p$ugR;Y4J95>bW-g$&g(&-3Zn=159C#>kK|l}e_J zDVgU)G*E_o_vw7!^S*uW_5N{R_x1a&wbx#2?X~w>F%9%1kLfGI*+KR|RU~@}6;+up z-a6F;OEkvP@5%7)IDf~xgV+m%s)Df(0LNSs-de+HCypDSP>UE8iW?;WpM(Nl0v!so zn%8lj{P_hipwLv`(I^xZCkllknR$Bk%d`GkIqSIp0WdR9Yb z+4FVT1FT}rCj~vZ@`43UXF_LKZPO1mA(@w5DLt!rj?EOM#iF2BFa5aXJ)g+16u5=89{N!gEY4C)fr)~*SUpqRJ za8y%``E@Usq1LWOPlkune5!WwW|DJ5W*Mz(WMA9YlX~{`30&G6i5cm|SSg1@Y|L~X zUoLjY3E0SfxcbVpIl^pCG(BkVO_?bHk6VLhV=7n2FL(PYM_bnzOkQ|@MX0DfCQnI= zzT1#*lC!m|O;q$DwCt+a^n*rv)_RLnnzUZ?MlrKeTJFR03k6LiYE#J{?2 z`m5suVr(D%vKx3iG{J~o(u`6Y(j7=ipZDIF!Q1Y6ZaQYeaOB=9?-s_?2tx(eLIDr4 zN?@IdTz78{M992DYNnr9BPdEBS6?Rb{l9{Gl-d&4D$g4AIWTUVe#EH8Yr@fn%~>)g zNLu6h@^c!ZZQ3Op$;Pdkm`BoFl5O?QQO0vljTMV24(1-M%k*DYop#z4c5R~svIoNo z%hsaKH{MNS;%^sQGrtr1T9%|B-7Xc_%E%@qL9h|evnbD|f%_ z4aqg{IfuIA)O|@=NxFwC`%hmLX?&O#t|)j~E%NZAp3Qeep@11X@$DbXW4DW3yP1b( z73+>U>D|{%`tYSCNl#)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sOcQ=eDba&{}=lt890KC+rNNO3cvw@#$Vue3b4nFETf@X65#taq;M** z!PI@;qgpvB8n0F}&c#8vYvi@)1`Z-`{HWFxp z1M&L0>*dM4=jG4+E07F4%>!6}^Ge}?b@@OTc4h)=j65HJac0P(Igo{*dI12-1c1!$ zcrvgr3kYDeB!6Zr3_&(B7oG}x@d*e*8^QDP=z zkbnrN!2PO+LPG2U_`OIHdB6(e?YM`6903!|&qKnQIqlW6nuo}-ZhHc+d|-{9gSGh} z5QFvDBXtUZEm{X=?EYfmYyt2V+%TR#0OEa+X={N+y0=#y}f41Cbh5MP9Bq4Ti12zaB* QAV)DUrE9r}Y)sVu0nyJ$g8%>k diff --git a/resources/config/smtp/queue.toml b/resources/config/smtp/queue.toml index 84e6f0d61..79f0f4d0d 100644 --- a/resources/config/smtp/queue.toml +++ b/resources/config/smtp/queue.toml @@ -2,10 +2,6 @@ # SMTP server queue configuration ############################################# -[queue] -path = "%{BASE_PATH}%/queue" -hash = 64 - [queue.schedule] retry = "[2m, 5m, 10m, 15m, 30m, 1h, 2h]" notify = "[1d, 3d]" diff --git a/resources/config/smtp/report.toml b/resources/config/smtp/report.toml index 34c001cad..21fc16e37 100644 --- a/resources/config/smtp/report.toml +++ b/resources/config/smtp/report.toml @@ -3,8 +3,6 @@ ############################################# [report] -path = "%{BASE_PATH}%/reports" -hash = 64 #submitter = "%{HOST}%" [report.analysis]