--- title: "Adding impersonation detection rules using the CLI" slug: "adding-impersonation-detection-rules-using-the-cli" tags: ["Product Usage", "EX 11.x", "FX 11.x", "AX 11.x", "NX 11.x", "Network Security"] updated: 2026-08-24T19:53:10Z published: 2026-08-24T19:53:10Z canonical: "docs.trellix.com/adding-impersonation-detection-rules-using-the-cli" stale: true --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.trellix.com/llms.txt > Use this file to discover all available pages before exploring further. # Adding impersonation detection rules using the CLI Use the CLI commands in this topic to add impersonation detection rules. ### Prerequisites - An established connection between the Email Security - Server appliance and the Internet. - Admin and Operator access to the Email Security - Server appliance. - Ensure the impersonation riskware policy rules are configured for alert or quarantine. `65027, High Confidence Email Impersonation Weights 80-99 Matched` `65028, Low Confidence Email Impersonation Weights 50-79 Matched` **To add an impersonation rule:** 1. Go to CLI configuration mode. ``` hostname > enable hostname # configure terminal ``` 2. Specify names and email addresses to add to the impersonation rule. - To add a rule with a single name and email address: ``` hostname (config) # email-analysis impersonation add ``` - To add a rule with multiple names and email addresses: ``` hostname (config) # email-analysis impersonation add ``` > [!NOTE] > Note > > If a name contains spaces, enclose it in double quotation marks. > > Use a space between the name list and email list. > > Use a comma to separate multiple names and email addresses. Examples: `hostname (config) # email-analysis impersonation add "Lilly-Li Searle","L Searle" lilly-li_searle@abccompany.com,lilly-li-searle@gmail.com` `hostname (config) # email-analysis impersonation add “H Stubbs”,"Harold Stubbs","Mr. Stubbs" Harold@malware.com,harold.stubbs@malware.com` 3. Verify the changes. ``` hostname (config) # show email-analysis impersonation all ``` `1: Valid Name(s): Lilly-Li Searle L Searle Valid Email(s): lilly-li_searle@abccompany.com lilly-li-searle@gmail.com 2: Valid Name(s): H Stubbs Harold Stubbs Mr. Stubbs Valid Email(s): Harold@malware.com harold.stubbs@malware.com` 4. Save the changes to the current active configuration. ``` hostname (config) # write memory ``` ### Examples > [!NOTE] > Note > > If email was detected with a strong or weak riskware indication but matched aTrellix YARA rule, the email will generate a high confidence impersonation riskware alert. ###### Example 1 (Triggers High Confidence Alert) In this example, the **Reply to** header is present in the email header, but the **Reply to** email does not match the **From** email address. This case generates a high confidence alert with a signature name: `CustomPolicy.MVX.65027.HighConfidenceEmailImpersonation.impersonation` Impersonation Rule: `Valid Name(s): Lilly-Li Searle L Searle Valid Email(s): lilly-li_Searle@abccompany.com lilly-li-searle@gmail.com` The incoming email contains: `From "L Searle” <lilly-li-searle@gmail.com> Reply to abhi@gmail.com` ![EX_Impersonator_Example1_scap.png](https://cdn.us.document360.io/0d453a50-e1da-4d4a-9409-fea7959614d8/Images/Documentation/uuid-1d7116d0-8e14-ff14-f544-6328fa4d12bd.png?sv=2026-02-06&spr=https&st=2026-11-22T14%3A08%3A39Z&se=2026-11-22T15%3A08%3A39Z&sr=c&sp=r&sig=f1rZAOZfChtDlKg2DclsNP%2BPDKQX9oSnuY8fx3NGB5I%3D) ###### Example 2 (Triggers High Confidence Alert) In this example, the **From** email display name and **Reply to** display name match the rule, but the **Reply to** email address does not match the **From** email address. This case generates a high confidence alert with a signature name: `CustomPolicy.MVX.65027.HighConfidenceEmailImpersonation.impersonation` Impersonation Rule: `Valid Name(s): H Stubbs Harold Stubbs Mr. Stubbs Valid Email(s): Harold@malware.com harold.stubbs@malware.com` The incoming email contains: `From: "H Stubbs" <Harold@malware.com> Subject: CONFIDENTIAL: Company Acquisition Reply to: "H Stubbs" <abhi@t.com> To: "John Smith" <jsmith@labs.local>` ![EX_Impersonator_Example2_scap.png](https://cdn.us.document360.io/0d453a50-e1da-4d4a-9409-fea7959614d8/Images/Documentation/uuid-9edb0c9c-c67a-476b-997a-43b8c5f60aa7.png?sv=2026-02-06&spr=https&st=2026-11-22T14%3A08%3A39Z&se=2026-11-22T15%3A08%3A39Z&sr=c&sp=r&sig=f1rZAOZfChtDlKg2DclsNP%2BPDKQX9oSnuY8fx3NGB5I%3D) ###### Example 3 (Triggers Low Confidence Alert) In this example, the display name matches the impersonation rule, but the **From** email address does not match the impersonation rule. This case generates a low confidence alert with a signature name: `CustomPolicy.MVX.65028.LowConfidenceEmailImpersonation.impersonationn` Impersonation Rule: `Valid Name(s): H Stubbs Harold Stubbs Mr. Stubbs Valid Email(s): Harold@malware.com harold.stubbs@malware.com` The incoming email contains: `From: "`H Stubbs`" <Harold@truetest.com> Subject: CONFIDENTIAL: Company Acquisition To: John Smith <jsmith@labs.local>` ![EX_Impersonator_Example3_scap.png](https://cdn.us.document360.io/0d453a50-e1da-4d4a-9409-fea7959614d8/Images/Documentation/uuid-60b1bf62-f9fe-1450-e246-5bd27c699a21.png?sv=2026-02-06&spr=https&st=2026-11-22T14%3A08%3A39Z&se=2026-11-22T15%3A08%3A39Z&sr=c&sp=r&sig=f1rZAOZfChtDlKg2DclsNP%2BPDKQX9oSnuY8fx3NGB5I%3D) ###### Example 4 (Triggers High Confidence Alert) In this example, the display name matches the impersonation rule but the **From** email address does not match. This email header is considered a weak riskware indication. However, a high confidence alert is generated because the email subject and body match theTrellix YARA rule. This case generates a high confidence alert with a signature name: `CustomPolicy.MVX.65027.HighConfidenceEmailImpersonation.impersonation` Impersonation Rule: `Valid Name(s): Lilly-Li Searle L Searle Valid Email(s): lilly-li_Searle@abccompany.com lilly-li-searle@gmail.com` The incoming email contains: `From: "Lilly-Li Searle" <lilli-ly_searle@abcccomany.com>` ![EX_Impersonator_Example4_scap.png](https://cdn.us.document360.io/0d453a50-e1da-4d4a-9409-fea7959614d8/Images/Documentation/uuid-9f5bf92f-c7ff-a05e-3029-35c4758d15af.png?sv=2026-02-06&spr=https&st=2026-11-22T14%3A08%3A39Z&se=2026-11-22T15%3A08%3A39Z&sr=c&sp=r&sig=f1rZAOZfChtDlKg2DclsNP%2BPDKQX9oSnuY8fx3NGB5I%3D) ###### Example 5 (No Sender Impersonation Rule Trigger) In this example, both the **From** email address and the display name exactly match the impersonation rule. This case does not generate a riskware alert. `Valid Name(s): H Stubbs Harold Stubbs Mr. Stubbs Valid Email(s): Harold@malware.com harold.stubbs@malware.com` The incoming email contains: `From: "H Stubbs" <harold.stubbs@malware.com> Subject: CONFIDENTIAL: Company Acquisition To: John Smith <jsmith@labs.local>` ![EX_Impersonator_Example5_scap.png](https://cdn.us.document360.io/0d453a50-e1da-4d4a-9409-fea7959614d8/Images/Documentation/uuid-f36a77aa-5cd6-8e70-7ea7-480c1c7fb270.png?sv=2026-02-06&spr=https&st=2026-11-22T14%3A08%3A39Z&se=2026-11-22T15%3A08%3A39Z&sr=c&sp=r&sig=f1rZAOZfChtDlKg2DclsNP%2BPDKQX9oSnuY8fx3NGB5I%3D)