MTA: Do not convert e-mail local parts to lowercase (fixes #1916)
This commit is contained in:
@@ -294,7 +294,7 @@ impl QueueManagement for Server {
|
||||
Status::Scheduled | Status::TemporaryFailure(_)
|
||||
) && item
|
||||
.as_ref()
|
||||
.is_none_or(|item| recipient.address.contains(item))
|
||||
.is_none_or(|item| recipient.address().contains(item))
|
||||
{
|
||||
recipient.retry.due = time;
|
||||
if recipient
|
||||
@@ -383,7 +383,7 @@ impl QueueManagement for Server {
|
||||
if let Some(item) = params.get("filter") {
|
||||
// Cancel delivery for all recipients that match
|
||||
for rcpt in &mut message.message.recipients {
|
||||
if rcpt.address.contains(item) {
|
||||
if rcpt.address().contains(item) {
|
||||
rcpt.status = Status::PermanentFailure(ErrorDetails {
|
||||
entity: "localhost".to_string(),
|
||||
details: queue::Error::Io("Delivery canceled.".to_string()),
|
||||
@@ -585,7 +585,7 @@ impl Message {
|
||||
.recipients
|
||||
.iter()
|
||||
.map(|rcpt| Recipient {
|
||||
address: rcpt.address.to_string(),
|
||||
address: rcpt.address().to_string(),
|
||||
queue: rcpt.queue.to_string(),
|
||||
status: match &rcpt.status {
|
||||
ArchivedStatus::Scheduled => Status::Scheduled,
|
||||
@@ -685,13 +685,16 @@ async fn fetch_queued_messages(
|
||||
.as_ref()
|
||||
.map(|text| {
|
||||
message.return_path.contains(text)
|
||||
|| message.recipients.iter().any(|r| r.address.contains(text))
|
||||
|| message
|
||||
.recipients
|
||||
.iter()
|
||||
.any(|r| r.address().contains(text))
|
||||
})
|
||||
.unwrap_or_else(|| {
|
||||
from.as_ref()
|
||||
.is_none_or(|from| message.return_path.contains(from))
|
||||
&& to.as_ref().is_none_or(|to| {
|
||||
message.recipients.iter().any(|r| r.address.contains(to))
|
||||
message.recipients.iter().any(|r| r.address().contains(to))
|
||||
})
|
||||
})
|
||||
&& before.as_ref().is_none_or(|before| {
|
||||
|
||||
Reference in New Issue
Block a user