The command incoming() determines the delivery target (internal/external) of an email.
This command checks whether an email is delivered locally. If not all recipients of the email are exclusively local or exclusively external, two groups are formed.
The term "local" refers to recipients who belong to a Managed domain (see Mail System Managed domains).
Structure of the command
incoming();
Return value
positive |
for the group of local recipients |
negative |
for the group of external receivers |
Local recipients are those whose email domains are defined as Managed domains on the appliance. All other recipients are referred to as external. |
Parameters
none
Example 1
Line |
Code |
---|---|
01 |
if (incoming()) { |
02 |
# Ruleset statements for all emails which can be delivered locally |
03 |
# instruction block 1 - Return value: positive |
04 |
} else { |
05 |
# Ruleset statements for all emails which can be delivered externally |
06 |
# instruction block 2 - Return value: negative |
07 |
} |
Explanation
In this example, instruction block 1 (lines 02, 03) is executed for an incoming email. For an outgoing email, instruction block 2 (lines 05, 06) is executed.