| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
The following variant are currently provided:
This starts an Apache webserver with PHP, so you can use postfixadmin out of the box.
This image has a very small footprint. It is based on Alpine Linux and starts only a PHP FPM process. Use this variant if you already have a seperate webserver.
If you need more tools, that are not available on Alpine Linux, use the fpm image instead.
This image is based on Debian and starts only a PHP FPM container.
Use this variant if you already have a seperate webserver.
Some knowledge of Postfixadmin is assumed.
Advanced users will probably want to specify a custom configuration (config.local.php file).
If you're just trying out the software, there's probably no need for a config.local.php file.
You have two options :
You can configure this through the following environment variables when running the docker container.
Note: An SQLite database is probably not recommended for production use, but is a quick and easy way to try out the software without dependencies.
Note2: For details about database password encryption please refer to the postfixadmin hashing documentation
You can also set the postfix host and port.
You can enable DKIM through the following enviroment variables
As an alternative to passing sensitive information via environment variables, _FILE may be appended to some of the previously listed environment variables, causing the initialization script to load the values for those variables from files present in the container. In particular, this can be used to load passwords from Docker secrets stored in /run/secrets/<secret_name> files. For example:
docker run -e POSTFIXADMIN_DB_USER_FILE=/run/secrets/postfix-db-user
-e POSTFIXADMIN_DB_PASSWORD_FILE=/run/secrets/postfix-db-passwd
-e POSTFIXADMIN_SETUP_PASSWORD_FILE=/run/secrets/postfix-setup-passwd
postfixadminAll environment vars are supporting the secret's docker strategy.
Note, the POSTFIXADMIN_SETUP_PASSWORD varaible contains dollar signs, so needs quoting to avoid variable expansion. See also #63
Setup password is : mysecretpassword
docker run -e POSTFIXADMIN_DB_TYPE=mysqli \
-e POSTFIXADMIN_DB_HOST=whatever \
-e POSTFIXADMIN_DB_USER=user \
-e POSTFIXADMIN_DB_PASSWORD=changeme \
-e POSTFIXADMIN_DB_NAME=postfixadmin \
-e POSTFIXADMIN_SETUP_PASSWORD='$2y$10$3ycavDC7g.JQrxZRRDZ5IuS2O2Y6Rpl79XWTDnbI5nPREYfUIf6dK' \
-e POSTFIXADMIN_SMTP_SERVER=postfix \
-e POSTFIXADMIN_SMTP_PORT=25 \
-e POSTFIXADMIN_ENCRYPT=md5crypt \
-e POSTFIXADMIN_DKIM=YES \
-e POSTFIXADMIN_DKIM_ALL_ADMINS=NO \
--name postfixadmin \
-p 8080:80 \
postfixadminThen visit http://localhost:8080/setup.php. Use mysecretpassword to login to the page.
Postfixadmin's default configuration is stored in a config.inc.php file (see https://github.com/postfixadmin/postfixadmin/blob/master/config.inc.php ).
To customise, copy this file, remove everything you don't want to override, and call it config.local.php.
docker run -v /local/path/to/config.local.php:/var/www/html/config.local.php \
--name postfixadmin \
-p 8080:80 \
postfixadminOnce the container is running, try visiting :
Try something like the below in a docker-compose.yml file; changing the usernames/passwords as required.
This is using a POSTFIXADMIN_SETUP_PASSWORD of 'mysecretpassword'. Note a $ is changed to $$ to get around variable expansion issues ( see #63 )
services:
db:
image: mysql:8.0
restart: always
environment:
MYSQL_ROOT_PASSWORD: notSecureChangeMe
MYSQL_DATABASE: postfixadmin
MYSQL_USER: postfixadmin
MYSQL_PASSWORD: postfixadminPassword
postfixadmin:
depends_on:
- db
image: postfixadmin:latest
ports:
- "8000:80"
restart: always
environment:
POSTFIXADMIN_DB_TYPE: mysqli
POSTFIXADMIN_DB_HOST: db
POSTFIXADMIN_DB_USER: postfixadmin
POSTFIXADMIN_DB_NAME: postfixadmin
POSTFIXADMIN_DB_PASSWORD: postfixadminPassword
POSTFIXADMIN_SMTP_SERVER: postfix
POSTFIXADMIN_SETUP_PASSWORD: $$2y$$10$$8./sbCrwpLGeWv/6auLtC.ROq/pRpm573QNdISESNqZ9p0uoL3eq6
POSTFIXADMIN_SMTP_PORT: 25
POSTFIXADMIN_ENCRYPT: md5crypt
| Back | FazBrowse Home | New Git URL |