GreenArrow Email Software Documentation

Set Mail Class with SMTP AUTH

The recommend way to set the Mail Class and Instance-ID for each message is by setting the X-GreenArrow-MailClass and X-GreenArrow-InstanceID headers. If you’re unable to do that, then this page describes an alternative approach which allows you to specify which Mail Class and Instance-ID to use via the SMTP AUTH username that’s used for injecting email.

Here’s how to implement this:

  1. Enable SimpleMH by default for the SMTP2 service.
  2. Create a new SMTP AUTH user whose localpart is of the form mailclass-{MAIL_CLASS_NAME} or mailclass-{MAIL_CLASS_NAME}-{INSTANCE_ID}, where {MAIL_CLASS_NAME} is replaced with the desired Mail Class and {INSTANCE_ID} is replaced with the desired InstanceID. Here are two examples:
    1. [email protected] - use the foo Mail Class and the default InstanceID.
    2. [email protected] - use the foo Mail Class and the 1bar InstanceID. Remember that InstanceIDs must start with a number and can contain up to 20 alphanumeric characters.
  3. Inject mail into the SMTP2 service (which runs on port 587 by default) using the SMTP AUTH username that you created in the previous step.

If you inject any mail using the above method which also has the X-GreenArrow-MailClass and X-GreenArrow-InstanceID headers set, those headers’ values take precedence over the information encoded in the username.

Copyright © 2012–2024 GreenArrow Email