GreenArrow Email Software Documentation

Trunking

By default, GreenArrow Engine strips X-GreenArrow-* headers from messages as they’re injected. This behavior is normally desirable, but can be disabled for some headers by using GreenArrow Engine’s Trunking feature. Trunking can be useful in two situations:

  • When troubleshooting mail injection or VirtualMTA selection issues.
  • When using multiple GreenArrow Engine servers, and one server is injecting mail into another. Trunking enables the injecting server to communicate which VirtualMTA, SendID, and ListID should be associated with each injected message.

Trunking does the following when the Raw Injection Method is used:

  • Inserts an X-GreenArrow-MtaID header containing the name of the VirtualMTA that the trunking VirtualMTA routes to.
  • Inserts an X-GreenArrow-ListID header containing the ListID.
  • Inserts an X-GreenArrow-SendID header containing the SendID.

Trunking does the following when the SimpleMH Method is used:

  • Inserts an X-GreenArrow-MtaID header containing the name of the VirtualMTA that the Mail Class’s trunking VirtualMTA routes to.
  • Inserts an X-GreenArrow-ListID header containing the Mail Class’s ListID.
  • Inserts an X-GreenArrow-SendID header containing the SendID.

To enable trunking, create a new Routing Rule VirtualMTA with a name in the following format:

trunk--RelayServer--VirtualMTA
  • The trunk- string is literal.
  • The RelayServer string can be replaced with any string as long as it doesn’t create an invalid VirtualMTA name, or contain two consecutive - characters. In most cases, it’s recommended that you use a string that can be used to identify which server mail using this VirtualMTA will be injected into.
  • The VirtualMTA string should be replaced with the value that GreenArrow Engine should insert into the X-GreenArrow-MtaID header.

Trunking does not work for IP Address or Relay Server VirtualMTAs directly. If you wish to use Trunking for a VirtualMTA of one of these types, you should create a new Routing Rule that routes mail to the desired IP Address or Relay Server VirtualMTA.

Example Configuration #1 - Debugging

In this example, we’ll send messages out on the local GreenArrow Engine installation’s smtp1-1 VirtualMTA with Trunking enabled. This example is useful for debugging.

  1. Identify the name of the VirtualMTA that you wish to perform debugging on. In this example, the VirtualMTA named smtp1-1 was chosen.
  2. Log into GreenArrow Engine’s web interface.
  3. Navigate to Configure => VirtualMTAs.
  4. Click the Add Routing Rule button.
  5. In the Add Routing Rule form, complete the following fields, then click Submit.
    1. Name - The name, or MTAid that you wish to assign this new VirtualMTA. In this example, we’re using the following, since messages are being sent out on the local VirtualMTA named smtp1-1:

      trunk--local--smtp1-1
      

    2. Send Through - the VirtualMTA that was chosen in Step 1 - smtp1-1.

  6. Send a test message. For example, if you’re injecting a message using mailsubj, you would run the following. Replace [email protected] with your email address:

    date | GREENARROW_MTAID=trunk--local--smtp1-1 GREENARROW_SENDID=20120405 GREENARROW_LISTID=t10 /var/hvmail/bin/mailsubj "GreenArrow Trunking Test" [email protected]
    

  7. Open the message that you just sent yourself, and view its headers. They should include the following:

    X-GreenArrow-MTAID: smtp1-1
    X-GreenArrow-SendID: 20120405
    X-GreenArrow-ListID: t10
    

Example Configuration #2 - Relaying to Another GreenArrow Server

In this example, we’ll inject messages into another GreenArrow Engine server with Trunking enabled. This example is useful if you’re using multiple GreenArrow Engine installations, and want the VirtualMTA, SendID, and ListID associated with each messages to be preserved as it’s injected from one GreenArrow Engine server into another.

  1. Configure and test a Relay Server VirtualMTA if one does not already exist. Trunking is not enabled during this step. In this example, the relay server will be named relay2.
  2. Identify the name of the VirtualMTA that you would like the Relay Server to send messages out on, after they’ve been injected into it. In this example, the VirtualMTA named smtp1-1 was chosen.
  3. Log into GreenArrow Engine’s web interface on the server that will be injecting mail.
  4. Navigate to Configure => VirtualMTAs.
  5. Click the Add Routing Rule button.
  6. In the Add Routing Rule form, complete the following fields, then click Submit.
    1. Name - The name, or MTAid that you wish to assign this new VirtualMTA. In this example, we’re using the following, since messages are being injected into the Relay Server named relay2, where they are then sent out on the VirtualMTA named smtp1-1:

      trunk--relay2--smtp1-1
      

    2. Send Through - the Relay Server that was configured or identified in Step 1. In this example, relay2.

  7. Send a test message. For example, if you’re injecting a message using mailsubj, you would run the following. Replace [email protected] with your email address:

    date | GREENARROW_MTAID=trunk--relay2--smtp1-1 GREENARROW_SENDID=20120405 GREENARROW_LISTID=t10 /var/hvmail/bin/mailsubj "GreenArrow Trunking Test" [email protected]
    

  8. Run the following hvmail_report command on the GreenArrow Engine server that the message was injected into to verify that it associated the correct VirtualMTA and SendID with the message. Replace [email protected] with your email address:

    hvmail_report -a -q all --last '1 hour' --show-address --show-time --show-mtaid [email protected]
    


Copyright © 2012–2024 GreenArrow Email