選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。
 
 
 
alice 14460436f7 update deps 1年前
alembic Import previous repo 4年前
pizzavolus hcaptcha, address randomization 1年前
.gitignore update dependencies 1年前
LICENSE Import previous repo 4年前
README.md Import previous repo 4年前
development.ini switch to hcaptcha 1年前
poetry.lock update deps 1年前
production.ini switch to hcaptcha 1年前
pyproject.toml switch to psycopg2-binary 1年前
setup.py Import previous repo 4年前

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