A Haraka plugin written in Javascript for logging outbound e-mail traffic to a PostgreSQL database.
Haraka has no built in logging functionality for an outbound e-mail server, so this plugin was created to easily record all outbound e-mail data into a PostgreSQL database. This can easily be updated to any other type of SQL database, and the specific data uploaded from each e-mail can also be changed easily through a configuration file.
You must have an outbound Haraka server already setup for this to work. I reccomend following this tutorial for that:
After you have that set up, HaraDB only requires 2 extra node.js packages:
npm install dateformat
npm install pg
The first is for easy date formatting, the second is the PostgreSQL integration package.
- 1.2
- Fixed email_id sequence skipping numbers when an e-mail gets sent to more than one address
- Added compare query instead of using conflicts for above
- 1.1
- Accidentally skipped a version number v_v
- 1.0
- Fully functioning logging system with PostgreSQL
- Logs both main e-mails and events that occur with the e-mails
- Uses pool and client system for efficient queries
Mitch Zakocs – [email protected]
Distributed under the GNU General Public License. See LICENSE for more information.
Until the package is put onto NPM, the plugin must be installed manually:
- Download or clone the github repo.
- Drag "haradb.js" file into your plugins directory in your haraka server.
- Drag the "config/haradb.ini" into your config directory in your haraka server.
- Configure the ini file with your PostgreSQL login details.
- Edit the SQL queries if neccessary to fit your demands.
- Add the line 'haradb' to the /config/plugins file and launch the server.
- Fork it (https://github.com/mzakocs/HaraDB)
- Create your feature branch (
git checkout -b feature/fooBar) - Commit your changes (
git commit -am 'Add some fooBar') - Push to the branch (
git push origin feature/fooBar) - Create a new Pull Request