Refactor files in a "mail" crate
This commit is contained in:
parent
d3f8a6627c
commit
390bad0ec4
8 changed files with 11 additions and 10 deletions
|
@ -9,7 +9,7 @@ use imap_codec::types::response::{Code, Data, Response as ImapRes, Status};
|
||||||
use crate::imap::command::anonymous;
|
use crate::imap::command::anonymous;
|
||||||
use crate::imap::flow;
|
use crate::imap::flow;
|
||||||
use crate::imap::session::InnerContext;
|
use crate::imap::session::InnerContext;
|
||||||
use crate::mailbox::Mailbox;
|
use crate::mail::Mailbox;
|
||||||
|
|
||||||
const DEFAULT_FLAGS: [Flag; 5] = [
|
const DEFAULT_FLAGS: [Flag; 5] = [
|
||||||
Flag::Seen,
|
Flag::Seen,
|
||||||
|
|
|
@ -9,7 +9,7 @@ use imap_codec::types::sequence::SequenceSet;
|
||||||
use crate::imap::command::authenticated;
|
use crate::imap::command::authenticated;
|
||||||
use crate::imap::flow;
|
use crate::imap::flow;
|
||||||
use crate::imap::session::InnerContext;
|
use crate::imap::session::InnerContext;
|
||||||
use crate::mailbox::Mailbox;
|
use crate::mail::Mailbox;
|
||||||
|
|
||||||
pub async fn dispatch<'a>(
|
pub async fn dispatch<'a>(
|
||||||
inner: InnerContext<'a>,
|
inner: InnerContext<'a>,
|
||||||
|
|
|
@ -2,7 +2,7 @@ use std::error::Error as StdError;
|
||||||
use std::fmt;
|
use std::fmt;
|
||||||
|
|
||||||
use crate::login::Credentials;
|
use crate::login::Credentials;
|
||||||
use crate::mailbox::Mailbox;
|
use crate::mail::Mailbox;
|
||||||
|
|
||||||
pub struct User {
|
pub struct User {
|
||||||
pub name: String,
|
pub name: String,
|
||||||
|
|
|
@ -20,7 +20,7 @@ use smtp_server::{reply, Config, ConnectionMetadata, Decision, MailMetadata, Pro
|
||||||
use crate::config::*;
|
use crate::config::*;
|
||||||
use crate::cryptoblob::*;
|
use crate::cryptoblob::*;
|
||||||
use crate::login::*;
|
use crate::login::*;
|
||||||
use crate::mail_ident::*;
|
use crate::mail::mail_ident::*;
|
||||||
|
|
||||||
pub struct LmtpServer {
|
pub struct LmtpServer {
|
||||||
bind_addr: SocketAddr,
|
bind_addr: SocketAddr,
|
||||||
|
|
|
@ -1,3 +1,6 @@
|
||||||
|
pub mod mail_ident;
|
||||||
|
mod uidindex;
|
||||||
|
|
||||||
use std::convert::TryFrom;
|
use std::convert::TryFrom;
|
||||||
|
|
||||||
use anyhow::Result;
|
use anyhow::Result;
|
||||||
|
@ -7,8 +10,8 @@ use rusoto_s3::S3Client;
|
||||||
use crate::bayou::Bayou;
|
use crate::bayou::Bayou;
|
||||||
use crate::cryptoblob::Key;
|
use crate::cryptoblob::Key;
|
||||||
use crate::login::Credentials;
|
use crate::login::Credentials;
|
||||||
use crate::mail_ident::*;
|
use crate::mail::mail_ident::*;
|
||||||
use crate::uidindex::*;
|
use crate::mail::uidindex::*;
|
||||||
|
|
||||||
pub struct Summary<'a> {
|
pub struct Summary<'a> {
|
||||||
pub validity: ImapUidvalidity,
|
pub validity: ImapUidvalidity,
|
|
@ -4,7 +4,7 @@ use im::{HashMap, HashSet, OrdMap, OrdSet};
|
||||||
use serde::{de::Error, Deserialize, Deserializer, Serialize, Serializer};
|
use serde::{de::Error, Deserialize, Deserializer, Serialize, Serializer};
|
||||||
|
|
||||||
use crate::bayou::*;
|
use crate::bayou::*;
|
||||||
use crate::mail_ident::MailIdent;
|
use crate::mail::mail_ident::MailIdent;
|
||||||
|
|
||||||
pub type ImapUid = NonZeroU32;
|
pub type ImapUid = NonZeroU32;
|
||||||
pub type ImapUidvalidity = NonZeroU32;
|
pub type ImapUidvalidity = NonZeroU32;
|
|
@ -4,11 +4,9 @@ mod cryptoblob;
|
||||||
mod imap;
|
mod imap;
|
||||||
mod lmtp;
|
mod lmtp;
|
||||||
mod login;
|
mod login;
|
||||||
mod mail_ident;
|
mod mail;
|
||||||
mod mailbox;
|
|
||||||
mod server;
|
mod server;
|
||||||
mod time;
|
mod time;
|
||||||
mod uidindex;
|
|
||||||
|
|
||||||
use std::path::PathBuf;
|
use std::path::PathBuf;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue