2

I setup a new user called sales, and gave it a password. Although it has a home directory, i set login to /sbin/nologin.

dovecot: pop3-login: Login: user=<sales>, method=PLAIN, rip=127.0.0.1,   lip=127.0.0.1, mpid=12938, secured, session=<94SotWVRoAB/AAAB>
Jun  7 21:49:24 www dovecot: pop3(sales): Error: user sales: Initialization failed: Namespace '': Mail storage autodetection failed with home=/home/sales
Jun  7 21:49:24 www dovecot: pop3(sales): Error: Invalid user settings. Refer to server log for more information.

Did i have to initialise the mailbox in the homedirectory? What did i forget. I didn't change anything to the default dovecot.conf, i just installed the package with yum install dovecot (so latest version).

Thanks for your help.

ATv
  • 129
  • 1
  • 2
  • 15
  • Well hard to say with that limited informations. On which platform (Fedora, centos, rhel, ...) do your run dovecot? What's the output in the server log as written in above. What's clear the user sales have some errors in his config. Does any other user works? – Aleksandar Jun 07 '17 at 22:28
  • It's on aws: Linux 4.9.20-10.30.amzn1.x86_64 #1 SMP Thu Apr 6 18:22:38 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux. I only have one user setup currently. What do you mean by server log output ? – ATv Jun 07 '17 at 22:35
  • aws have differnt rpm based images. I refer to this line `Jun 7 21:49:24 www dovecot: pop3(sales): Error: Invalid user settings. Refer to server log for more information.` **Does any other user works?** – Aleksandar Jun 07 '17 at 22:42
  • i think dovecot logs to maillog, so that's all i have. And as i said, sales is the only user i have currently configured (i have the ec2-user, but i don't know how to setup a password for that one. That works with local mail, but i haven't been able to test it with dovecot for the aforementioned reason). – ATv Jun 07 '17 at 22:48
  • have you take a look into the auth and messages log. please can you post the output of `cat /etc/redhat-release` `doveconf -n` . do you have set a password for the user sales? – Aleksandar Jun 07 '17 at 22:53
  • [ec2-user@www ~]$ dovecot -n # 2.2.10: /etc/dovecot/dovecot.conf # OS: Linux 4.9.20-10.30.amzn1.x86_64 x86_64 mbox_write_locks = fcntl namespace inbox { inbox = yes location = prefix = } passdb { driver = pam } ssl = required ssl_cert = – ATv Jun 08 '17 at 07:48
  • uh that's hard to read. please can you past it in gist or similar paste service. can you login via ssh with the user sales? does the user sales have a valid shell? Please take also a look into the doc https://wiki2.dovecot.org/PasswordDatabase/PAM and test the user with `doveadm user sales` – Aleksandar Jun 08 '17 at 20:32

1 Answers1

6

I fixed this. I needed to uncomment the mail_location in 10-auth.conf i believe to point to the mbox (as it says in the file, because this is a new user there is no mailbox yet. After you also need to change the /var/spool/mail/user to 0600 as you will get a permission. Thanks for your help.

ATv
  • 129
  • 1
  • 2
  • 15