Sign inSign up

webkutir/postfixadmin

By webkutir

•Updated over 1 year ago

Postfix Admin - web based administration interface for Postfix mail servers.

Image
Developer tools
0

266

webkutir/postfixadmin repository overview

⁠Quick Reference

⁠What is Postfix Admin

Postfix Admin is a web based interface to configure and manage a Postfix based email server for many users. Features include support for virtual domains and aliases, quotas, and vacation/out-of-the-office messages. It requires PHP, Postfix and one of MySQL or PostgreSQL.

logo.png

⁠Prerequisites

The following components must be available at runtime:

⁠How to use this image?

docker run -e PFA_DB_USER=user \
       -e PFA_DB_PASSWORD=topsecret \
       -e PFA_DB_NAME=postfixadmin \
       -e PFA_SETUP_PASS=your_setup_password \
       -e PFA_HOSTNAME=your_server_hostname \
       -e PFA_DOMAIN=your_domain \
       -e VIRTUAL_PORT=3000 \
       --name your-postfixadmin-name \
    webkutir/postfixadmin

...via docker_compose⁠

Example compose.yaml for webkutir/postfixadmin:

services:
  db:
    image: mysql:8.0
    restart: always
    environment:
      MYSQL_RANDOM_ROOT_PASSWORD: 1
      MYSQL_DATABASE: postfixadmin
      MYSQL_USER: postfixadmin
      MYSQL_PASSWORD: example

  postfixadmin:
    depends_on:
      - db
    image: webkutir/postfixadmin
    ports:
      - 3000:3000
    restart: always
    environment:
      PFA_DB_USER: user
      PFA_DB_PASSWORD: topsecret
      PFA_DB_NAME: postfixadmin
      PFA_SETUP_PASS: your_setup_password
      PFA_HOSTNAME: your_server_hostname
      PFA_DOMAIN: your_domain
      VIRTUAL_PORT: 3000

Run docker compose up -d --build, wait for it to initialize completely, and visit http://localhost:3000 or http://host-ip:3000 (as appropriate).

⁠Environment Variables

This image requires various environment variables to be set. The container startup will fail when the setup is incomplete.

VariableDescriptionDefault Value
PFA_SETUP_PASSMandatory The PostfixAdmin setup password.
PFA_DB_USERMandatory The name of the database user. Attention! You shall not use an administrator account.
PFA_DB_PASSWORDMandatory The password of the database user
PFA_DB_NAMEMandatory The name of the database
PFA_HOSTNAMEMandatory Your mail server's Hostname
PFA_DOMAINMandatory Your mail server's Domain
VIRTUAL_PORTMandatory Port on which your server will run3000
PFA_DB_HOSTThe hostname or IP address of the database server. You can specify port with this like localhost:8080localhost
PFA_DB_TYPEType of your Database mysqli or pgsqlmysqli
PFA_POSTFIX_SERVERThe hostname of your SMTP server. Postfix requires this to send out initial e-mail for mailboxes. You can specify port with this like localhost:8080localhost
PFA_THEME_FAVICONPath of your own Favicon file.images/favicon.ico
PFA_THEME_LOGOPath of your own Logo file.images/logo.png

⁠Ports

webkutir/postfixadmin exposes port 80 and 443 (the WebUI). No TLS support is built in. So you shall put your container behind an Ingress or Reverse Proxy that enforces HTTPS.

⁠Bootstrap and Setup

Once you have started your PostfixAdmin container successfully, it is now time to perform the first-time setup for your mailserver. Open the web interface and navigate to /index.php.

  1. Enter the setup password as you provided it with environment variable PFA_SETUP_PASS.
  2. Create your PostfixAdmin administrator account. This is the main account to PostfixAdmin. It will enable you to create domains, mailboxes, aliases, etc.
  3. Login to PostfixAdmin by navigating to /login.php.
  4. Create your primary domain.
  5. Create your first mailbox in this domain.

⁠Additional PostfixAdmin customization

You can further customize the configuration by placing a config.site.php into the /var/www/html folder by using a volume mapping.

⁠Issues

This Docker image is mature and supports my own mailserver in production. There are no known issues at the moment.

Tag summary

Content type

Image

Digest

sha256:e8c31bffb…

Size

141.5 MB

Last updated

over 1 year ago

docker pull webkutir/postfixadmin