Skip to content

Commit

Permalink
v0.4.2
Browse files Browse the repository at this point in the history
  • Loading branch information
mdecimus committed Nov 1, 2023
1 parent ee088d5 commit df45384
Show file tree
Hide file tree
Showing 94 changed files with 3,024 additions and 489 deletions.
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,19 @@

All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/).

## [0.4.2] - 2023-11-01

## Added
- JMAP for Quotas support ([RFC9425](https://www.rfc-editor.org/rfc/rfc9425.html))
- JMAP Blob Management Extension support ([RFC9404](https://www.rfc-editor.org/rfc/rfc9404.html))
- Spam Filter - Empty header rules.

### Changed

### Fixed
- Daylight savings time support for crontabs.
- JMAP `oldState` doesn’t reflect in `*/changes` (#56)

## [0.4.1] - 2023-10-26

## Added
Expand Down
19 changes: 10 additions & 9 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ Key features:
- **JMAP** server:
- JMAP Core ([RFC 8620](https://datatracker.ietf.org/doc/html/rfc8620))
- JMAP Mail ([RFC 8621](https://datatracker.ietf.org/doc/html/rfc8621))
- JMAP over WebSocket ([RFC 8887](https://datatracker.ietf.org/doc/html/rfc8887))
- JMAP for Sieve Scripts ([DRAFT-SIEVE-13](https://www.ietf.org/archive/id/draft-ietf-jmap-sieve-13.html))
- JMAP for Sieve Scripts ([DRAFT-SIEVE-15](https://www.ietf.org/archive/id/draft-ietf-jmap-sieve-15.html))
- JMAP over WebSocket ([RFC 8887](https://datatracker.ietf.org/doc/html/rfc8887)), JMAP Blob Management ([RFC9404](https://www.rfc-editor.org/rfc/rfc9404.html)) and JMAP for Quotas ([RFC9425](https://www.rfc-editor.org/rfc/rfc9425.html)) extensions.
- **IMAP4** server:
- IMAP4rev2 ([RFC 9051](https://datatracker.ietf.org/doc/html/rfc9051)) full compliance.
- IMAP4rev1 ([RFC 3501](https://datatracker.ietf.org/doc/html/rfc3501)) backwards compatible.
Expand Down
7 changes: 7 additions & 0 deletions UPGRADING.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
Upgrading from `v0.4.0` to `v0.4.2`
-----------------------------------

- Replace the binary with the new version.
- Restart the service.


Upgrading from `v0.3.x` to `v0.4.0`
-----------------------------------

Expand Down
2 changes: 1 addition & 1 deletion crates/cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ authors = ["Stalwart Labs Ltd. <[email protected]>"]
license = "AGPL-3.0-only"
repository = "https://github.com/stalwartlabs/cli"
homepage = "https://github.com/stalwartlabs/cli"
version = "0.4.0"
version = "0.4.2"
edition = "2021"
readme = "README.md"
resolver = "2"
Expand Down
2 changes: 1 addition & 1 deletion crates/imap/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "imap"
version = "0.4.0"
version = "0.4.2"
edition = "2021"
resolver = "2"

Expand Down
4 changes: 2 additions & 2 deletions crates/imap/src/op/acl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ use jmap_proto::{
object::{index::ObjectIndexBuilder, Object},
types::{
acl::Acl, collection::Collection, id::Id, property::Property, state::StateChange,
type_state::TypeState, value::Value,
type_state::DataType, value::Value,
},
};
use store::write::{assert::HashedValue, log::ChangeLogBuilder, BatchBuilder};
Expand Down Expand Up @@ -434,7 +434,7 @@ impl<T: AsyncRead> Session<T> {
data.jmap
.broadcast_state_change(
StateChange::new(mailbox.account_id)
.with_change(TypeState::Mailbox, change_id),
.with_change(DataType::Mailbox, change_id),
)
.await;
}
Expand Down
8 changes: 4 additions & 4 deletions crates/imap/src/op/append.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ use imap_proto::{
};

use jmap::email::ingest::IngestEmail;
use jmap_proto::types::{acl::Acl, keyword::Keyword, state::StateChange, type_state::TypeState};
use jmap_proto::types::{acl::Acl, keyword::Keyword, state::StateChange, type_state::DataType};
use mail_parser::MessageParser;
use tokio::io::AsyncRead;

Expand Down Expand Up @@ -173,9 +173,9 @@ impl SessionData {
self.jmap
.broadcast_state_change(
StateChange::new(account_id)
.with_change(TypeState::Email, change_id)
.with_change(TypeState::Mailbox, change_id)
.with_change(TypeState::Thread, change_id),
.with_change(DataType::Email, change_id)
.with_change(DataType::Mailbox, change_id)
.with_change(DataType::Thread, change_id),
)
.await;
}
Expand Down
12 changes: 6 additions & 6 deletions crates/imap/src/op/copy_move.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ use jmap_proto::{
error::{method::MethodError, set::SetErrorType},
types::{
acl::Acl, collection::Collection, id::Id, property::Property, state::StateChange,
type_state::TypeState,
type_state::DataType,
},
};
use store::write::{assert::HashedValue, log::ChangeLogBuilder, BatchBuilder, F_VALUE};
Expand Down Expand Up @@ -400,9 +400,9 @@ impl SessionData {
self.jmap
.broadcast_state_change(
StateChange::new(dest_account_id)
.with_change(TypeState::Email, change_id)
.with_change(TypeState::Thread, change_id)
.with_change(TypeState::Mailbox, change_id),
.with_change(DataType::Email, change_id)
.with_change(DataType::Thread, change_id)
.with_change(DataType::Mailbox, change_id),
)
.await;
}
Expand All @@ -420,8 +420,8 @@ impl SessionData {
self.jmap
.broadcast_state_change(
StateChange::new(src_mailbox.id.account_id)
.with_change(TypeState::Email, change_id)
.with_change(TypeState::Mailbox, change_id),
.with_change(DataType::Email, change_id)
.with_change(DataType::Mailbox, change_id),
)
.await;
}
Expand Down
4 changes: 2 additions & 2 deletions crates/imap/src/op/create.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ use jmap_proto::{
object::{index::ObjectIndexBuilder, Object},
types::{
acl::Acl, collection::Collection, id::Id, property::Property, state::StateChange,
type_state::TypeState, value::Value,
type_state::DataType, value::Value,
},
};
use store::{query::Filter, write::BatchBuilder};
Expand Down Expand Up @@ -132,7 +132,7 @@ impl SessionData {
// Broadcast changes
self.jmap
.broadcast_state_change(
StateChange::new(params.account_id).with_change(TypeState::Mailbox, change_id),
StateChange::new(params.account_id).with_change(DataType::Mailbox, change_id),
)
.await;

Expand Down
10 changes: 5 additions & 5 deletions crates/imap/src/op/delete.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
use imap_proto::{
protocol::delete::Arguments, receiver::Request, Command, ResponseCode, StatusResponse,
};
use jmap_proto::types::{state::StateChange, type_state::TypeState};
use jmap_proto::types::{state::StateChange, type_state::DataType};
use store::write::log::ChangeLogBuilder;
use tokio::io::AsyncRead;

Expand Down Expand Up @@ -109,11 +109,11 @@ impl SessionData {
self.jmap
.broadcast_state_change(if did_remove_emails {
StateChange::new(account_id)
.with_change(TypeState::Mailbox, change_id)
.with_change(TypeState::Email, change_id)
.with_change(TypeState::Thread, change_id)
.with_change(DataType::Mailbox, change_id)
.with_change(DataType::Email, change_id)
.with_change(DataType::Thread, change_id)
} else {
StateChange::new(account_id).with_change(TypeState::Mailbox, change_id)
StateChange::new(account_id).with_change(DataType::Mailbox, change_id)
})
.await;

Expand Down
8 changes: 4 additions & 4 deletions crates/imap/src/op/expunge.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ use jmap_proto::{
error::method::MethodError,
types::{
acl::Acl, collection::Collection, id::Id, keyword::Keyword, property::Property,
state::StateChange, type_state::TypeState,
state::StateChange, type_state::DataType,
},
};
use store::write::{assert::HashedValue, log::ChangeLogBuilder, BatchBuilder, F_VALUE};
Expand Down Expand Up @@ -247,9 +247,9 @@ impl SessionData {
self.jmap
.broadcast_state_change(
StateChange::new(account_id)
.with_change(TypeState::Email, change_id)
.with_change(TypeState::Mailbox, change_id)
.with_change(TypeState::Thread, change_id),
.with_change(DataType::Email, change_id)
.with_change(DataType::Mailbox, change_id)
.with_change(DataType::Thread, change_id),
)
.await;
}
Expand Down
4 changes: 2 additions & 2 deletions crates/imap/src/op/fetch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ use jmap_proto::{
object::Object,
types::{
acl::Acl, blob::BlobId, collection::Collection, id::Id, keyword::Keyword,
property::Property, state::StateChange, type_state::TypeState, value::Value,
property::Property, state::StateChange, type_state::DataType, value::Value,
},
};
use mail_parser::{Address, GetHeader, HeaderName, Message, MessageParser, PartType};
Expand Down Expand Up @@ -569,7 +569,7 @@ impl SessionData {
modseq = change_id.into();
self.jmap
.broadcast_state_change(
StateChange::new(account_id).with_change(TypeState::Email, change_id),
StateChange::new(account_id).with_change(DataType::Email, change_id),
)
.await;
}
Expand Down
14 changes: 5 additions & 9 deletions crates/imap/src/op/idle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ use imap_proto::{
Command, ResponseCode, StatusResponse,
};

use jmap_proto::types::{collection::Collection, type_state::TypeState};
use jmap_proto::types::{collection::Collection, type_state::DataType};
use store::query::log::Query;
use tokio::io::{AsyncRead, AsyncReadExt};
use utils::map::bitmap::Bitmap;
Expand All @@ -46,16 +46,12 @@ impl<T: AsyncRead> Session<T> {
pub async fn handle_idle(&mut self, request: Request<Command>) -> crate::OpResult {
let (data, mailbox, types) = match &self.state {
State::Authenticated { data, .. } => {
(data.clone(), None, Bitmap::from_iter([TypeState::Mailbox]))
(data.clone(), None, Bitmap::from_iter([DataType::Mailbox]))
}
State::Selected { data, mailbox, .. } => (
data.clone(),
mailbox.clone().into(),
Bitmap::from_iter([
TypeState::Email,
TypeState::Mailbox,
TypeState::EmailDelivery,
]),
Bitmap::from_iter([DataType::Email, DataType::Mailbox, DataType::EmailDelivery]),
),
_ => unreachable!(),
};
Expand Down Expand Up @@ -120,10 +116,10 @@ impl<T: AsyncRead> Session<T> {

for (type_state, _) in state_change.types {
match type_state {
TypeState::Email | TypeState::EmailDelivery => {
DataType::Email | DataType::EmailDelivery => {
has_email_changes = true;
}
TypeState::Mailbox => {
DataType::Mailbox => {
has_mailbox_changes = true;
}
_ => {}
Expand Down
4 changes: 2 additions & 2 deletions crates/imap/src/op/rename.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ use jmap_proto::{
object::{index::ObjectIndexBuilder, Object},
types::{
acl::Acl, collection::Collection, id::Id, property::Property, state::StateChange,
type_state::TypeState, value::Value,
type_state::DataType, value::Value,
},
};
use store::write::{assert::HashedValue, BatchBuilder};
Expand Down Expand Up @@ -203,7 +203,7 @@ impl SessionData {
// Broadcast changes
self.jmap
.broadcast_state_change(
StateChange::new(params.account_id).with_change(TypeState::Mailbox, change_id),
StateChange::new(params.account_id).with_change(DataType::Mailbox, change_id),
)
.await;

Expand Down
8 changes: 4 additions & 4 deletions crates/imap/src/op/store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ use jmap_proto::{
error::method::MethodError,
types::{
acl::Acl, collection::Collection, id::Id, keyword::Keyword, property::Property,
state::StateChange, type_state::TypeState,
state::StateChange, type_state::DataType,
},
};
use store::{
Expand Down Expand Up @@ -353,10 +353,10 @@ impl SessionData {
self.jmap
.broadcast_state_change(if !changed_mailboxes.is_empty() {
StateChange::new(account_id)
.with_change(TypeState::Email, change_id)
.with_change(TypeState::Mailbox, change_id)
.with_change(DataType::Email, change_id)
.with_change(DataType::Mailbox, change_id)
} else {
StateChange::new(account_id).with_change(TypeState::Email, change_id)
StateChange::new(account_id).with_change(DataType::Email, change_id)
})
.await;
}
Expand Down
Loading

0 comments on commit df45384

Please sign in to comment.