Submissions say when DLP held the message
An EmailSubmission create's response carries inbuxa:held (dlp-and-mail-flow-rules spec, §2.6, §4): true when the message is held for review, false otherwise, so the webmail can say so at once. A sender can't read the review queue, and a held message's sendAt is its real send time, not the century-off release, so this is how the sender learns. mail_rules_tests checks both values.
This commit is contained in:
@@ -91,6 +91,13 @@ impl EmailSubmissionSet for Server {
|
||||
);
|
||||
|
||||
let send_at = submission.send_at;
|
||||
// inbuxa: DLP (§2.6): the sender learns it's held
|
||||
let held = match submission.queue_id {
|
||||
Some(queue_id) => {
|
||||
inbuxa_features::mailflow::held::is_held(self.store(), queue_id).await?
|
||||
}
|
||||
None => false,
|
||||
};
|
||||
let undo_status = match submission.undo_status {
|
||||
UndoStatus::Pending => email_submission::UndoStatus::Pending,
|
||||
UndoStatus::Final => email_submission::UndoStatus::Final,
|
||||
@@ -128,7 +135,8 @@ impl EmailSubmissionSet for Server {
|
||||
.with_key_value(
|
||||
EmailSubmissionProperty::UndoStatus,
|
||||
Value::Element(EmailSubmissionValue::UndoStatus(undo_status)),
|
||||
),
|
||||
)
|
||||
.with_key_value(EmailSubmissionProperty::DlpHeld, Value::Bool(held)),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user