This Haraka plugin forwards mail data to Google Pub/Sub.
- Install Google Pub/Sub in the root directory of your Haraka installation folder.
npm i @google-cloud/pubsub
- Create the configuration file
gpubsub_queue.json
in theconfig
directory. It will include the topic name and path to your service account key.
{
topic: 'pubsub-topic',
keyFilename: '/path/to/key.json'
}
- Copy the
gpubsub_queue.js
file to theplugins
directory - Add
gpubsub_queue
to your list of plugins (Add to/config/plugins
file)
The data sent is in the format:
{
header: {
to: [],
from: '',
date: '',
message_id: '',
subject: '',
},
body: 'Content of body'
}
The following additional header properties may be included if they exist:
bcc
cc
sender
in_reply_to
reply_to
references
auto_submitted
- Support for Attachment