Raw Injection Headers
- Table of Contents
- VirtualMTA, List and Send Headers
- Bounce and Spam Complaint Processing
- GreenArrow Monitor Headers
- DKIM Headers
- Caveats
This document describes the headers used for Raw Injections. The X-GreenArrow-*
headers will be stripped from the message by GreenArrow Engine. Remaining headers will be left intact.
VirtualMTA, List and Send Headers
X-GreenArrow-MtaID
Specifies which VirtualMTA is used to send a message. Valid values are:
-
A name listed under one of the
Name
columns in GreenArrow Engine’s VirtualMTAs page. For example:X-GreenArrow-MtaID: smtp1-1
-
The numeric ID that forms the last part of the URL that a VirtualMTA’s
View
button links to. For example:X-GreenArrow-MtaID: 2
If no VirtualMTA is specified, or if the VirtualMTA that is specified doesn’t exist, then the message will be sent through the default VirtualMTA of the server.
X-Virtual-MTA
This header is only parsed if the process_x_virtual_mta_header directive is enabled.
This header is treated as an equivalent to X-GreenArrow-MtaID
. If both headers are provided,
then X-Virtual-MTA
will be used in favor of X-GreenArrow-MtaID
.
X-GreenArrow-SendID
Specifies which SendID to associate a message with.
-
Example:
X-GreenArrow-SendID: 20111229
X-GreenArrow-ListID
Specifies which ListID to associate a message with.
-
Example:
X-GreenArrow-ListID: t100
The ListID can be up to 20
characters long, but we recommend keeping it as short as possible in order to reduce overhead.
The ListID may contain the follow characters:
- ASCII alphanumeric characters (
a
-z
,A
-Z
and0
-9
) - Underscores (
_
) - Plus signs (
+
)
Bounce and Spam Complaint Processing
Return-Path
/ Bounce Address
You must properly set the Return-Path
on outgoing messages for the Bounce Processor to work. The Return-Path
encodes the recipient address, ListID, and the SendID of the message.
The Return-Path
should be in the following form when injecting through SMTP:
LocalPartOfBounceMailbox-Listid-SendID-RecipientAddressInVERPFormat@DomainOfBounceMailbox
The Return-Path
should be in the following form when injecting through /var/hvmail/bin/sendmail
or /var/hvmail/bin/qmail-inject
:
LocalPartOfBounceMailbox-Listid-SendID-@DomainOfBounceMailbox-@[]
Definitions:
Parameter | Definition |
---|---|
RecipientAddressInVERPFormat | The recipient address with the at sign (@ ) changed to an equal (= ). |
LocalPartOfBounceMailbox | The portion of the bounce mailbox email address before the at sign (@ ). |
DomainOfBounceMailbox | The portion of the bounce mailbox email address after the at sign (@ ). |
ListID | The ListID for this message. |
SendID | The SendID for this message. |
For example, with the data:
Parameter | Value |
---|---|
SendID | 2376 |
ListID | 4 |
Bounce mailbox | [email protected] |
Sending to | [email protected] |
The Return-Path
when injecting through SMTP would be:
The Return-Path
when injecting through /var/hvmail/bin/sendmail
or /var/hvmail/bin/qmail-inject
would be:
Example Implementation:
- An example PHP implementation can be found in the PHPMailer Raw Injection Example page.
X-Mailer-Info
You must properly set the X-Mailer-Info
header on outgoing messages for the Spam Complaint Processor to work. The X-Mailer-Info
header encodes the recipient address, ListID, and the SendID of the message.
Example Implementations:
- An example PHP implementation can be found in the PHPMailer Raw Injection Example page.
- An example Perl subroutine is shown below:
use MIME::Base64;
sub create_feedback_header
{
my $listid = shift;
my $sendid = shift;
my $recipient = shift;
my $data_to_encode = lc($listid . "," . $recipient . "," . $sendid);
# plan: reverse, rot13, base64, change alphabet, rot13
my $encoded = reverse($data_to_encode);
$encoded =~ tr/a-zA-Z/n-za-mN-ZA-M/;
$encoded = MIME::Base64::encode_base64($encoded, "");
$encoded =~ tr/+\//-_/;
$encoded =~ s/[\n=]//g;
$encoded =~ tr/a-zA-Z/n-za-mN-ZA-M/;
return "X-Mailer-Info: $encoded";
}
GreenArrow Monitor Headers
X-CampaignID
GreenArrow Monitor uses the Subject
and From
address to determine what email messages will be grouped together as one “campaign” in the system. If you plan to re-use the same Subject
and From
address for multiple campaigns, or use different Subject
lines or From
addresses in the same campaign, then you should manually specify a unique identifier for each campaign. The X-CampaignID
header is documented in GreenArrow Monitor’s Identifying Campaigns page.
DKIM Headers
X-GreenArrow-DKIM-Only-Using-Domain
Causes the message to be signed with a domain other than the one used in the From
or Sender
header.
-
Example:
X-GreenArrow-DKIM-Only-Using-Domain: example.com
X-GreenArrow-Signing-Selector
Specifies the selector for use in signing, instead of the standard of default
. In example below, greenarrow
is used.
-
Example:
X-GreenArrow-Signing-Selector: greenarrow
Caveats
Header folding is not supported for Raw Injection’s X-GreenArrow-*
headers.