fim / pma

Email manager for virtual domain database backends

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PMA - Postfix Mail Accountant

This is a simple tool to help manage accounting backends for simple mail servers (primarily tested with postfix/dovecot).

Requirements

  • Python 2.X (tested with 2.7)

Installation

Either clone locally by running:

git clone https://github.com/fim/pma

and then install if necessary:

python setup.py install

Or simply run:

pip install https://github.com/fim/pma/tarball/master

Usage

Initialize the database:

> pma init

Create domains:

> pma domain add

Create user accounts:

> pma user add

Create aliases:

> pma alias add

Create transport rules:

> pma transport add

List existing records:

> pma domain list

Delete existing records:

> pma domain delete

Database Support

Currently sqlite3, mysql and psql are supported.

  • SQLite3

Requires python compiled with sqlite support.

Example:

> pma -b sqlite -s "dbname=/etc/mail/mail.db" init
Initializing database
> pma -b sqlite -s "dbname=/etc/mail/mail.db" domain add
...
  • MySQL

Requires python-mysql installed

Example:

> pma -b mysql -s "host=127.0.0.1;user=dbadmin;pass=dbpass;dbname=mail" init
Initializing database
> pma -b mysql -s "host=127.0.0.1;user=dbadmin;pass=dbpass;dbname=mail" domain add
...
  • PSQL

Requires psycopg2 installed

Example:

> pma -b pgsql -s "host=127.0.0.1;user=dbadmin;pass=dbpass;dbname=mail" init
Initializing database
> pma -b pgsql -s "host=127.0.0.1;user=dbadmin;pass=dbpass;dbname=mail" domain add
...

About

Email manager for virtual domain database backends

License:BSD 2-Clause "Simplified" License


Languages

Language:Python 100.0%