Yesterday I came across a request in which for a group of email users, the display name must be removed when sending to recipients outside the organization.

Concretely, those whose email is in format  (where XXXX are digits) must be “anonymized”. For example:

When certain of those users sends an email to an internal recipient, the header from should remain as: “John Doe <>“, whereas when sending outside it should be: “<>“.

These is easily accomplished by using a filter:

StripName: if header("From") == "^.*<[0-9][0-9][0-9][0-9]>" {
          edit-header-text("From", "^.*<", "<");

In case you want to apply to another group of email users (or to all of them) , simply modify the condition, change the regex or remove it.

This is the way I added the filter in a Cluster Configuration environment:

(Machine> filters

NOTICE: This configuration command has not yet been configured for the current cluster mode (Machine

What would you like to do?
1. Switch modes to edit at mode "Cluster SMTP".
2. Start a new, empty configuration at the current mode (Machine
3. Copy settings from another cluster mode to the current mode (Machine
[1]> 1

[]> NEW

Enter filter script.  Enter '.' on its own line to end.
StripName: if header("From") == "^.*<[0-9][0-9][0-9][0-9]>" 
          edit-header-text("From", "^.*<", "<"); 
1 filters added. 

[]> LIST

Num Active Valid Name
  1   Y      Y   StripName


(Cluster SMTP)> commit