haraka-plugin-rcpt-pg

1.0.0 • Public • Published

haraka-plugin-rcpt-pg

This plugin validates the rcpt_to addresses (recipient addresses) by connecting to a PostgreSQL database.

It's forked from haraka/haraka-plugin-rcpt-postgresql, adding SSL support and fixing issues.

Install

cd /my/haraka/config/dir
npm install haraka-plugin-rcpt-pg

Enable

Add the following line to the config/plugins file.

rcpt-pg

Config

The rcpt-pg.json file has the following structure (defaults shown). Also note that this file will need to be created, if not present, in the config directory.

{
  "user": "thihara",
  "database": "haraka",
  "password": "",
  "host": "127.0.0.1",
  "port": 5432,
  "max": 20,
  "idleTimeoutMillis": 30000,
  "sqlQuery": "SELECT EXISTS(SELECT 1 FROM valid_emails WHERE email_id=$1) AS \"exists\"",
  "sslCa": "/path/to/your/pgsql/ca/certificate" // Remove this if you don't use SSL mode
}

Package Sidebar

Install

npm i haraka-plugin-rcpt-pg

Weekly Downloads

1

Version

1.0.0

License

MIT

Unpacked Size

6.7 kB

Total Files

7

Last publish

Collaborators

  • schenkerx