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-MtaIDheader containing the name of the VirtualMTA that the trunking VirtualMTA routes to. - Inserts an
X-GreenArrow-ListIDheader containing the ListID. - Inserts an
X-GreenArrow-SendIDheader containing the SendID.
Trunking does the following when the SimpleMH Method is used:
- Inserts an
X-GreenArrow-MtaIDheader containing the name of the VirtualMTA that the Mail Class’s trunking VirtualMTA routes to. - Inserts an
X-GreenArrow-ListIDheader containing the Mail Class’s ListID. - Inserts an
X-GreenArrow-SendIDheader 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
RelayServerstring 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
VirtualMTAstring should be replaced with the value that GreenArrow Engine should insert into theX-GreenArrow-MtaIDheader.
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.
- Identify the name of the VirtualMTA that you wish to perform debugging on. In this example, the VirtualMTA named
smtp1-1was chosen. - Log into GreenArrow Engine’s web interface.
- Navigate to
Configure=>VirtualMTAs. - Click the
Add Routing Rulebutton. - In the
Add Routing Ruleform, complete the following fields, then clickSubmit.-
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 namedsmtp1-1:trunk--local--smtp1-1 -
Send Through- the VirtualMTA that was chosen in Step 1 -smtp1-1.
-
-
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] -
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.
- 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. - 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-1was chosen. - Log into GreenArrow Engine’s web interface on the server that will be injecting mail.
- Navigate to
Configure=>VirtualMTAs. - Click the
Add Routing Rulebutton. - In the
Add Routing Ruleform, complete the following fields, then clickSubmit.-
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 namedrelay2, where they are then sent out on the VirtualMTA namedsmtp1-1:trunk--relay2--smtp1-1 -
Send Through- the Relay Server that was configured or identified in Step 1. In this example,relay2.
-
-
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] -
Run the following
hvmail_reportcommand 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]
