Skip to main content

Name

keep, ec_keep — keep the current message; stop processing further rules

Synopsis

keep

ec_keep [ reason ]

Description

The keep and ec_keep actions are used to explicitly indicate that the mail should be kept; Momentum will continue to deliver it to its final destination.

This is a terminal action; no further Sieve rules will be run for the current message in the current phase.

In the following script, any mail from the good-guy.com domain is kept, all other mail is thrown out.

if envelope :domain :is "from" "good-guy.com" {
  keep;
} else {
  discard;
}

For an overview of Sieve actions see “Actions”.

Was this page helpful?