Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.
 
 
 
alice 65d7d22797 update dependencies 1 неделю назад
alembic Import previous repo 2 лет назад
pizzavolus update dependencies 1 неделю назад
.gitignore update dependencies 1 неделю назад
LICENSE Import previous repo 2 лет назад
README.md Import previous repo 2 лет назад
development.ini Import previous repo 2 лет назад
poetry.lock update dependencies 1 неделю назад
production.ini Import previous repo 2 лет назад
pyproject.toml update dependencies 1 неделю назад
setup.py Import previous repo 2 лет назад

README.md

PizzaVolus

PizzaVolus is a web interface to manage virtual mail domains, boxes and aliases for postfix and dovecot.

It can be used to let people register an email address on open domains, and owners of addresses to set or not a redirect and change their own password.

A public instance is hosted by CCrypto : https://mail.ccrypto.org/

Installation

Copy a .ini file and edit it. Only PostgreSQL databases are supported for now.

sqlalchemy.url = postgresql+psycopg2://pizza:C1tad3l@127.0.0.1/pizza

Then create the database structure with pv-initdb local.ini and start a dev server with pserve local.ini

The default admin user is Admin:root, users can be added/modified with pv-user.

Postfix & Dovecot

For Debian using postfix’s default “Internet Site” configuration

Optional: Create a limited access PostgreSQL role and copy an .ini file to use it:

CREATE ROLE pizza_ro WITH PASSWORD '...';
GRANT SELECT ON addresses, domains TO pizza_ro;

pv-config will make files with SQL details and queries for each server:

pv-config local.ini postfix_domains > /etc/postfix/pg_domains.cf
pv-config local.ini postfix_aliases > /etc/postfix/pg_aliases.cf
pv-config local.ini postfix_mailboxes > /etc/postfix/pg_mailboxes.cf
pv-config local.ini dovecot > /etc/dovecot/dovecot-sql.conf.ext

You also need an user for virtual mail accounts:

groupadd vmail --gid 500
useradd vmail --uid 500 --gid 500 --create-home

Make postfix use that, add in main.cf:

virtual_mailbox_domains = pgsql:/etc/postfix/pg_domains.cf
virtual_alias_maps = pgsql:/etc/postfix/pg_aliases.cf
virtual_mailbox_maps = pgsql:/etc/postfix/pg_mailboxes.cf
virtual_transport = dovecot

virtual_mailbox_base = /home/vmail/
virtual_gid_maps = static:500
virtual_uid_maps = static:500

smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth
smtpd_sasl_auth_enable = yes

Make sure your virtual domains are not listed in mydestination.

And in master.cf:

dovecot   unix  -       n       n       -       -       pipe
  flags=DRhu user=vmail:vmail argv=/usr/lib/dovecot/deliver -f ${sender} -d ${user}@${nexthop}

For dovecot, enable SQL auth in /etc/dovecot/conf.d/auth-sql.conf.ext:

passdb {
  driver = sql
  args = /etc/dovecot/dovecot-sql.conf.ext
}
userdb {
  driver = static
  args = uid=vmail gid=vmail home=/home/vmail/%u
}

/etc/dovecot/conf.d/10-auth.conf, uncomment:

!include auth-sql.conf.ext

/etc/dovecot/conf.d/10-master.conf, find and uncomment this block for SASL auth:

  # Postfix smtp-auth
  unix_listener /var/spool/postfix/private/auth {
    mode = 0666
  }

CSV Import

A previous database can be imported as CSV with pv-importcsv:

  • Local part
  • crypt()‘d password
  • Redirect, if any
  • Domain name