haraka-plugin-queue-rails

July 1, 2022 ยท View on GitHub

A Haraka plugin for relaying email to a Rails application via Action Mailbox.

Install

Install with npm

npm install @mailprotector/haraka-plugin-queue-rails --save

Setup

Enable Plugin

Add to plugin file in the haraka config folder

@mailprotector/haraka-plugin-queue-rails

Config

Config options are set in queue.rails.json:

ParameterDescriptionTypeDefault Value
ACTION_MAILBOX_PASSWORDaction mailbox passwordstringnone
ACTION_MAILBOX_URLaction mailbox url endpointstringnone
USER_AGENTuser agent to send action mailbox requests asstringnone
ENVELOPE_HEADER_NAMEheader name for envelope information (details below)stringnone

Details

The following header from your ENVELOPE_HEADER_NAME config will be added to the email as a JSON string

{
  "mail_from": transaction.mail_from,
  "rcpt_to": transaction.rcpt_to,
  "remote_ip": remote.ip,
  "remote_host": remote.host,
  "helo": hello.host
}

alt text About Mailprotector