Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

POSTFIXADMIN_SETUP_PASSWORD does nothing #63

Open
alaw005 opened this issue May 28, 2023 · 2 comments
Open

POSTFIXADMIN_SETUP_PASSWORD does nothing #63

alaw005 opened this issue May 28, 2023 · 2 comments

Comments

@alaw005
Copy link

alaw005 commented May 28, 2023

I set the POSTFIXADMIN_SETUP_PASSWORD using environment variable but this appears to do nothing as I can't login to setup.php page using the specified password.

@alaw005
Copy link
Author

alaw005 commented May 28, 2023

The following is a work around

Install using docker compose

docker-compose.yml file is

ersion: "3.9"

services:

  postfixadmin:
    image: postfixadmin
    ports:
      - "8080:80"
    environment:
      POSTFIXADMIN_DB_TYPE: sqlite
    volumes:
      - dovecot-postfixadmin:/var/www

  dovecot:
    image: dovecot/dovecot:2.3.20
    ports:
      - "143:143"
    volumes:
      - dovecot-config:/etc/dovecot
      - dovecot-mail:/srv/mail

volumes:
  dovecot-config:
  dovecot-mail:
  dovecot-postfixadmin:

Note the POSTFIXADMIN_SETUP_PASSWORD environment variable for specifying a setup_password does
not work so need to do the following to generate it and get postfixadmin going.

docker compose up -d

Navigate to webpage

http://dockerhost.local:8080/setup.php

Enter setup password in relevant section

Copy the hash generated

Edit /var/www/html/config.local.php from the volume created by docker compose

(or connect to container and edit within container)

Add the generated hash to relevant row:

$CONF['setup_password'] = 'copiedhashfromabove';

Now restart docker (noting will only be saved if using volumes)

You can now connect to the setup.php page again and create and admin user

http://dockerhost.local:8080/setup.php

Once admin user is created can log into postfix admin using

http://dockerhost.local:8080

@CodeWithMa
Copy link

You have set the environment variable to copiedhashfromabove. Not to the plain text password.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants