Posrfixadmin on another server than postfix

1

I am trying to setup public email service using postfix and postfixadmin. All manuals I can find on Internet so far expect that postfix and postfixadmin are installed on the same server.

My question is how to setup postfixadmin on one server. (My current approach is docker instance of just postfixadmin)

But real mail server with postfix is another dedicated server.

Same as MySQL server is dedicated.

I was able successfully link MySQL to both :

postfixadmin (dockered)

and

postfix (runninig some postmap commands to check that I connected to MySql correctly)

So now I am on the phase when I want to create an email account using postfixadmin. Which kind working fine. I mean no error messages and mysql is showing new record.

But I think postfix server has no idea about that user and especially about that user password.

So when I try to test email using my gmail "Add another email"

that account returns

Authentication failed. Please check your username/password. Server returned an error: "Unspecified Error (SENT_SECOND_EHLO): Smtp server does not advertise AUTH capability, code: 0"

Please point me where to start the investigation.

I know that postfix set up is kind not finished. I've applied few conf changes from one or another source. But I think current problem is communication from posfixadmin to postfix. How and when password should apply to user account?

UPDATE 1 I've found that plain AUTHorization was disabled. I've added

 smtpd_sasl_auth_enable = yes

to my main.cf, now error is different:

Authentication failed. Please check your username/password. Server returned an error: "535 5.7.8 Error: authentication failed: authentication failure , code: 535"

but I still have feelings that the problem is account and password does not exist for postfix.

Alex

Posted 2018-02-14T15:29:34.323

Reputation: 111

How did you let postfix know that it should be using MySQL as user account database? Did you setup virtual_mailbox_maps, virtual_mailbox_domains and virtual_alias_maps in /etc/postfix/main.cf ? Each time mail arrives postfix should run a SQL query... – Marek Rost – 2018-02-14T15:49:57.560

Yes I did. virtual_mailbox_domains = mysql:/etc/postfix/mysql-virtual-mailbox-domains.cf virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual-mailbox-maps.cf virtual_alias_maps = mysql:/etc/postfix/mysql-virtual-alias-maps.cf and checked with commands like postmap -q example.com mysql:/etc/postfix/mysql-virtual-mailbox-domains.cfto be sure that postfix can communicate with mysql – Alex – 2018-02-14T15:52:24.770

Comment to Update1: Of course they don't. You need to setup that SASL so postfix understands how to authenticate. Follow this for example: https://dropbear.xyz/2005/03/09/postfixmysql/

– Marek Rost – 2018-02-14T16:41:15.963

No answers