back to knowledgebase

How to configure Rules to determine automatic private flag on emails

Updated: 17 May 2022 15:47:16 OpenCRM::Settings

You can set email addresses to be marked as PRIVATE automatically, regardless of if the sender has specified the PRIVATE flag or not.

This setting is available within Settings > Configuration >  Additional Settings > Email Settings

This also needs to follow the following formatting guidelines;


Examples of how you would format this option include:

    • This would process the TO rule and whenever it found in the TO address it would mark the email as PRIVATE automatically.
    • Similarly this would run the FROM rule. If the email has the address in the FROM field then it would be marked as PRIVATE automatically.
  • SUBJECT:Private;
    • This would run the SUBJECT rule and look for emails with the text string 'Private' in the subject line of the email and mark this email as PRIVATE automatically.
  • OWNER:7; [The owner is the UserID of the User in your OpenCRM system - you can find this by going to the user record - the ID is shown in brackets after the username]
    • This would mark all emails that are linked to this OpenCRM user as PRIVATE.

Adding multiple checks into the system

You can add multiple rules into the system to check similar elements, this is done by making sure that each rule is followed by a semicolon ";"

This would allow you to specify two different email addresses as follows: 


You can follow this format with all of the Rule types.


There is a better way....

When you want to check multiple addresses you can add them to a single Rule Type in one string of text, this is done by adding the Pipe character "|" after the various checks - remember to end the statement with the semi colon ";"

Note : the Pipe Character looks like a vertical bar on your keyboard.


In reality your formatting will look something like this 

  • SUBJECT:Private;|;|

What else can I do to make this easier to manage?

You can add a specific email address OR elect to mark ALL emails from a domain, this is done using this format


And using multiple domains



  • The format can be a little tricky when you are working in a single text field in the settings area of OpenCRM - copy and paste the text into a text editor it makes it much easier.
  • Also ... keep the rules together, so you have a section for SUBJECT, TO, FROM and OWNER.

Here is a live example - both of these examples do the same thing - notice how keeping the elements together makes it far easier to understand and maintain.

Example 1;;SUBJECT:Private;;;;SUBJECT:Privateemail;OWNER:7;


Example 2||;|;SUBJECT:Private|privateemail;OWNER:7;


And when you break Example 2 out in a text editor it becomes so much easier to read and understand (remember when you add line breaks you should remove these before you copy/paste back into the field in OpenCRM Settings):||;|;




Another Tip on domains and subdomains

If you wish to mark all emails as PRIVATE that come from a domain, as we discuss above, you can place the domain within the rule (e.g.;). Because the rule would also match emails from subdomains (e.g. and there may be circumstances where you only want to mark emails from the main address and have the privacy status of other emails left unchanged. You can easily do this by adding the "@" sign before the domain. This will look for the characters including the "@" symbol which means that an email sent to would not be matched and therefore would be left unchanged but would match and therefore be marked as PRIVATE.


And Lastly ..... SUBJECT

The SUBJECT Rule Type can process any specific text - this is not limited to a few keywords such as 'Private' as we show in our examples. Its also worth noting that we convert the case of the text before it gets processed so you do not need to add 'Private', 'PRIVATE' and 'private'.

This is particularly important if you are receiving pre-formatted automated emails from an outside source, where you have no control over the text that appears in the Subject line of the email.

Rate This Article
  • 1 star
  • 2 star
  • 3 star
  • 4 star
  • 5 star
Feedback and Comments
captcha code  

You may also be interested in: