These examples refer to emails sent internally within an organization. Address Book lookup does not detect emails sent to or from external addresses. These examples illustrate the various operator combinations in an Address Book lookup command.
- The example below detects all outgoing emails where one or more recipients is in the Sales department. If CA DataMinder detects such a recipient, that user’s name and department are written to the %which_guy% and %proscribed_dept% variables respectively. You can then incorporate these variables in a user notification message:
mapi WITH any %recipient% WHERE Department IS ANY {"Sales","Marketing"}
- The example below detects all outgoing emails unless one or more recipients is in the London or Manchester offices:
mapi WITH all %recipient% WHERE Office IS NOT ALL {"London","Manchester"}
- The example below detects all incoming emails where the sender is a member of the Executive Management mail group:
mapi WITH %sender% WHERE MemberOf is "Executive" "Management"
- The example below detects all outgoing emails where one or more recipients has a hire date of 2001. (In this example, Address Book custom attribute 3 is set to an employee’s hire date.)
mapi WITH any %recipient% WHERE ExtensionAttribute3 CONTAINS "2001"
- The example below detects all outgoing emails that do not include a supervisor in the list of recipients:
mapi WITH all %recipient% WHERE Title IS NOT "Supervisor"
- The example below detects all outgoing emails that do not include a supervisor or team leader in the list of recipients. The command returns a True value (and activates the control trigger) unless a supervisor or team leader is included in the To, Cc or Bcc lists:
mapi WITH all %recipient% WHERE Title IS NOT "Supervisor"
- The example below detects all outgoing emails where the recipient list excludes a member of the Compliance Team mail group in the London office. That is, the command returns a True value (and activates the control trigger) if no such recipient is detected.
Note the NOT operator! This ensures that if any member of the London Compliance Team is detected, the command returns a False value (and the trigger does not activate).
mapi WITH all %recipient%
WHERE NOT ((MemberOf CONTAINS ALL {"Compliance","Team"})
AND (Office IS "London"))
- The example below combines Message Attribute and Address Book lookup commands to detect emails sent to the Santiago office where the total message impact exceeds 5MB:
(msgattr WHERE msgimpactkb > 5000) AND (mapi WITH any %recipient% WHERE Office IS "Santiago")
- The example below tests the Company attribute of the user, but specifies it by its MAPI numerical code:
mapi WITH any %recipient% WHERE MAPIID0x3A16 IS "Unipraxis"