mirror of
https://github.com/stalwartlabs/mail-server.git
synced 2025-11-09 21:31:12 +08:00
TLS reports being issued for sent TLS reports (infinite loop) (closes #1301)
This commit is contained in:
parent
d1f5010378
commit
01ca8e2e3b
3 changed files with 6 additions and 3 deletions
|
|
@ -42,7 +42,7 @@ use crate::{
|
|||
};
|
||||
|
||||
use super::{NextHop, TlsStrategy, lookup::ToNextHop, mta_sts, session::SessionParams};
|
||||
use crate::queue::{Domain, Error, QueueEnvelope, QueuedMessage, Status};
|
||||
use crate::queue::{Domain, Error, FROM_REPORT, QueueEnvelope, QueuedMessage, Status};
|
||||
|
||||
impl QueuedMessage {
|
||||
pub fn try_deliver(self, server: Server) {
|
||||
|
|
@ -300,7 +300,7 @@ impl QueuedMessage {
|
|||
interval @ (AggregateFrequency::Hourly
|
||||
| AggregateFrequency::Daily
|
||||
| AggregateFrequency::Weekly)
|
||||
if is_smtp =>
|
||||
if is_smtp && (message.flags & FROM_REPORT == 0) =>
|
||||
{
|
||||
let time = Instant::now();
|
||||
match server
|
||||
|
|
|
|||
|
|
@ -121,6 +121,8 @@ pub struct Recipient {
|
|||
pub orcpt: Option<String>,
|
||||
}
|
||||
|
||||
pub const FROM_REPORT: u64 = 1 << 32;
|
||||
|
||||
pub const RCPT_DSN_SENT: u64 = 1 << 32;
|
||||
pub const RCPT_STATUS_CHANGED: u64 = 2 << 32;
|
||||
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ use tokio::io::{AsyncRead, AsyncWrite};
|
|||
use crate::{
|
||||
core::Session,
|
||||
inbound::DkimSign,
|
||||
queue::{DomainPart, Message, MessageSource, spool::SmtpSpool},
|
||||
queue::{DomainPart, FROM_REPORT, Message, MessageSource, spool::SmtpSpool},
|
||||
};
|
||||
|
||||
pub mod analysis;
|
||||
|
|
@ -149,6 +149,7 @@ impl SmtpReporting for Server {
|
|||
}
|
||||
|
||||
// Queue message
|
||||
message.flags |= FROM_REPORT;
|
||||
message
|
||||
.queue(
|
||||
signature.as_deref(),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue