mirror of
https://github.com/stalwartlabs/mail-server.git
synced 2025-11-08 04:46:22 +08:00
v0.3.7
This commit is contained in:
parent
6404d27dd9
commit
6939603932
16 changed files with 41 additions and 15 deletions
17
CHANGELOG.md
17
CHANGELOG.md
|
|
@ -2,6 +2,23 @@
|
|||
|
||||
All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/).
|
||||
|
||||
## [0.3.7] - 2023-09-05
|
||||
|
||||
## Added
|
||||
- Option to disable IMAP All Messages folder (#68).
|
||||
- Option to allow unencrypted SMTP AUTH (#72)
|
||||
- Support for `rcpt-domain` key in `rcpt.relay` SMTP rule evaluation.
|
||||
|
||||
### Changed
|
||||
|
||||
### Fixed
|
||||
- SMTP strategy `Ipv6thenIpv4` returns only IPv6 addresses (#70)
|
||||
- Invalid IMAP `FETCH` responses for non-UTF-8 messages (#70)
|
||||
- Allow `STATUS` and `ACL` IMAP operations on virtual mailboxes.
|
||||
- IMAP `SELECT QRESYNC` without specifying a UID causes panic (#67)
|
||||
- Milter `DATA` command is sent after headers which causes ClamAV to hang.
|
||||
- Sieve `redirect` of unmodified messages does not work.
|
||||
|
||||
## [0.3.6] - 2023-08-29
|
||||
|
||||
## Added
|
||||
|
|
|
|||
14
Cargo.lock
generated
14
Cargo.lock
generated
|
|
@ -2237,7 +2237,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "imap"
|
||||
version = "0.3.6"
|
||||
version = "0.3.7"
|
||||
dependencies = [
|
||||
"ahash 0.8.3",
|
||||
"dashmap",
|
||||
|
|
@ -2402,7 +2402,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "jmap"
|
||||
version = "0.3.6"
|
||||
version = "0.3.7"
|
||||
dependencies = [
|
||||
"aes",
|
||||
"aes-gcm",
|
||||
|
|
@ -2746,7 +2746,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "mail-server"
|
||||
version = "0.3.6"
|
||||
version = "0.3.7"
|
||||
dependencies = [
|
||||
"directory",
|
||||
"imap",
|
||||
|
|
@ -4605,7 +4605,7 @@ checksum = "62bb4feee49fdd9f707ef802e22365a35de4b7b299de4763d44bfea899442ff9"
|
|||
|
||||
[[package]]
|
||||
name = "smtp"
|
||||
version = "0.3.6"
|
||||
version = "0.3.7"
|
||||
dependencies = [
|
||||
"ahash 0.8.3",
|
||||
"blake3",
|
||||
|
|
@ -4929,7 +4929,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "stalwart-cli"
|
||||
version = "0.3.6"
|
||||
version = "0.3.7"
|
||||
dependencies = [
|
||||
"clap",
|
||||
"console",
|
||||
|
|
@ -4951,7 +4951,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "stalwart-install"
|
||||
version = "0.3.6"
|
||||
version = "0.3.7"
|
||||
dependencies = [
|
||||
"base64 0.21.3",
|
||||
"clap",
|
||||
|
|
@ -5763,7 +5763,7 @@ checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a"
|
|||
|
||||
[[package]]
|
||||
name = "utils"
|
||||
version = "0.3.6"
|
||||
version = "0.3.7"
|
||||
dependencies = [
|
||||
"ahash 0.8.3",
|
||||
"dashmap",
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ authors = ["Stalwart Labs Ltd. <hello@stalw.art>"]
|
|||
license = "AGPL-3.0-only"
|
||||
repository = "https://github.com/stalwartlabs/cli"
|
||||
homepage = "https://github.com/stalwartlabs/cli"
|
||||
version = "0.3.6"
|
||||
version = "0.3.7"
|
||||
edition = "2021"
|
||||
readme = "README.md"
|
||||
resolver = "2"
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
[package]
|
||||
name = "imap"
|
||||
version = "0.3.6"
|
||||
version = "0.3.7"
|
||||
edition = "2021"
|
||||
resolver = "2"
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ authors = ["Stalwart Labs Ltd. <hello@stalw.art>"]
|
|||
license = "AGPL-3.0-only"
|
||||
repository = "https://github.com/stalwartlabs/mail-server"
|
||||
homepage = "https://github.com/stalwartlabs/mail-server"
|
||||
version = "0.3.6"
|
||||
version = "0.3.7"
|
||||
edition = "2021"
|
||||
readme = "README.md"
|
||||
resolver = "2"
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
[package]
|
||||
name = "jmap"
|
||||
version = "0.3.6"
|
||||
version = "0.3.7"
|
||||
edition = "2021"
|
||||
resolver = "2"
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ homepage = "https://stalw.art"
|
|||
keywords = ["imap", "jmap", "smtp", "email", "mail", "server"]
|
||||
categories = ["email"]
|
||||
license = "AGPL-3.0-only"
|
||||
version = "0.3.6"
|
||||
version = "0.3.7"
|
||||
edition = "2021"
|
||||
resolver = "2"
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ homepage = "https://stalw.art/smtp"
|
|||
keywords = ["smtp", "email", "mail", "server"]
|
||||
categories = ["email"]
|
||||
license = "AGPL-3.0-only"
|
||||
version = "0.3.6"
|
||||
version = "0.3.7"
|
||||
edition = "2021"
|
||||
resolver = "2"
|
||||
|
||||
|
|
|
|||
|
|
@ -225,6 +225,7 @@ pub struct Auth {
|
|||
pub directory: IfBlock<Option<MaybeDynValue<dyn Directory>>>,
|
||||
pub mechanisms: IfBlock<u64>,
|
||||
pub require: IfBlock<bool>,
|
||||
pub allow_plain_text: IfBlock<bool>,
|
||||
pub errors_max: IfBlock<usize>,
|
||||
pub errors_wait: IfBlock<Duration>,
|
||||
}
|
||||
|
|
|
|||
|
|
@ -284,6 +284,9 @@ impl ConfigSession for Config {
|
|||
errors_wait: self
|
||||
.parse_if_block("session.auth.errors.wait", ctx, &available_keys)?
|
||||
.unwrap_or_else(|| IfBlock::new(Duration::from_secs(30))),
|
||||
allow_plain_text: self
|
||||
.parse_if_block("session.auth.allow-plain-text", ctx, &available_keys)?
|
||||
.unwrap_or_else(|| IfBlock::new(false)),
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -225,6 +225,7 @@ pub struct SessionParameters {
|
|||
pub auth_require: bool,
|
||||
pub auth_errors_max: usize,
|
||||
pub auth_errors_wait: Duration,
|
||||
pub auth_plain_text: bool,
|
||||
|
||||
// Rcpt parameters
|
||||
pub rcpt_errors_max: usize,
|
||||
|
|
@ -426,6 +427,7 @@ impl Session<NullIo> {
|
|||
auth_require: Default::default(),
|
||||
auth_errors_max: Default::default(),
|
||||
auth_errors_wait: Default::default(),
|
||||
auth_plain_text: false,
|
||||
rcpt_errors_max: Default::default(),
|
||||
rcpt_errors_wait: Default::default(),
|
||||
rcpt_max: Default::default(),
|
||||
|
|
|
|||
|
|
@ -48,6 +48,7 @@ impl<T: AsyncRead + AsyncWrite> Session<T> {
|
|||
self.params.auth_require = *ac.require.eval(self).await;
|
||||
self.params.auth_errors_max = *ac.errors_max.eval(self).await;
|
||||
self.params.auth_errors_wait = *ac.errors_wait.eval(self).await;
|
||||
self.params.auth_plain_text = *ac.allow_plain_text.eval(self).await;
|
||||
|
||||
// VRFY/EXPN parameters
|
||||
let ec = &self.core.session.config.extensions;
|
||||
|
|
|
|||
|
|
@ -170,7 +170,7 @@ impl<T: AsyncWrite + AsyncRead + IsTls + Unpin> Session<T> {
|
|||
if self.data.authenticated_as.is_empty() {
|
||||
response.auth_mechanisms = *ac.mechanisms.eval(self).await;
|
||||
if response.auth_mechanisms != 0 {
|
||||
if !self.stream.is_tls() {
|
||||
if !self.stream.is_tls() && !self.params.auth_plain_text {
|
||||
response.auth_mechanisms &= !(AUTH_PLAIN | AUTH_LOGIN);
|
||||
}
|
||||
if response.auth_mechanisms != 0 {
|
||||
|
|
|
|||
|
|
@ -103,6 +103,7 @@ impl<T: AsyncWrite + AsyncRead + IsTls + Unpin> Session<T> {
|
|||
self.write(b"503 5.5.1 Already authenticated.\r\n").await?;
|
||||
} else if mechanism & (AUTH_LOGIN | AUTH_PLAIN) != 0
|
||||
&& !self.stream.is_tls()
|
||||
&& !self.params.auth_plain_text
|
||||
{
|
||||
self.write(b"503 5.5.1 Clear text authentication without TLS is forbidden.\r\n").await?;
|
||||
} else if let Some(mut token) =
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
[package]
|
||||
name = "utils"
|
||||
version = "0.3.6"
|
||||
version = "0.3.7"
|
||||
edition = "2021"
|
||||
resolver = "2"
|
||||
|
||||
|
|
|
|||
|
|
@ -236,6 +236,7 @@ impl TestConfig for SessionConfig {
|
|||
require: IfBlock::new(false),
|
||||
errors_max: IfBlock::new(10),
|
||||
errors_wait: IfBlock::new(Duration::from_secs(1)),
|
||||
allow_plain_text: IfBlock::new(false),
|
||||
},
|
||||
mail: Mail {
|
||||
script: IfBlock::new(None),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue