Expand description

Filters to pass each mailing list post through. Filters are functions that implement the PostFilter trait that can:

  • transform post content.
  • modify the final PostAction to take.
  • modify the final scheduled jobs to perform. (See MailJob).

Filters are executed in sequence like this:

let result = filters
    .into_iter()
    .fold(Ok((&mut post, &mut list_ctx)), |p, f| {
        p.and_then(|(p, c)| f.feed(p, c))
    });

so the processing stops at the first returned error.

Modules

  • settings 🔒
    Named templates, for generated e-mail like confirmations, alerts etc.

Structs

  • Add List-* headers
  • Add List ID prefix in Subject header (e.g. [list-id] ...)
  • Adds Archived-At field, if configured.
  • Assuming there are no more changes to be done on the post, it finalizes which list subscriptions will receive the post in post.action field.
  • Ensure message contains only \r\n line terminators, required by SMTP.
  • Check that submitter can post to list, for now it accepts everything.

Traits

  • Filter that modifies and/or verifies a post candidate. On rejection, return a string describing the error and optionally set post.action to Reject or Defer