How do I remove the 'display name' or 'friendly name' from the message header of incoming SMTP e-mail?


This article applies to:

  • Trustwave MailMarshal (SEG)

Question:

How do I remove the 'display name' or 'friendly name' from the message header of incoming SMTP e-mail?

 

Procedure:

Many e-mail clients display a 'friendly name' in the From field of the message header when the e-mail is sent.  MailMarshal has the ability to re-write this header information so that the 'friendly name' is stripped from the message upon receipt.

To accomplish this, create a rule similar to the one below that performs a header re-write on the message once it has been received by MailMarshal:

Standard Rule: Remove Friendly From
When a message arrives
Where message is incoming
Rewrite message headers using 'Remove Friendly From'
And pass message to the next rule for processing.

To configure the header re-writing portion of this rule:

  1. After selecting the 'Rewrite message headers using' rule action, click on the expressions link in the rule description.
  2. Select the From: and Reply-To: fields.
  3. Select a Field Parsing Method of Entire Line.
  4. In the Field search expression field, enter the following string:   ^([^<\[]*)[<\[]([^>\]]*)[>\]]
  5. In the Substitute into field using expression field, enter this string:  <$2>
  6. Name the rule Remove Friendly From.

For assistance with the user interface, see Help for the installed version of the product.

This article was previously published as:
NETIQKB41090

Last Modified 4/1/2020.
https://support.trustwave.com/kb/KnowledgebaseArticle10437.aspx