I need some help with my Dovecot and Postfix configs - I'm unable to log in on my mail server
Hello,
currently I'm working on my first mailserver but I can't log in to the account I made. For now my client (Mozlla Thunderbird) detects the server config (STARTTLS, Port, ...) but it is "Unable to log in at server. Probbly wrong configuration, username or passsword".
I know that I added username and password correctly so there must something else be wrong.
I run Debian 10 x64 on a fresh installation. Installed are: postfix, postfix-pcre, dovecot-core, dovecot-imapd and dovecot-pop3d. Dovecot is version 2.3.4.1, Postfix is 3.4.10.
Here are my configurations: Postfix main.cf: https://pastebin.com/S17jWDQd Postfix master.cf: https://pastebin.com/W0nynZG6 dovecot.conf: https://pastebin.com/tMD90Znn
This is what my server logs (mail.info, mail.warn) tell me: root@bgrsld-mail0:~# tail /var/log/mail.info Jul 17 18:22:08 bgrsld-mail0 postfix/submission/smtpd[8472]: improper command pipelining after EHLO from unknown[192.168.2.110]: QUIT\r\n Jul 17 18:22:08 bgrsld-mail0 postfix/submission/smtpd[8465]: disconnect from unknown[192.168.2.110] ehlo=1 quit=1 commands=2 Jul 17 18:22:08 bgrsld-mail0 postfix/submission/smtpd[8472]: disconnect from unknown[192.168.2.110] ehlo=1 quit=1 commands=2 Jul 17 18:24:59 bgrsld-mail0 postfix/submission/smtpd[8485]: warning: dict_nis_init: NIS domain name not set - NIS lookups disabled Jul 17 18:24:59 bgrsld-mail0 postfix/submission/smtpd[8485]: connect from unknown[192.168.2.110] Jul 17 18:24:59 bgrsld-mail0 postfix/submission/smtpd[8485]: improper command pipelining after EHLO from unknown[192.168.2.110]: QUIT\r\n Jul 17 18:24:59 bgrsld-mail0 postfix/submission/smtpd[8485]: disconnect from unknown[192.168.2.110] ehlo=1 quit=1 commands=2 Jul 17 18:28:19 bgrsld-mail0 postfix/anvil[8473]: statistics: max connection rate 2/60s for (submission:192.168.2.110) at Jul 17 18:22:08 Jul 17 18:28:19 bgrsld-mail0 postfix/anvil[8473]: statistics: max connection count 2 for (submission:192.168.2.110) at Jul 17 18:22:08 Jul 17 18:28:19 bgrsld-mail0 postfix/anvil[8473]: statistics: max cache size 1 at Jul 17 18:22:08 root@bgrsld-mail0:~# tail /var/log/mail.warn Jul 17 18:21:50 bgrsld-mail0 postfix/postfix-script[8290]: warning: symlink leaves directory: /etc/postfix/./makedefs.out Jul 17 18:22:08 bgrsld-mail0 postfix/submission/smtpd[8465]: warning: dict_nis_init: NIS domain name not set - NIS lookups disabled Jul 17 18:22:08 bgrsld-mail0 postfix/submission/smtpd[8472]: warning: dict_nis_init: NIS domain name not set - NIS lookups disabled Jul 17 18:24:59 bgrsld-mail0 postfix/submission/smtpd[8485]: warning: dict_nis_init: NIS domain name not set - NIS lookups disabled
(I removed any information from older issues that are already solved, thats why mail.warn misses a few lines and there is no mail.err, mail.err hadn't any newer messages)
Here is my only line from dovecot's userpass file (/maildata/userpass):
nils@intern.xxx.xxx:{CRYPT}$2y$05$kkxElxFGsLSyTJwbEaPZzO/QA33vGY3oGyHcgEZa9rpklgBTKQw9O
My postfix vhosts file (/maildir/vhosts)
intern.xxx.xxx
My postfix vmaps file (/maildir/vmaps)
nils@intern.xxx.xxx intern.xxx.xxx/nils/
I've also created the hased database with 'postmap /maildata/vmaps'
This is the script I've used to create my user database: https://pastebin.com/9uViNqjB
I haven't worked with postfiy or dovecot yet so there are many things I don't know. Because of this a lot of my configurations is copied from an iRedMail installation. I know that taking these configs may cause some problems but I don't know where to change them or what else is wrong or missing.
Thank you for any help!
On Sun, 19 Jul 2020, Nils wrote:
This is what my server logs (mail.info, mail.warn) tell me: root@bgrsld-mail0:~# tail /var/log/mail.info Jul 17 18:22:08 bgrsld-mail0 postfix/submission/smtpd[8472]: improper command pipelining after EHLO from unknown[192.168.2.110]: QUIT\r\n Jul 17 18:22:08 bgrsld-mail0 postfix/submission/smtpd[8465]: disconnect from unknown[192.168.2.110] ehlo=1 quit=1 commands=2 [...]
Thunderbird, for some reason, violates the SMTP standard when attempting autoconfiguration. It sends multiple commands ("pipelining") without postfix having announced that it's OK to do so.
You can either do the configuration manually (when Thunderbird fails, I think you can still go to "manual" or "advanced" or whatever button to continue with the configuration), or you could, at least temporarily, disable postscreen (which is the only complaining -- rightly -- about the improper pipelining), and then enable it again once you have configured your account.
You can also read: https://developer.mozilla.org/en-US/docs/Mozilla/Thunderbird/Autoconfigurati...
and set-up the necessary XML file at your server so that Thunderbird can pickup the settings automatically. I've done this for one server, but don't have the details anymore in my head. The link above should explain that all though.
Good luck! Bernardo
On 19/7/20 8:43 pm, Bernardo Reino wrote:
You can also read: https://developer.mozilla.org/en-US/docs/Mozilla/Thunderbird/Autoconfigurati...
and set-up the necessary XML file at your server so that Thunderbird can pickup the settings automatically. I've done this for one server, but don't have the details anymore in my head. The link above should explain that all though.
This may help with auto configuration if PHP is available...
https://raw.githubusercontent.com/netserva/sh/master/etc/_.well-known_autodi...
Autocinfiguration is fine, my problem is that once everything is (auto)configurated (correctly, checked this) that the server doesn't accept my login request. STARTTLS is correct, ports are correct etc. My mail is correct, my password is correct (tried with copy paste) and also with name as username and name@domain aswell (name was also copy pasted).
On 19/07/2020 12:43, Bernardo Reino wrote:
On Sun, 19 Jul 2020, Nils wrote:
This is what my server logs (mail.info, mail.warn) tell me: root@bgrsld-mail0:~# tail /var/log/mail.info Jul 17 18:22:08 bgrsld-mail0 postfix/submission/smtpd[8472]: improper command pipelining after EHLO from unknown[192.168.2.110]: QUIT\r\n Jul 17 18:22:08 bgrsld-mail0 postfix/submission/smtpd[8465]: disconnect from unknown[192.168.2.110] ehlo=1 quit=1 commands=2 [...]
Thunderbird, for some reason, violates the SMTP standard when attempting autoconfiguration. It sends multiple commands ("pipelining") without postfix having announced that it's OK to do so.
You can either do the configuration manually (when Thunderbird fails, I think you can still go to "manual" or "advanced" or whatever button to continue with the configuration), or you could, at least temporarily, disable postscreen (which is the only complaining -- rightly -- about the improper pipelining), and then enable it again once you have configured your account.
You can also read: https://developer.mozilla.org/en-US/docs/Mozilla/Thunderbird/Autoconfigurati...
and set-up the necessary XML file at your server so that Thunderbird can pickup the settings automatically. I've done this for one server, but don't have the details anymore in my head. The link above should explain that all though.
Good luck! Bernardo
Am 19.07.2020 um 10:20 schrieb Nils:
Here are my configurations: Postfix main.cf: https://pastebin.com/S17jWDQd Postfix master.cf: https://pastebin.com/W0nynZG6 dovecot.conf: https://pastebin.com/tMD90Znn
Please provide your configurations processed by the tools postconf and doveconf.
This is what my server logs (mail.info, mail.warn) tell me: root@bgrsld-mail0:~# tail /var/log/mail.info Jul 17 18:22:08 bgrsld-mail0 postfix/submission/smtpd[8472]: improper command pipelining after EHLO from unknown[192.168.2.110]: QUIT\r\n Jul 17 18:22:08 bgrsld-mail0 postfix/submission/smtpd[8465]: disconnect from unknown[192.168.2.110] ehlo=1 quit=1 commands=2 Jul 17 18:22:08 bgrsld-mail0 postfix/submission/smtpd[8472]: disconnect from unknown[192.168.2.110] ehlo=1 quit=1 commands=2 Jul 17 18:24:59 bgrsld-mail0 postfix/submission/smtpd[8485]: warning: dict_nis_init: NIS domain name not set - NIS lookups disabled Jul 17 18:24:59 bgrsld-mail0 postfix/submission/smtpd[8485]: connect from unknown[192.168.2.110] Jul 17 18:24:59 bgrsld-mail0 postfix/submission/smtpd[8485]: improper command pipelining after EHLO from unknown[192.168.2.110]: QUIT\r\n Jul 17 18:24:59 bgrsld-mail0 postfix/submission/smtpd[8485]: disconnect from unknown[192.168.2.110] ehlo=1 quit=1 commands=2 Jul 17 18:28:19 bgrsld-mail0 postfix/anvil[8473]: statistics: max connection rate 2/60s for (submission:192.168.2.110) at Jul 17 18:22:08 Jul 17 18:28:19 bgrsld-mail0 postfix/anvil[8473]: statistics: max connection count 2 for (submission:192.168.2.110) at Jul 17 18:22:08 Jul 17 18:28:19 bgrsld-mail0 postfix/anvil[8473]: statistics: max cache size 1 at Jul 17 18:22:08 root@bgrsld-mail0:~# tail /var/log/mail.warn Jul 17 18:21:50 bgrsld-mail0 postfix/postfix-script[8290]: warning: symlink leaves directory: /etc/postfix/./makedefs.out Jul 17 18:22:08 bgrsld-mail0 postfix/submission/smtpd[8465]: warning: dict_nis_init: NIS domain name not set - NIS lookups disabled Jul 17 18:22:08 bgrsld-mail0 postfix/submission/smtpd[8472]: warning: dict_nis_init: NIS domain name not set - NIS lookups disabled Jul 17 18:24:59 bgrsld-mail0 postfix/submission/smtpd[8485]: warning: dict_nis_init: NIS domain name not set - NIS lookups disabled
There is no SMTP AUTH in the log. Provide the logs from a connection where your MUA tries to auth.
And fix the dict_nis_init thing. See alias_maps.
Alexander
Postconf: https://pastebin.com/vTVn2UMr Doveconf: https://pastebin.com/nEpZrpzB
all my logs from mail.(warn,err,info,log): https://pastebin.com/ccEVUqyd my messges log: https://pastebin.com/cXaEBmcH
I'm not sure if you meant this about dict_nis_init but I've done what's explained here: https://unix.stackexchange.com/questions/244199/postfix-mail-logs-keep-showi...
On 19/07/2020 21:05, Alexander Dalloz wrote:
Am 19.07.2020 um 10:20 schrieb Nils:
Here are my configurations: Postfix main.cf: https://pastebin.com/S17jWDQd Postfix master.cf: https://pastebin.com/W0nynZG6 dovecot.conf: https://pastebin.com/tMD90Znn
Please provide your configurations processed by the tools postconf and doveconf.
This is what my server logs (mail.info, mail.warn) tell me: root@bgrsld-mail0:~# tail /var/log/mail.info Jul 17 18:22:08 bgrsld-mail0 postfix/submission/smtpd[8472]: improper command pipelining after EHLO from unknown[192.168.2.110]: QUIT\r\n Jul 17 18:22:08 bgrsld-mail0 postfix/submission/smtpd[8465]: disconnect from unknown[192.168.2.110] ehlo=1 quit=1 commands=2 Jul 17 18:22:08 bgrsld-mail0 postfix/submission/smtpd[8472]: disconnect from unknown[192.168.2.110] ehlo=1 quit=1 commands=2 Jul 17 18:24:59 bgrsld-mail0 postfix/submission/smtpd[8485]: warning: dict_nis_init: NIS domain name not set - NIS lookups disabled Jul 17 18:24:59 bgrsld-mail0 postfix/submission/smtpd[8485]: connect from unknown[192.168.2.110] Jul 17 18:24:59 bgrsld-mail0 postfix/submission/smtpd[8485]: improper command pipelining after EHLO from unknown[192.168.2.110]: QUIT\r\n Jul 17 18:24:59 bgrsld-mail0 postfix/submission/smtpd[8485]: disconnect from unknown[192.168.2.110] ehlo=1 quit=1 commands=2 Jul 17 18:28:19 bgrsld-mail0 postfix/anvil[8473]: statistics: max connection rate 2/60s for (submission:192.168.2.110) at Jul 17 18:22:08 Jul 17 18:28:19 bgrsld-mail0 postfix/anvil[8473]: statistics: max connection count 2 for (submission:192.168.2.110) at Jul 17 18:22:08 Jul 17 18:28:19 bgrsld-mail0 postfix/anvil[8473]: statistics: max cache size 1 at Jul 17 18:22:08 root@bgrsld-mail0:~# tail /var/log/mail.warn Jul 17 18:21:50 bgrsld-mail0 postfix/postfix-script[8290]: warning: symlink leaves directory: /etc/postfix/./makedefs.out Jul 17 18:22:08 bgrsld-mail0 postfix/submission/smtpd[8465]: warning: dict_nis_init: NIS domain name not set - NIS lookups disabled Jul 17 18:22:08 bgrsld-mail0 postfix/submission/smtpd[8472]: warning: dict_nis_init: NIS domain name not set - NIS lookups disabled Jul 17 18:24:59 bgrsld-mail0 postfix/submission/smtpd[8485]: warning: dict_nis_init: NIS domain name not set - NIS lookups disabled
There is no SMTP AUTH in the log. Provide the logs from a connection where your MUA tries to auth.
And fix the dict_nis_init thing. See alias_maps.
Alexander
Am 19.07.2020 um 21:44 schrieb Nils:
Postconf: https://pastebin.com/vTVn2UMr Doveconf: https://pastebin.com/nEpZrpzB
Oh no, please
postconf -n postconf -Mf doveconf -n
all my logs from mail.(warn,err,info,log): https://pastebin.com/ccEVUqyd
Make sure your MUA is setup to make a STARTTLS connection to Postfix's submission port. I don't see that in your logs.
my messges log: https://pastebin.com/cXaEBmcH
See https://doc.dovecot.org/admin_manual/logging/ for debugging your connections to dovecot.
I'm not sure if you meant this about dict_nis_init but I've done what's explained here: https://unix.stackexchange.com/questions/244199/postfix-mail-logs-keep-showi...
I still see "warning: dict_nis_init: NIS domain name not set - NIS lookups disabled" in your pasted logs.
Alexander
Oh no, please I'm sorry, here: postconf -n https://pastebin.com/UQQhieMy postconf -Mf https://pastebin.com/AHEUSkfQ doveconf -n https://pastebin.com/s7DVY9XW
Make sure your MUA is setup to make a STARTTLS connection to Postfix's submission port. I don't see that in your logs. https://imgur.com/a/3MJXRUh This is the configuration. Afaik thats also the correct port for SMTP. I've also checked that all the ports are open on the server (via netstat): https://pastebin.com/tY6rSi8y I have (currently) no firewall installed so there aren't any ports blocked either. Since it's in an internal network there is also no ISP which can block any ports (and I've also already added a few mailboxes from other sources without any problems).
I still see "warning: dict_nis_init: NIS domain name not set - NIS lookups disabled" in your pasted logs. It's only there bc this logs are made before I made the change in config regarding this. Can't find it in any newer entries after restarting postfix.
On 19/07/2020 21:53, Alexander Dalloz wrote:
Am 19.07.2020 um 21:44 schrieb Nils:
Postconf: https://pastebin.com/vTVn2UMr Doveconf: https://pastebin.com/nEpZrpzB
Oh no, please
postconf -n postconf -Mf doveconf -n
all my logs from mail.(warn,err,info,log): https://pastebin.com/ccEVUqyd
Make sure your MUA is setup to make a STARTTLS connection to Postfix's submission port. I don't see that in your logs.
my messges log: https://pastebin.com/cXaEBmcH
See https://doc.dovecot.org/admin_manual/logging/ for debugging your connections to dovecot.
I'm not sure if you meant this about dict_nis_init but I've done what's explained here: https://unix.stackexchange.com/questions/244199/postfix-mail-logs-keep-showi...
I still see "warning: dict_nis_init: NIS domain name not set - NIS lookups disabled" in your pasted logs.
Alexander
Am 19.07.2020 um 22:08 schrieb Nils:
I still see "warning: dict_nis_init: NIS domain name not set - NIS lookups disabled" in your pasted logs. It's only there bc this logs are made before I made the change in config regarding this. Can't find it in any newer entries after restarting postfix.
Then please provide current log content. Not the old one with the MUA's autoconfig using pipelining. It is important to see the failure track when you try to send a mail through port 587.
Alexander
I've restarted the server and attepted a login with everything prefilled so only the login attempt is logged. Here are the messages from this attempt: https://pastebin.com/hejRQBji There is no mail.err
If there are any other logs I can provide that I totally missed please tell me.
On 19/07/2020 22:46, Alexander Dalloz wrote:
Am 19.07.2020 um 22:08 schrieb Nils:
> I still see "warning: dict_nis_init: NIS domain name not set - NIS lookups disabled" in your pasted logs. It's only there bc this logs are made before I made the change in config regarding this. Can't find it in any newer entries after restarting postfix.
Then please provide current log content. Not the old one with the MUA's autoconfig using pipelining. It is important to see the failure track when you try to send a mail through port 587.
Alexander
Nils skrev den 2020-07-19 21:44:
Postconf: https://pastebin.com/vTVn2UMr Doveconf: https://pastebin.com/nEpZrpzB
postconf -nf doveconf -n
all the above was is just defaults, not very helpfull
participants (6)
-
Alexander Dalloz
-
Benny Pedersen
-
Bernardo Reino
-
lists
-
Mark Constable
-
Nils