Exists

Syntax

exists <header-names: test-list>

Description

The "exists" test is true if the headers listed in the header-names argument exist within the message. All of the headers must exist or the test is false.

Example

The following example throws out mail that doesn't have a From header and a Date header.

if not exists ["From","Date"] {
        discard;
     }

Module

Core : Requires no import statement

Resources

RFC3028