postfixadmin / docker

Docker Image for PostfixAdmin
https://hub.docker.com/_/postfixadmin
GNU General Public License v2.0
73 stars 21 forks source link

usename and password to login #52

Closed miladev95 closed 2 years ago

miladev95 commented 2 years ago

My Docker compose

db:
    image: mysql:5.7
    restart: always
    environment:
       MYSQL_ROOT_PASSWORD: 123
       MYSQL_DATABASE: postfixadmin
       MYSQL_USER: postfixadmin
       MYSQL_PASSWORD: 123

  postfixadmin:
    depends_on:
      - db
    image: postfixadmin
    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: 123
       POSTFIXADMIN_SMTP_SERVER: postfix
       POSTFIXADMIN_SMTP_PORT: 25
       POSTFIXADMIN_SETUP_PASSWORD: 123
       POSTFIXADMIN_ENCRYPT: md5crypt 

i tried so many username and password but http://localhost:8000/login.php says Your email address or password is not correct.

how can i find default username and password?

DavidGoodwin commented 2 years ago
  1. /login.php is for admins to login. Are you trying to login as a user with a mailbox or as an administrator?
  2. Check the contents of the 'admin' database table - does the expected username exist?
  3. Check the contents of the 'mailbox' database table - what format are your hashes? Do they have a prefix? Do they have e.g. $1$ at the start .... knowing this will help make sure that you have the right POSTFIXADMIN_ENCRYPT setting...
miladev95 commented 2 years ago

thanks for your response, mailbox and admin table are empty , how can i register an adminstrator?

DavidGoodwin commented 2 years ago

visit http://..../setup.php - based on the above your setup password is '123' - that will allow you to add admins into the database.