core: send processed mail after filters instead of original
parent
2f939cb104
commit
8ba1408822
|
@ -570,9 +570,10 @@ impl Database {
|
|||
trace!("result {:#?}", result);
|
||||
|
||||
let Post { bytes, action, .. } = post;
|
||||
let post_env = melib::Envelope::from_bytes(&bytes, None)?;
|
||||
match action {
|
||||
PostAction::Accept => {
|
||||
let _post_pk = self.insert_post(list_ctx.list.pk, raw, env)?;
|
||||
let _post_pk = self.insert_post(list_ctx.list.pk, &bytes, &post_env)?;
|
||||
for job in list_ctx.scheduled_jobs.iter() {
|
||||
if let crate::mail::MailJob::Send { recipients } = job {
|
||||
if !recipients.is_empty() {
|
||||
|
|
|
@ -109,7 +109,9 @@ impl PostFilter for AddListHeaders {
|
|||
trace!("Running AddListHeaders filter");
|
||||
let (mut headers, body) = melib::email::parser::mail(&post.bytes).unwrap();
|
||||
let list_id = ctx.list.list_id();
|
||||
let reply_to = format!("<{}>", ctx.list.address);
|
||||
headers.push((&b"List-ID"[..], list_id.as_bytes()));
|
||||
headers.push((&b"Reply-To"[..], reply_to.as_bytes()));
|
||||
let list_post = ctx.list.list_post();
|
||||
let list_unsubscribe = ctx.list.list_unsubscribe();
|
||||
let list_archive = ctx.list.list_archive();
|
||||
|
|
Loading…
Reference in New Issue