Policy Script 3: Deliver External Whitelisted Messages

# attr NAME=Deliver mail from whitelisted hosts and senders
if anyof(pmx_relay :memberof "whitelisted-hosts",
         envelope :memberof "From" "whitelisted-senders") {
    keep;
    stop;
}

Description:

  • If the message originates from a relay defined in the "whitelisted-hosts" list OR the message has an "Envelope From" address defined in the "whitelisted-senders" list:
    • The keep action accepts the message for delivery.
    • The stop control ends message processing.