pe2_mark_unsubscribed
Last updated March 2020
Name
pe2_mark_unsubscribed — log unsubscribe events when the pe2_logger module is loaded passively
Synopsis
pe2_mark_unsubscribed
Description
Note
This function requires that the pe2_logger module be loaded.
Use this function to log unsubscribe events when the pe2_logger module is loaded in passive mode. Note that on an inbound MTA the pe2_logger module must be loaded in passive mode. You may use any Sieve logic you wish to determine whether an incoming message is an unsubscribe. In the following example this is done by prefixing unsub-
to the local part of the address.
if envelope :localpart :matches "to" "unsub-*" { $res = pe2_mark_unsubscribed; if ec_test "${res}" "failure" { ec_action 500 "pe2_mark_unsubscribed failed"; } if not ec_test "${res}" "success" { ec_action 550 "pe2_mark_unsubscribed failed unexpectedly"; } discard; }
See Also
Was this page helpful?