Skip to main content

Name

ec_bounce_classify — perform bounce classification on the message

Synopsis

($code, $classification, $orig_rcpt) = ec_bounce_classify

Description

ec_bounce_classify allows you to perform bounce classification on a message from within Sieve++. It returns a string list which contains three members:

  • $code - The numeric bounce classification code. See “Bounce Classification Codes” for information about the built-in classification codes. To create your own classification codes see “bounce_classifier – Bounce Classifier”.

  • $classification - The text description for the bounce classification.

  • $orig_rcpt - The original recipient of the e-mail message which generated the bounce. If this value is not able to be determined, it will be a blank string.

if envelope :all :regex "to" "^bounces-.+@mydomain.com$") {
  ($code, $classification, $orig_rcpt) = ec_bounce_classify;
  ec_log "Bounce ${classification} code ${code} for address ${orig_rcpt}";
  discard;
}

See Also

Was this page helpful?