sebastian-meyer / post-office
This is a Web Frontend for a Mail Server with Postfix and Dovecot.
Package info
github.com/sebastian-meyer/post-office
Type:project
pkg:composer/sebastian-meyer/post-office
Requires
- php: >=8.4
- ext-ctype: *
- ext-filter: *
- ext-iconv: *
- ext-intl: *
- ext-sodium: *
- doctrine/doctrine-bundle: ^3.4.1
- doctrine/doctrine-migrations-bundle: ^4.0.1
- doctrine/orm: ^3.8.0
- mikepultz/netdns2: ^2.0
- opencultureconsulting/updater: ^1.0.0
- phpdocumentor/reflection-docblock: ^6.0.3
- phpstan/phpdoc-parser: ^2.4.1
- symfony/asset: 7.4.*
- symfony/asset-mapper: 7.4.*
- symfony/console: 7.4.*
- symfony/dotenv: 7.4.*
- symfony/expression-language: 7.4.*
- symfony/flex: ^2.12
- symfony/form: 7.4.*
- symfony/framework-bundle: 7.4.*
- symfony/http-client: 7.4.*
- symfony/intl: 7.4.*
- symfony/mailer: 7.4.*
- symfony/mime: 7.4.*
- symfony/monolog-bundle: ^3.0|^4.1.0
- symfony/process: 7.4.*
- symfony/property-access: 7.4.*
- symfony/property-info: 7.4.*
- symfony/rate-limiter: 7.4.*
- symfony/runtime: 7.4.*
- symfony/security-bundle: 7.4.*
- symfony/serializer: 7.4.*
- symfony/stimulus-bundle: ^3.8
- symfony/string: 7.4.*
- symfony/translation: 7.4.*
- symfony/twig-bundle: 7.4.*
- symfony/ux-icons: ^3.8.1
- symfony/ux-turbo: ^3.8
- symfony/ux-twig-component: ^3.8
- symfony/validator: 7.4.*
- symfony/web-link: 7.4.*
- symfony/yaml: 7.4.*
- twig/extra-bundle: ^2.12|^3.31
- twig/twig: ^2.12|^3.31.1
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.95.32
- phpdocumentor/shim: ^3.10.0
- phpmd/phpmd: ^3.0
- phpstan/phpstan: ^2.3.7
- phpstan/phpstan-doctrine: >=2.1.2
- phpstan/phpstan-strict-rules: >=2.1.2
- phpstan/phpstan-symfony: >=2.1.3
- phpunit/phpunit: ^13.4.8
- psalm/plugin-symfony: ^5.14.0
- squizlabs/php_codesniffer: ^4.0.4
- symfony/browser-kit: 7.4.*
- symfony/css-selector: 7.4.*
- symfony/debug-bundle: 7.4.*
- symfony/maker-bundle: ^1.68
- symfony/stopwatch: 7.4.*
- symfony/web-profiler-bundle: 7.4.*
- vimeo/psalm: ^7.19
Suggests
None
Provides
None
Conflicts
- symfony/cache: >=8.0
- symfony/clock: >=8.0
- symfony/config: >=8.0
- symfony/dependency-injection: >=8.0
- symfony/doctrine-bridge: >=8.0
- symfony/dom-crawler: >=8.0
- symfony/error-handler: >=8.0
- symfony/event-dispatcher: >=8.0
- symfony/filesystem: >=8.0
- symfony/finder: >=8.0
- symfony/http-foundation: >=8.0
- symfony/http-kernel: >=8.0
- symfony/monolog-bridge: >=8.0
- symfony/options-resolver: >=8.0
- symfony/password-hasher: >=8.0
- symfony/routing: >=8.0
- symfony/security-core: >=8.0
- symfony/security-csrf: >=8.0
- symfony/security-http: >=8.0
- symfony/symfony: *
- symfony/twig-bridge: >=8.0
- symfony/type-info: >=8.0
- symfony/var-dumper: >=8.0
- symfony/var-exporter: >=8.0
README
A self-service web frontend for mail servers running Postfix and Dovecot.
The Post Office manages the domains, mailboxes, aliases and mailing lists of your mail server, which Postfix and Dovecot read from a shared MariaDB or MySQL database. Every change takes effect immediately, without reloading or restarting anything.
Users manage their own email accounts, and administrators can hand over the management of individual domains and mailing lists to other users. So you don't have to do everything yourself, and nobody needs shell access to the server.
Features
- Self-service for users: everyone logs in with their email address and password to change their name and password, check their storage quota, and see and leave the mailing lists they belong to.
- Delegated management: administrators appoint domain managers, who manage all accounts and mailing lists of their domains, and domain managers appoint list managers, who look after the members and settings of individual mailing lists.
- All common account types: mailboxes with storage quota, send-only addresses, aliases, mailing lists (open or members-only) and catch-all addresses are supported.
- Mail server administration: TLS policies for outgoing emails and a blacklist of senders, managed right in the browser. Additionally, administrators can perform DNS health checks for mail domains.
- Bulk emails and notifications: managers write emails to selected or all addresses of their domains and mailing lists.
- Secure by default: strong passwords that are checked against known data breaches, rate-limited logins, and permissions that are checked on every action.
- Available in English and German, chosen automatically according to the user's browser language.
Requirements
- PHP 8.4 or later with the extensions
ctype,iconv,intlandpdo_mysql - MariaDB 10.11 or later (recommended) or MySQL 8.0 or later
- A web server which can run PHP applications (e.g. Nginx with PHP-FPM, or Apache with PHP-FPM or
mod_php), reachable via HTTPS - Composer 2.3 or later
- Postfix 3.6 or later and Dovecot 2.3 or 2.4, both with MySQL support
Quick Start
The intended and recommended way of installing this application is via Composer. The following command will get you the latest version:
composer create-project sebastian-meyer/post-office --ask --no-dev
All available versions as well as further information about requirements and dependencies can be found on Packagist.
Then, in short:
-
Create a file
.env.localwith at least yourAPP_SECRET,DATABASE_URLandDEFAULT_URI. -
Create the database tables, compile the assets and warm up the cache:
php bin/console doctrine:migrations:migrate php bin/console asset-map:compile php bin/console cache:clear
-
Point your web server's document root to the
./public/directory. -
Create the first domain and administrator account:
php bin/console app:domain:add example.com php bin/console app:account:add admin@example.com --name="Jane Doe"Then add the printed account ID to
ADMIN_IDSin your.env.localand log in. -
Configure Postfix and Dovecot to use the database of the Post Office.
The installation guide explains each step in detail, including the database users and a sample Nginx configuration.
Upgrading
The Post Office comes with the Composer Updater, so upgrading to a new version is as easy as:
composer app:upgrade --list # list available versions composer app:upgrade # upgrade to the latest stable release
This downloads and installs the new version and its dependencies, runs the database migrations and compiles the frontend assets. Make a backup of your database first and check the changelog for breaking changes. The upgrade guide has all the details, including how to upgrade from v1.1.0 or earlier.
Full Documentation
The full documentation is available on GitHub Pages. It covers
- the setup: requirements, installation, configuration, maintenance and upgrades,
- the mail server: how to set up Postfix and Dovecot to work with the Post Office, and
- the usage: first steps, roles, and managing accounts, mailing lists and the mail server.
Quality Gates
This application follows the highest coding standards of PHPStan, Psalm, PHP Mess Detector, PHP_CodeSniffer, and complies to PSR-12 code style guidelines to make sure it is reliable, maintainable and easily reusable.
Assisted-by: Claude Opus 5.5 (Anthropic)
Contributing
Contributions are welcome! Please read the contribution guidelines first.
License
The Post Office is free software licensed under the GNU General Public License v3.0 or later.