aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/imap/command/authenticated.rs8
-rw-r--r--src/imap/command/examined.rs6
-rw-r--r--src/imap/command/selected.rs18
-rw-r--r--src/imap/mailbox_view.rs15
-rw-r--r--src/lmtp.rs4
-rw-r--r--src/mail/incoming.rs7
-rw-r--r--src/mail/mailbox.rs2
7 files changed, 27 insertions, 33 deletions
diff --git a/src/imap/command/authenticated.rs b/src/imap/command/authenticated.rs
index f46dfb4..e7198ee 100644
--- a/src/imap/command/authenticated.rs
+++ b/src/imap/command/authenticated.rs
@@ -165,21 +165,21 @@ impl<'a> AuthenticatedContext<'a> {
async fn status(
self,
mailbox: &MailboxCodec,
- attributes: &[StatusAttribute],
+ _attributes: &[StatusAttribute],
) -> Result<(Response, flow::Transition)> {
- let name = String::try_from(mailbox.clone())?;
+ let _name = String::try_from(mailbox.clone())?;
Ok((Response::bad("Not implemented")?, flow::Transition::None))
}
async fn subscribe(self, mailbox: &MailboxCodec) -> Result<(Response, flow::Transition)> {
- let name = String::try_from(mailbox.clone())?;
+ let _name = String::try_from(mailbox.clone())?;
Ok((Response::bad("Not implemented")?, flow::Transition::None))
}
async fn unsubscribe(self, mailbox: &MailboxCodec) -> Result<(Response, flow::Transition)> {
- let name = String::try_from(mailbox.clone())?;
+ let _name = String::try_from(mailbox.clone())?;
Ok((
Response::bad("Aerogramme does not support unsubscribing from a mailbox")?,
diff --git a/src/imap/command/examined.rs b/src/imap/command/examined.rs
index 91ad950..9dba680 100644
--- a/src/imap/command/examined.rs
+++ b/src/imap/command/examined.rs
@@ -71,9 +71,9 @@ impl<'a> ExaminedContext<'a> {
pub async fn search(
self,
- charset: &Option<Charset>,
- criteria: &SearchKey,
- uid: &bool,
+ _charset: &Option<Charset>,
+ _criteria: &SearchKey,
+ _uid: &bool,
) -> Result<(Response, flow::Transition)> {
Ok((Response::bad("Not implemented")?, flow::Transition::None))
}
diff --git a/src/imap/command/selected.rs b/src/imap/command/selected.rs
index bb78cbd..848302c 100644
--- a/src/imap/command/selected.rs
+++ b/src/imap/command/selected.rs
@@ -4,7 +4,7 @@ use anyhow::Result;
use boitalettres::proto::Request;
use boitalettres::proto::Response;
use imap_codec::types::command::CommandBody;
-use imap_codec::types::fetch_attributes::MacroOrFetchAttributes;
+
use imap_codec::types::flag::{Flag, StoreResponse, StoreType};
use imap_codec::types::mailbox::Mailbox as MailboxCodec;
@@ -67,20 +67,20 @@ impl<'a> SelectedContext<'a> {
async fn store(
self,
- sequence_set: &SequenceSet,
- kind: &StoreType,
- response: &StoreResponse,
- flags: &[Flag],
- uid: &bool,
+ _sequence_set: &SequenceSet,
+ _kind: &StoreType,
+ _response: &StoreResponse,
+ _flags: &[Flag],
+ _uid: &bool,
) -> Result<(Response, flow::Transition)> {
Ok((Response::bad("Not implemented")?, flow::Transition::None))
}
async fn copy(
self,
- sequence_set: &SequenceSet,
- mailbox: &MailboxCodec,
- uid: &bool,
+ _sequence_set: &SequenceSet,
+ _mailbox: &MailboxCodec,
+ _uid: &bool,
) -> Result<(Response, flow::Transition)> {
Ok((Response::bad("Not implemented")?, flow::Transition::None))
}
diff --git a/src/imap/mailbox_view.rs b/src/imap/mailbox_view.rs
index b8fca53..a73bdf7 100644
--- a/src/imap/mailbox_view.rs
+++ b/src/imap/mailbox_view.rs
@@ -1,6 +1,5 @@
-use std::borrow::{Borrow, Cow};
-use std::collections::HashMap;
-use std::io::{BufRead, Cursor};
+use std::borrow::Cow;
+
use std::num::NonZeroU32;
use std::sync::Arc;
@@ -10,7 +9,7 @@ use chrono::{Offset, TimeZone, Utc};
use futures::stream::{FuturesOrdered, StreamExt};
use imap_codec::types::address::Address;
use imap_codec::types::body::{BasicFields, Body as FetchBody, BodyStructure, SpecificFields};
-use imap_codec::types::core::{Atom, IString, NString, NonZeroBytes};
+use imap_codec::types::core::{Atom, IString, NString};
use imap_codec::types::datetime::MyDateTime;
use imap_codec::types::envelope::Envelope;
use imap_codec::types::fetch_attributes::{FetchAttribute, MacroOrFetchAttributes};
@@ -287,9 +286,9 @@ impl MailboxView {
build_imap_email_struct(&parsed, &parsed.structure)?,
)),
FetchAttribute::BodyExt {
- section,
- partial,
- peek,
+ section: _,
+ partial: _,
+ peek: _,
} => {
// @TODO This is a stub
let is = IString::try_from("test").unwrap();
@@ -579,7 +578,7 @@ fn build_imap_email_struct<'a>(
})
}
MessagePart::Binary(bp) | MessagePart::InlineBinary(bp) => {
- let (_, mut basic) = headers_to_basic_fields(bp)?;
+ let (_, basic) = headers_to_basic_fields(bp)?;
let ct = bp
.get_content_type()
diff --git a/src/lmtp.rs b/src/lmtp.rs
index 05bb68c..28194e3 100644
--- a/src/lmtp.rs
+++ b/src/lmtp.rs
@@ -1,4 +1,3 @@
-use std::collections::HashMap;
use std::net::SocketAddr;
use std::{pin::Pin, sync::Arc};
@@ -8,7 +7,6 @@ use duplexify::Duplex;
use futures::{io, AsyncRead, AsyncReadExt, AsyncWrite};
use futures::{stream, stream::FuturesUnordered, StreamExt};
use log::*;
-use rusoto_s3::{PutObjectRequest, S3};
use tokio::net::TcpListener;
use tokio::select;
use tokio::sync::watch;
@@ -18,10 +16,8 @@ use smtp_message::{Email, EscapedDataReader, Reply, ReplyCode};
use smtp_server::{reply, Config, ConnectionMetadata, Decision, MailMetadata};
use crate::config::*;
-use crate::cryptoblob::*;
use crate::login::*;
use crate::mail::incoming::EncryptedMessage;
-use crate::mail::unique_ident::*;
pub struct LmtpServer {
bind_addr: SocketAddr,
diff --git a/src/mail/incoming.rs b/src/mail/incoming.rs
index 3a1e4f9..f64b9f3 100644
--- a/src/mail/incoming.rs
+++ b/src/mail/incoming.rs
@@ -1,15 +1,14 @@
use std::collections::HashMap;
use std::convert::TryFrom;
-use std::pin::Pin;
+
use std::sync::{Arc, Weak};
use std::time::Duration;
use anyhow::{anyhow, bail, Result};
-use futures::{future::BoxFuture, Future, FutureExt};
+use futures::{future::BoxFuture, FutureExt};
use k2v_client::{CausalValue, CausalityToken, K2vClient, K2vValue};
use rusoto_s3::{
- DeleteObjectRequest, GetObjectRequest, HeadObjectRequest, ListObjectsV2Request,
- PutObjectRequest, S3Client, S3,
+ DeleteObjectRequest, GetObjectRequest, ListObjectsV2Request, PutObjectRequest, S3Client, S3,
};
use tokio::io::AsyncReadExt;
use tokio::sync::watch;
diff --git a/src/mail/mailbox.rs b/src/mail/mailbox.rs
index 7389173..efe98fd 100644
--- a/src/mail/mailbox.rs
+++ b/src/mail/mailbox.rs
@@ -125,7 +125,7 @@ impl Mailbox {
bail!("Cannot copy into same mailbox");
}
- let (mut selflock, mut fromlock);
+ let (mut selflock, fromlock);
if self.id < from.id {
selflock = self.mbox.write().await;
fromlock = from.mbox.write().await;