Re: First steps in Dovecot; IMAP not working
On 13.10.2016 12:42, Marnaud wrote:
"Aki Tuomi" aki.tuomi@dovecot.fi wrote:
doveconf -n shows what's there. if you have ssl=no somewhere else in the config after you set it to required, it gets overwritten.
Aki
Thanks, Aki. It means I have to open each conf file (e.g. using nano) and search for ssl=no; I'm right or there's a specific file to check?
I see you replied to me only, please keep your replies on-list.
Try grep -r ssl.*no /etc/dovecot
Aki
I think I found the culprit. I had backed files up using cp (e.g. 10-ssl.conf to 10-ssl.default.conf) so if I made mistakes, I could revert easily. It looks like all files in the conf.d folder are included, therefore my backup files overwrote the standard ones.
Now, when I try to send mails, outlook tells me it can't save the message in the "sent" folder (the mail server denies saving there (I'm translating from French, sorry)). The error code is 0x80040119. At least, I don't get the same set of errors.
Thanks, aki, for your previous answer.
Hello,
I've made some more tests and I still can't receive mails; sending them still works. I don't receive any error message, just the mails that are supposed to be received won't come. In the mail logs, I find only this relevant line: dovecot: imap-login: Aborted login (no auth attempts in 2 secs): user=<>
This line (which I shortened to remove IP addresses) seems to indicate there's no user referenced, although I've set the field in Outlook. Is this a problem that looks familiar?
I'm sort of clueless without having an error message.
Hello,
First of all, I'm sorry if you received this mail twice; I haven't received it the first time so I think it was lost. Second attempt.
I've made some more tests and I still can't receive mails. Outlook doesn't complain about anything, no error message; the mails that are supposed to be received just won't appear. In the mail logs, I find this line (other lines are irrelevant): dovecot: imap-login: Aborted login (no auth attempts in 2 secs): user=<> [...]
Is this a problem that looks familiar?
It's a bit clueless without an error message. Any idea welcome.
On 14.10.2016 15:43, Moi wrote:
Hello,
First of all, I'm sorry if you received this mail twice; I haven't received it the first time so I think it was lost. Second attempt.
I've made some more tests and I still can't receive mails. Outlook doesn't complain about anything, no error message; the mails that are supposed to be received just won't appear. In the mail logs, I find this line (other lines are irrelevant): dovecot: imap-login: Aborted login (no auth attempts in 2 secs): user=<> [...]
Is this a problem that looks familiar?
It's a bit clueless without an error message. Any idea welcome.
Please post
doveconf -n
doveadm log errors
Aki Tuomi
doveconf -n: # 2.2.13: /etc/dovecot/dovecot.conf # OS: Linux 2.6.32-042stab116.1 x86_64 Debian 8.6 mail_location = mbox:~/mail:INBOX=/var/mail/%u namespace inbox { inbox = yes location = mailbox Drafts { special_use = \Drafts } mailbox Junk { special_use = \Junk } mailbox Sent { special_use = \Sent } mailbox "Sent Messages" { special_use = \Sent } mailbox Trash { special_use = \Trash } prefix = } passdb { driver = pam } protocols = " imap" service auth { unix_listener /var/spool/postfix/private/auth { group = postfix mode = 0666 user = postfix } } service imap-login { inet_listener imaps { port = 993 ssl = yes } } ssl = required ssl_cert =
And doveadm log errors: Oct 13 05:56:28 imap(webuser): Error: open(/var/mail/webuser) failed: Permission denied (euid=1001(webuser) egid=1000(ftpusers) missing +w perm: /var/mail, we're not in group 8(mail), dir owned by 0:8 mode=0775) Oct 13 05:56:28 imap(webuser): Error: Failed to autocreate mailbox INBOX: Internal error occurred. Refer to server log for more information. [2016-10-13 05:56:28] Oct 13 05:56:33 imap(webuser): Error: open(/var/mail/webuser) failed: Permission denied (euid=1001(webuser) egid=1000(ftpusers) missing +w perm: /var/mail, we're not in group 8(mail), dir owned by 0:8 mode=0775) Oct 13 05:56:33 imap(webuser): Error: Failed to autocreate mailbox INBOX: Internal error occurred. Refer to server log for more information. [2016-10-13 05:56:33] Oct 13 06:52:45 imap(webuser): Error: open(/var/mail/webuser) failed: Permission denied (euid=1001(webuser) egid=1000(ftpusers) missing +w perm: /var/mail, we're not in group 8(mail), dir owned by 0:8 mode=0775) Oct 13 06:52:45 imap(webuser): Error: Failed to autocreate mailbox INBOX: Internal error occurred. Refer to server log for more information. [2016-10-13 06:52:45] Oct 13 07:12:41 imap(webuser): Error: open(/var/mail/webuser) failed: Permission denied (euid=1001(webuser) egid=1000(ftpusers) missing +w perm: /var/mail, we're not in group 8(mail), dir owned by 0:8 mode=0775) Oct 13 07:12:41 imap(webuser): Error: Failed to autocreate mailbox INBOX: Internal error occurred. Refer to server log for more information. [2016-10-13 07:12:41] Oct 13 07:12:50 imap(webuser): Error: open(/var/mail/webuser) failed: Permission denied (euid=1001(webuser) egid=1000(ftpusers) missing +w perm: /var/mail, we're not in group 8(mail), dir owned by 0:8 mode=0775) Oct 13 07:12:50 imap(webuser): Error: Failed to autocreate mailbox INBOX: Internal error occurred. Refer to server log for more information. [2016-10-13 07:12:50]
I checked, using ls -l /var, and I get this: drwxrwsr-x 2 root mail 4096 Apr 27 11:27 mail so the group looks to be correctly set to 'mail', despite what the log says, right?
Thanks for your answer. The second command is nice to know. -----Message d'origine----- De : dovecot [mailto:dovecot-bounces@dovecot.org] De la part de Aki Tuomi Envoyé : 14 October 2016 14:58 À : dovecot@dovecot.org Objet : Re: First steps in Dovecot; IMAP not working
Please post
doveconf -n
doveadm log errors
Aki Tuomi
On October 14, 2016 at 4:16 PM Moi anic297@mac.com wrote:
In your configuration, dovecot uses whatever user/group returned by PAM. Since the webuser has never logged in, it has no directory under /var/mail. If you want, you can
a) override mail_uid and mail_gid in userdb/passdb b) pre-create /var/mail/webuser and chown it to webuser:ftpusers c) you can let ftpusers write to /var/mail.
Aki
Le 14 oct. 2016 à 15:54, Aki Tuomi aki.tuomi@dovecot.fi a écrit:
In your configuration, dovecot uses whatever user/group returned by PAM.
Excuse my ignorance, but what is PAM?
Since the web user has never logged in, it has no directory under /var/mail.
Hmm… So it can’t log in because it has no directory and it has no directory as long as he does not log in, correct?
If you want, you can
a) override mail_uid and mail_gid in userdb/passdb b) pre-create /var/mail/webuser and chown it to webuser:ftpusers c) you can let ftpusers write to /var/mail.
Step b and c are ok for me, I believe. I should override mail_uid and mail_gid to what?
On 2016-10-14 13:43, Moi wrote:
Hello,
First of all, I'm sorry if you received this mail twice; I haven't received it the first time so I think it was lost. Second attempt.
I've made some more tests and I still can't receive mails. Outlook doesn't complain about anything, no error message; the mails that are supposed to be received just won't appear. In the mail logs, I find this line (other lines are irrelevant): dovecot: imap-login: Aborted login (no auth attempts in 2 secs): user=<> [...]
Is this a problem that looks familiar?
It's a bit clueless without an error message. Any idea welcome.
http://wiki.dovecot.org/TestInstallation
-- key ID: 0x4BFEBB31
Le 14 oct. 2016 à 16:06, mick crane mick.crane@gmail.com a écrit:
On 2016-10-14 13:43, Moi wrote:
Hello, First of all, I'm sorry if you received this mail twice; I haven't received it the first time so I think it was lost. Second attempt. I've made some more tests and I still can't receive mails. Outlook doesn't complain about anything, no error message; the mails that are supposed to be received just won't appear. In the mail logs, I find this line (other lines are irrelevant): dovecot: imap-login: Aborted login (no auth attempts in 2 secs): user=<> [...] Is this a problem that looks familiar? It's a bit clueless without an error message. Any idea welcome.
Thank you. I’m at the “Check that it finds INBOX” section and am getting:
- 0 EXISTS
- 0 RECENT
(the remaining text being the same as the example). So it looks like the mailbox doesn’t exist…
On 2016-10-14 21:32, Marnaud wrote:
Le 14 oct. 2016 à 16:06, mick crane mick.crane@gmail.com a écrit:
On 2016-10-14 13:43, Moi wrote:
Hello, First of all, I'm sorry if you received this mail twice; I haven't received it the first time so I think it was lost. Second attempt. I've made some more tests and I still can't receive mails. Outlook doesn't complain about anything, no error message; the mails that are supposed to be received just won't appear. In the mail logs, I find this line (other lines are irrelevant): dovecot: imap-login: Aborted login (no auth attempts in 2 secs): user=<> [...] Is this a problem that looks familiar? It's a bit clueless without an error message. Any idea welcome.
Thank you. I’m at the “Check that it finds INBOX” section and am getting:
- 0 EXISTS
- 0 RECENT
(the remaining text being the same as the example). So it looks like the mailbox doesn’t exist…
I assume this means there are no emails in the INBOX. send yourself a mail. http://www.binarytides.com/linux-mail-command-examples/
-- key ID: 0x4BFEBB31
Le 15 oct. 2016 à 9:56, mick crane mick.crane@gmail.com a écrit:
I assume this means there are no emails in the INBOX. send yourself a mail.
This is actually one of the first thing I tried when I saw outgoing mails worked. I also tried sending mails from another address, hoping to receive an error message back, but nothing got received. I now think the INBOX itself doesn’t exist, as logs seem to mention and someone else already told. Then, of course, I’d get 0 existing mails since the INBOX doesn’t exist.
Thanks.
On 2016-10-15 09:48, Marnaud wrote:
Le 15 oct. 2016 à 9:56, mick crane mick.crane@gmail.com a écrit:
I assume this means there are no emails in the INBOX. send yourself a mail.
This is actually one of the first thing I tried when I saw outgoing mails worked. I also tried sending mails from another address, hoping to receive an error message back, but nothing got received. I now think the INBOX itself doesn’t exist, as logs seem to mention and someone else already told. Then, of course, I’d get 0 existing mails since the INBOX doesn’t exist.
Thanks.
http://wiki.dovecot.org/FindMailLocation
-- key ID: 0x4BFEBB31
Le 15 octobre 2016 à 07:35, mick crane mick.crane@gmail.com a écrit:
http://wiki.dovecot.org/FindMailLocation
Ok, there are non-standard facts about my user. When I do:
eval echo ~webuser I'm getting:
/var/www/html/
This is because webuser is for an FTP account in that directory. I'm now trying with a "regular" user.
Thank you for the link.
participants (4)
-
Aki Tuomi
-
Marnaud
-
mick crane
-
Moi