How can I customize SMTP messages sent by the Receiver?


This article applies to:

  • Trustwave MailMarshal (SEG) and above

Question:

  • How can I customize MailMarshal SMTP responses?
  • How can I customize SMTP messages sent by the Receiver?
  • How can I customize DOS or DHA responses?
    • For SpamProfiler responses, see article Q12739.

Procedure:

The MailMarshal Receiver uses many SMTP responses that are not configurable in Rules or in any user interface.

To alter these responses, in MailMarshal SMTP version 6.7 and above:

  1. Enable the functionality that returns the response you want to modify. Ensure that this functionality is actually being used.
    • For instance, if you want to modify DHA responses, enable DHA protection and verify that it has been invoked.
  2. On the MailMarshal email processing node (or the standalone server), open Windows Explorer and navigate to the \NodeConfig folder within the MailMarshal installation.
  3. Copy the file ReceiverMessages.xml to another location and edit it with an XML editor.
    • This file includes a line for each SMTP response that has actually been returned by the Receiver.
    • For general help with XML editing, see article Q12705.
  4. For each message you want to customize:
    • Locate the default message in the Key attribute of a Message node. Do not edit the Key attribute.
    • Add the desired custom message in the Value attribute of the Message node.
    • You can use any variables (marked with { }) that are present in the default message. Only the variables in the specific default message are available for use in a custom version of the same message. 
  5. Save the ReceiverMessages.xml file.
  6. If you want to apply the changes to all nodes in an array, place this file in the \Config folder on the Array Manager or standalone server.
  7. If you want to apply the changes to a single processing node in an array, name the file ReceiverMessages-SERVERNAME.xml and place this file in the \Config folder.
    • For instance, name the file for MailServer01 ReceiverMessages-MailServer01.xml
  8. Commit configuration and then restart the Receiver service.
  9. To verify that the changes are applied, check the Receiver logs.

Example:

The file below includes a custom value for the 354 send data message:

 

<?xml version="1.0" encoding="utf-8"?>
<MailMarshal Version="6.7" Date="07/21/2009">
<Messages>
  <Message Key="220 {Greeting}" Value=""/>
  <Message Key="250 {HostName} Hello {HeloName} ({IPAddress})" Value=""/>
  <Message Key="250 sender ok &lt;{ReturnPath}&gt;" Value=""/>
  <Message Key="250 recipient ok &lt;{ReturnPath}&gt;" Value=""/>
  <Message Key="354 send the mail data, end with ." Value="354 hit me"/>
  <Message Key="250 {MessageName} Message accepted for delivery" Value=""/>
  <Message Key="221 {HostName} closing connection" Value=""/>
  </Messages>
</MailMarshal>

 

Notes:

The Sender service does not have similar functionality because no customizable messages are returned by the Sender.


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