GreenArrow Email Software Documentation

Mail Classes

GreenArrow Engine’s SimpleMH system classifies mail into Mail Classes. Each message that’s processed by SimpleMH is assigned a Mail Class, which is used to determine which SimpleMH Mail Features to use.

A comparison of SimpleMH and Raw Injection can be found in the Injecting Mail page.

SimpleMH’s headers are described in the SimpleMH Headers page.

Mail Class Selection Precedence

There are multiple methods available for specifying which Mail Class a message will use. When multiple methods are used for the same message, the first match in the following list is used:

  1. The X-GreenArrow-MailClass header
  2. The GREENARROW_MAILCLASS environment variable (either in an IP relay authorization or passed as a variable while using a local injection option
  3. SMTP AUTH username matching
  4. $DEFAULT_MAILCLASS_SUB in SimpleMH’s configuration file
  5. $DEFAULT_MAILCLASS in SimpleMH’s configuration file

Adding a Mail Class

To add a Mail Class to GreenArrow Engine’s configuration, complete the following steps:

  1. Login to the GreenArrow Engine Web Interface.
  2. Navigate to Configure => Mail Classes:
    configure-mail-classes.png
  3. Click the Add Mail Class button:
    add-mail-class-button.png
  4. In the New Mail Class form, complete the form and click Save. See reference below for details about mail class attributes.

new-mail-class-form.png

Editing a Mail Class

To edit an existing Mail Class, complete the following steps:

  1. Login to the GreenArrow Engine Web Interface.
  2. Navigate to Configure => Mail Classes:
    configure-mail-classes.png
  3. Click the Edit button next to the Mail Class that you wish to edit:
    mail-classes-index.png
  4. Fill in the form, then click Save. This form’s fields are described in the section below.

Mail Class Attributes

Name

string

The name that you wish to assign the Mail Class. This is the value that you’ll be able to use later when including the X-GreenArrow-MailClass header in messages belonging to this Mail Class. The following rules apply to Mail Class names:

  • Names may consist of letters and underscores.
  • The “a” Mail Class is reserved and may not be created.
  • Two or more underscores may not appear next to each other. For example, “server__a__email” is invalid, but “server_a_email” is valid.
  • The name length can not exceed 64 characters.
  • Please see the Bounce Processor Concepts documentation for caveats regarding long mail class names.
Virtual MTA

selection list

The VirtualMTA to assign mail in this Mail Class to.

Mailing List ID

string

The ListID to assign mail in this Mail Class to

BCC All Messages

enabled/disabled

Add a BCC to every email sent using this Mail Class.

Add Custom Headers

enabled/disabled

Add custom headers to emails sent using this Mail Class.

  • A maximum of 1024 bytes are allowed.
  • The only X-GreenArrow-* headers allowed are (see SimpleMH Headers for usage)
    • X-GreenArrow-DKIM
    • X-GreenArrow-DKIM-Only-Using-Domain
    • X-GreenArrow-Signing-Selector
  • The X-Mailer-Info header is prohibited.
Add Message-ID if missing

enabled/disabled

If the injected message does not include a Message-ID header, one will be generated automatically.

Statistic Report Grouping

This option controls how statistics are grouped for this mail class. A thorough explanation of the options and ramifications are discussed in the Statistic Report Grouping documentation.

The default of this option is ordinarily Per Day, but is affected by the legacy_behavior option default_statistic_report_grouping_per_instanceid_legacy (this option was set automatically when upgrading from an older version to v4.333.0 or newer).

Handle Bounce & FBL

enabled/disabled

This option instructs GreenArrow to modify the email message so that the Bounce Processor is able to process bounces and spam complaints for messages using this Mail Class.

If you are using the Lite Bounce Processor, you will typically want this option to be disabled.

When this option is enabled (which is the default) (or the header X-GreenArrow-HandleBounceAndFbl is enabled), messages sent from this mail class will be affected in the following ways so that GreenArrow’s non-lite bounce and FBL processor can process the messages:

  • The 5321.MailFrom (MAIL FROM / Return-Path) address will be overwritten so that GreenArrow receives and processes bounces resulting from these messages.
  • An X-Mailer-Info header will be added to these messages to aid in complaint processing and identification.
  • An X-Mailer-Info-Extra header will possibly be added to aid in bounce processing.
  • The automatically generated List-Unsubscribe header will include a mailto: option (instead of only the HTTP option). This mailto: option is a variant of GreenArrow’s 5321.MailFrom address indicating the message represents an unsubscribe.

This can be overridden on a per-message basis using the X-GreenArrow-HandleBounceAndFbl header.

If you are a GreenArrow cloud customer this field might be forced on and hidden from the UI and API.

Bounce Address

selection list

The Bounce Address to use for mail in this Mail Class. The list contains:

Pass Bounce Messages Through

enabled/disabled

Send a copy of each bounce message back to the original Return-Path recipient. Engine will still process the bounce locally when using this feature.

If you enable this feature, make sure that the original Return-Path domains have throttling configurations in place which allows Engine to deliver these bounces as quickly as they come in. Otherwise, the bounce pass through messages could fill up GreenArrow’s queues as they wait to be delivered. That situation has the potential to slow deliveries to a crawl system wide.

Track Clicks and Opens

enabled/disabled

Turns click and open tracking on or off for this Mail Class.

This can be overridden on a per-message basis using the X-GreenArrow-Click-Tracking-Do header.

If you are a GreenArrow cloud customer this field might be forced on and hidden from the UI and API.

Handle Unsubscribe Links

enabled/disabled

Turns unsubscribe link processing on or off for this Mail Class.

URL Domain

selection list

Choose the URL Domain to use in Click + Open tracking for mail sent via this Mail Class.

Archive a Sample of Messages

enabled/disabled

Archives sample messages to a table in GreenArrow Engine’s PostgreSQL database.

Automatic List-Unsubscribe Header

enabled/disabled

If the injected message does not include a List-Unsubscribe header, one will be generated automatically.

This can be overridden on a per-message basis using the X-GreenArrow-Disable-Auto-List-Unsubscribe-Header header.

If you are a GreenArrow cloud customer this field might be forced on and hidden from the UI and API.

Automatically Seed Mailings

enabled/disabled



Causes SimpleMH to send sample messages belonging to this Mail Class to the GreenArrow Monitor seed list. Sends to addresses in GreenArrow Monitor’s seedlist occur once per Send, and are evenly distributed between the times that GreenArrow Engine receives the message numbers designated in the Number of emails to start seeding at and Number of emails to finish seeding by fields.

When this feature is enabled, GreenArrow Monitor groups all messages for this Mail Class into one campaign per Send. This takes precedence over the X-CampaignID header.

Number of Emails to Start Seeding At

number

Set this field’s value to the daily message volume below which, you don’t want automatic seeding to take place. The field is hidden unless the Automatically seed mailings box is checked.

Number of Emails to Finish Seeding By

number

Set this field’s value to the minimum number of messages that would be sent on a Send that automatic seeding occurs. If this field is set to a value that’s higher than the number of messages that are sent, then only a portion of the GreenArrow Monitor seedlist will be sent to. The field is hidden unless the Automatically seed mailings box is checked.

Convert Text-only Messages into HTML

enabled/disabled

Converts text only messages to HTML. If this box is checked, additional fields appear, which allow you specify an HTML header, HTML footer, the text that should appear for converted links, and regular expression operations to perform before, and after conversion to HTML.

Modify HTML messages

enabled/disabled

If this box is checked, additional fields appear which allow you specify how you’d like HTML messages to be modified.

Event Tracking Metadata Storage

Configure the Event Tracking Metadata Storage for messages processed by this Mail Class.

This can be overridden by the X-GreenArrow-EventTrackingMetadataStorage message header.

The default Event Tracking Metadata Storage is defined by default_event_tracking_metadata_storage.

Statistic Report Grouping

This option determines how statistics will be grouped for this mail class. In GreenArrow, statistics are grouped by SendID. This option has the effect of controlling how the SendID is set for a message injected using a SimpleMH mail class.

This option is not retroactive. This means that messages that have already been sent will have their statistics grouped according to the previous setting (Per InstanceID (Legacy) if they were sent prior to upgrading to a release that includes this directive).

Dates and hours are determined using engine_time_zone.

The default of this option is ordinarily Per Day, but is affected by the legacy_behavior option default_statistic_report_grouping_per_instanceid_legacy (this option was set automatically when upgrading from an older version to v4.333.0 or newer).

In determining grouping, InstanceIDs are compared case-insensitively (as they are always lowercased before being included in the SendID). Except for when using the “Per InstanceID (Legacy)” grouping option, the InstanceID field on events and logfiles preserve the case as it was provided to GreenArrow in the X-GreenArrow-InstanceID header. (When using “Per InstanceID (Legacy)”, the case may or may not be preserved depending on the context.)

Formerly, GreenArrow users needed to parse the InstanceID and Mail Class names out of the SendID value. Events now include fields for the InstanceID and Mail Class name, so this parsing is no longer necessary or recommended.

Possible options include:

Per InstanceID (Legacy)

per_instanceid_legacy

Statistics are grouped by InstanceID (if set), or by date (if no InstanceID is set), using the legacy SendID format.

If an InstanceID is set, the SendID will look like:

${ mail_class.name }${ LOWERCASE(instance_id) }

If no InstanceID is set, the SendID will look like (note that unlike the other options, this is a 2-digit year):

${ mail_class.name }YYMMDD

When using this mode, we recommend to avoid creating too many unique InstanceID values per day (as one send report will be created for each InstanceID value), nor using the same InstanceID value over the course of more than five months (as beyond five months emails with the same InstanceID may be put into a new statistics group).

This mode effects the same grouping as the per_instanceid mode, but has a few minor differences:

  1. The legacy SendID format is used by per_instanceid_legacy, and per_instanceid uses a new format. (Maintaining the old format can be useful for compatibility for users that are directly parsing the SendID value. We no longer recommend parsing the SendID value – instead, please use the mailclass and instanceid fields in events and in the processed logfile.)
  2. If no InstanceID is specified, per_instanceid_legacy defaults the InstanceID to YYMMDD. The per_instanceid mode does not do this.
  3. The InstanceID is lowercased before it is added to the SendID.
  4. Note: Unlike the non-legacy SendID formats, this SendID format may contain uppercase characters if the Mail Class name contains uppercase characters. We don’t recommend that you rely on this behavior, because although most parts of GreenArrow will preserve the case of the SendID (for example, in engine_click and delivery_attempt events), some parts will lowercase the SendID before returning it to you (for example, in bounce_all events). This inconsistency is one reason we recommend only using this grouping option if you are certain you need to.
Per InstanceID

per_instanceid

Statistics are grouped by InstanceID (if set), or by date (if no InstanceID is set).

If an InstanceID is set, the SendID will look like:

${ LOWERCASE(mail_class.name) }==${ LOWERCASE(instance_id) }

If no InstanceID is set, the SendID will look like:

${ LOWERCASE(mail_class.name) }=YYYYMMDD=

When using this mode, we recommend to avoid creating too many unique InstanceID values per day (as one send report will be created for each InstanceID value), nor using the same InstanceID value over the course of more than five months (as beyond five months emails with the same InstanceID may be put into a new statistics group).

If you are running on Postgres 8.3, these SendIDs will be truncated to 100 characters.

Per InstanceID & Day

per_instanceid_and_day

Statistics are grouped by InstanceID and per-day (where the day is in accordance with engine_time_zone). In other words: Each statistics group will contain the emails injected on a particular day with a particular InstanceID. If an InstanceID is used over multiple days, then it will have multiple statistics groups, one for each day.

The SendID will look like:

${ LOWERCASE(mail_class.name) }=YYYYMMDD=${ LOWERCASE(instance_id) }

When using this mode, we recommend to avoid creating too many unique InstanceID values per day (as one send report will be created for each InstanceID value).

If you are running on Postgres 8.3, these SendIDs will be truncated to 100 characters.

Per Day

per_day

Statistics are grouped per-day (where the day is in accordance with engine_time_zone).

The SendID will look like:

${ LOWERCASE(mail_class.name) }=YYYYMMDD

Per Hour

per_hour

Statistics are grouped per-hour (where the day and hour is in accordance with engine_time_zone).

The SendID will look like:

${ LOWERCASE(mail_class.name) }=YYYYMMDDHH


Copyright © 2012–2024 GreenArrow Email