Skip to content

technicalguru/docker-mailserver-postfixadmin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

docker-mailserver-postfixadmin

This is a Docker image for a PostfixAdmin WebUI. The project is part of the docker-mailserver project but can run separately without the other components. However, a database server is always required to store structural data.

Related images:

Tags

The following versions are available from DockerHub. The image tag matches the PostfixAdmin version.

Features

  • Database and PostfixAdmin setup from environment variables

License

docker-mailserver-postfixadmin is licensed under GNU LGPL 3.0. As with all Docker images, these likely also contain other software which may be under other licenses (such as Bash, etc from the base distribution, along with any direct or indirect dependencies of the primary software being contained).

As for any pre-built image usage, it is the image user's responsibility to ensure that any use of this image complies with any relevant licenses for all software contained within.

Prerequisites

The following components must be available at runtime:

Usage

Environment Variables

docker-mailserver-postfixadmin requires various environment variables to be set. The container startup will fail when the setup is incomplete.

Variable Description Default Value
PFA_SETUP_PASS The PostfixAdmin setup password.
PFA_DB_HOST The hostname or IP address of the database server
PFA_DB_USER The name of the database user. Attention! You shall not use an administrator account.
PFA_DB_PASS The password of the database user
PFA_DB_NAME The name of the database
PFA_POSTFIX_SERVER The hostname of your SMTP server. Postfix requires this to send out initial e-mail for mailboxes.
PFA_ABUSE_EMAIL E-mail address to be informed about abuses.
PFA_HOSTMASTER_EMAIL E-mail address to be informed about issues with the host image.
PFA_POSTMASTER_EMAIL E-mail address to be informed about mailbox and domain issues.
PFA_WEBMASTER_EMAIL E-mail address to be informed about issues with the WebUI.

Ports

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

Running the Container

The main mailserver project has examples of container configurations:

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 /public/setup.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 /public/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.

Contribution

Report a bug, request an enhancement or pull request at the GitHub Issue Tracker. Make sure you have checked out the Contribution Guideline