Sieve: Allow User Sieve scripts to access orcpt

This commit is contained in:
Maurus Decimus
2026-05-19 17:40:45 +02:00
parent e54221dde6
commit f048e0f0bb
5 changed files with 7 additions and 0 deletions

View File

@@ -30,6 +30,7 @@ pub struct IngestMessage {
#[derive(Debug)]
pub struct IngestRecipient {
pub address: String,
pub orcpt: Option<String>,
pub is_spam: bool,
}

View File

@@ -129,6 +129,9 @@ impl SieveScriptIngest for Server {
// Set envelope
instance.set_envelope(Envelope::From, envelope_from);
instance.set_envelope(Envelope::To, envelope_to.address.as_str());
if let Some(orcpt) = &envelope_to.orcpt {
instance.set_envelope(Envelope::Orcpt, orcpt.as_str());
}
instance.set_spam_status(if envelope_to.is_spam {
SpamStatus::Spam
} else {