From 7945051eac33e99ad2d3fdeb69f80b4d67eb67ce Mon Sep 17 00:00:00 2001 From: Michael Zhang Date: Mon, 9 Aug 2021 06:56:32 -0500 Subject: [PATCH] smtp crate --- Cargo.lock | 7 +++++++ Cargo.toml | 1 + daemon/Cargo.toml | 2 +- smtp/Cargo.toml | 16 ++++++++++++++++ smtp/README.md | 3 +++ smtp/src/lib.rs | 1 + smtp/src/proto/mod.rs | 3 +++ 7 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 smtp/Cargo.toml create mode 100644 smtp/README.md create mode 100644 smtp/src/lib.rs create mode 100644 smtp/src/proto/mod.rs diff --git a/Cargo.lock b/Cargo.lock index 4b37518..8cf74c2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -678,6 +678,13 @@ dependencies = [ "webpki-roots", ] +[[package]] +name = "panorama-smtp" +version = "0.0.1" +dependencies = [ + "nom", +] + [[package]] name = "parking_lot" version = "0.11.1" diff --git a/Cargo.toml b/Cargo.toml index 2c6949d..e07f8bd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,6 +2,7 @@ members = [ "daemon", "imap", + "smtp", ] [profile.release] diff --git a/daemon/Cargo.toml b/daemon/Cargo.toml index 789cfdf..a984679 100644 --- a/daemon/Cargo.toml +++ b/daemon/Cargo.toml @@ -17,4 +17,4 @@ stderrlog = "0.5.1" tokio = { version = "1.9.0", features = ["full"] } tokio-rustls = "0.22.0" toml = "0.5.8" -xdg = "2.2.0" \ No newline at end of file +xdg = "2.2.0" diff --git a/smtp/Cargo.toml b/smtp/Cargo.toml new file mode 100644 index 0000000..6584cc0 --- /dev/null +++ b/smtp/Cargo.toml @@ -0,0 +1,16 @@ +[package] +name = "panorama-smtp" +description = "SMTP protocol implementation with high-level async client." +version = "0.0.1" +edition = "2018" +authors = ["Michael Zhang "] +keywords = ["smtp", "email", "parser"] +license = "GPL-3.0-or-later" +categories = ["email"] +repository = "https://git.mzhang.io/michael/panorama" +documentation = "https://docs.rs/panorama-smtp" +readme = "README.md" +workspace = ".." + +[dependencies] +nom = "6.2.1" diff --git a/smtp/README.md b/smtp/README.md new file mode 100644 index 0000000..be08366 --- /dev/null +++ b/smtp/README.md @@ -0,0 +1,3 @@ +panorama-smtp +=== + diff --git a/smtp/src/lib.rs b/smtp/src/lib.rs new file mode 100644 index 0000000..3e1772e --- /dev/null +++ b/smtp/src/lib.rs @@ -0,0 +1 @@ +pub mod proto; \ No newline at end of file diff --git a/smtp/src/proto/mod.rs b/smtp/src/proto/mod.rs new file mode 100644 index 0000000..d3756d1 --- /dev/null +++ b/smtp/src/proto/mod.rs @@ -0,0 +1,3 @@ +//! Helper functions for manipulating the wire protocol. + +#![allow(non_snake_case, dead_code)]