aboutsummaryrefslogtreecommitdiff
path: root/src/auth.rs
diff options
context:
space:
mode:
authorQuentin Dufour <quentin@deuxfleurs.fr>2024-01-23 21:09:57 +0100
committerQuentin Dufour <quentin@deuxfleurs.fr>2024-01-23 21:09:57 +0100
commit9a265a09e24f6bebf6a6e327da5dd9dfd4dfa866 (patch)
tree549e222a663a4cb4bf04b2d780b95573b9283d34 /src/auth.rs
parentf67f04129afaacc4cdeb69aa79e5c102ec7331bd (diff)
downloadaerogramme-9a265a09e24f6bebf6a6e327da5dd9dfd4dfa866.tar.gz
aerogramme-9a265a09e24f6bebf6a6e327da5dd9dfd4dfa866.zip
WIP Dovecot Authentication Protocol Server
Diffstat (limited to 'src/auth.rs')
-rw-r--r--src/auth.rs32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/auth.rs b/src/auth.rs
new file mode 100644
index 0000000..27ff1e6
--- /dev/null
+++ b/src/auth.rs
@@ -0,0 +1,32 @@
+use std::net::SocketAddr;
+
+/// Seek compatibility with the Dovecot Authentication Protocol
+///
+/// ## Trace
+///
+/// ```text
+/// S: VERSION 1 2
+/// S: MECH PLAIN plaintext
+/// S: MECH LOGIN plaintext
+/// S: SPID 15
+/// S: CUID 17654
+/// S: COOKIE f56692bee41f471ed01bd83520025305
+/// S: DONE
+/// C: VERSION 1 2
+/// C: CPID 1
+/// C: AUTH 2 PLAIN service=smtp
+/// S: CONT 2
+/// C: CONT 2 base64string==
+/// S: OK 2 user=alice@example.tld
+/// ```
+///
+/// ## Dovecot References
+///
+/// https://doc.dovecot.org/developer_manual/design/auth_protocol/
+/// https://doc.dovecot.org/configuration_manual/authentication/authentication_mechanisms/#authentication-authentication-mechanisms
+/// https://doc.dovecot.org/configuration_manual/howto/simple_virtual_install/#simple-virtual-install-smtp-auth
+/// https://doc.dovecot.org/configuration_manual/howto/postfix_and_dovecot_sasl/#howto-postfix-and-dovecot-sasl
+
+pub struct AuthServer {
+ bind_addr: SocketAddr,
+}