Discussion:
[Dovecot] dovecot: pop3-login: Internal login failure - howto add dovecot users that are NO server users
Hans Neukomm
2010-06-30 18:53:21 UTC
Permalink
Hi all

my Linux system: opensuse 11.2
my mail system: postfix - dovecot

my key problem since several days googling and testing is:

how can I have a pop account with dovecot for a user if that user is NO
linux system user

it appears to me that most auth mechanisms somehow expect a mail user
also to be a linux system user either to be found in the
/etc/passwd
or
/etc/alias

on my 4 servers I have NO users at all registered, NO login at all for
any normal user - incl me. I strictly work as root and with serverkey
auth on a tightly secured system since many years

my goal is to have the most simple possible mail system - one user to
send/receive (me) may be a very few friends with a pop3 account - that's
that I have since many years - using cyrus.

now I want to move to dovecot and I missed somehow since many days
searching to find a simple howto add mail users - just for mail - pop3
and smtp, no imap, no home directory, etc

I think that most of the errors I get in my mail log are about user
unknown, I try different variations of postfix main.cf found in www the
result always is some error like the newest

dovecot: pop3-login: Internal login failures - below the last mail log -
after I added a user to /etc/passwd

hans:x:1000:100:xxxx yyyyyyy::/sbin/nologin

-------------

dovecot: auth(default): client in:
AUTH#0111#011PLAIN#011service=pop3#011secured#011lip=127.0.0.1#011rip=127.0.0.1#011lport=110#011rport=53082#011resp=AGhhbnMASThDc2F3TzgxRHhjUmVNOHVCaDBM
dovecot: auth(default): passwd-file(hans,127.0.0.1): lookup: user=hans
file=/etc/dovecot/passwd
dovecot: auth(default): client out:
OK#0111#011user=hans
dovecot: auth(default): master in:
REQUEST#0112#01115510#0111
dovecot: auth(default): passwd(hans,127.0.0.1):
lookup
dovecot: auth(default): master out:
USER#0112#011hans#011system_groups_user=hans#011uid=1000#011gid=100#011home=
dovecot: dovecot: Relative home directory paths not supported (user
hans):
dovecot: pop3-login: Internal login failure (auth failed, 1 attempts):
user=<hans>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, secured

-------------

WITHOUT the user hans entry in /etc/passwd

I get the following mail log errors

-------------

Jul 1 02:43:01 kriyayoga dovecot: auth(default): new auth connection:
pid=17860
Jul 1 02:43:22 kriyayoga dovecot: auth(default): client in:
AUTH#0111#011PLAIN#011service=pop3#011lip=78.46.101.111#011rip=124.108.51.96#011lport=110#011rport=50152#011resp=AGhhbnMASThDc2F3TzgxRHhjUmVNOHVCaDBM
Jul 1 02:43:22 kriyayoga dovecot: auth(default):
passwd-file(hans,124.108.51.96): lookup: user=hans
file=/etc/dovecot/passwd
Jul 1 02:43:22 kriyayoga dovecot: auth(default): client out:
OK#0111#011user=hans
Jul 1 02:43:22 kriyayoga dovecot: auth(default): master in:
REQUEST#0112#01117840#0111
Jul 1 02:43:22 kriyayoga dovecot: auth(default):
passwd(hans,124.108.51.96): lookup
Jul 1 02:43:22 kriyayoga dovecot: auth(default):
passwd(hans,124.108.51.96): unknown user
Jul 1 02:43:22 kriyayoga dovecot: auth(default):
userdb(hans,124.108.51.96): user not found from userdb passwd
Jul 1 02:43:22 kriyayoga dovecot: auth(default): master out:
NOTFOUND#0112
Jul 1 02:43:22 kriyayoga dovecot: pop3-login: Internal login failure
(auth failed, 1 attempts): user=<hans>, method=PLAIN, rip=124.108.51.96,
lip=78.46.101.111

-------------


any help or pointer to a solution or howto setup dovecot pop3 accounts
for non-system users would be MOST welcome


greetings

hans
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
Url : http://dovecot.org/pipermail/dovecot/attachments/20100701/04dbf917/attachment-0001.bin
Brent Bloxam
2010-06-30 19:50:19 UTC
Permalink
Post by Hans Neukomm
any help or pointer to a solution or howto setup dovecot pop3 accounts
for non-system users would be MOST welcome
greetings
hans
See here: http://wiki.dovecot.org/AuthDatabase/PasswdFile

If you still need help after reading over that, post output of `dovecot -n`
Hans Neukomm
2010-07-01 22:30:21 UTC
Permalink
after another day of reading various howtos and trying - still errors
Post by Brent Bloxam
dovecot -n
# 1.2.9: /etc/dovecot/dovecot.conf
# OS: Linux 2.6.31.12-0.2-default x86_64 openSUSE 11.2 (x86_64)
base_dir: /var/run/dovecot/
protocols: pop3
ssl: no
disable_plaintext_auth: no
login_dir: /var/run/dovecot//login
login_executable: /usr/lib/dovecot/pop3-login
login_greeting: Godmail ready.
mail_location: mbox:~/mail:INBOX=/var/spool/mail/%u
mail_debug: yes
mail_executable: /usr/lib/dovecot/pop3
mail_plugin_dir: /usr/lib64/dovecot/modules/pop3
lda:
postmaster_address: postmaster at kriyayoga.com
hostname: kriyayoga.com
mail_plugin_dir: /usr/lib64/dovecot/modules/lda
auth_socket_path: /var/run/dovecot/auth-master
auth default:
mechanisms: plain cram-md5
debug_passwords: yes
passdb:
driver: passwd-file
args: /etc/dovecot/passwd
userdb:
driver: static
args: uid=303 gid=303 home=/var/spool/mail/home/%u


mail-log shows for ever login attempt (via telnet - from localhost OR
from remote)

-----------

Jul 2 06:04:40 kriyayoga dovecot: auth(default):
passwd-file(hans,124.108.51.96): lookup: user=hans
file=/etc/dovecot/passwd
Jul 2 06:04:40 kriyayoga dovecot: auth(default):
passwd-file(hans,124.108.51.96): unknown user
Jul 2 06:04:42 kriyayoga dovecot: auth(default): client out:
FAIL#0111#011user=hans
Jul 2 06:04:47 kriyayoga dovecot: pop3-login: Aborted login (auth
failed, 1 attempts): user=<hans>, method=PLAIN, rip=124.108.51.96,
lip=78.46.101.111
Jul 2 06:05:09 kriyayoga dovecot: pop3-login: Disconnected: Inactivity
(auth failed, 1 attempts): user=<hans>, method=PLAIN, rip=127.0.0.1,
lip=127.0.0.1, secured

-----------

my userdb file contains:

hans myplaintext-password-here

-----------

the goal still is the most simple solid install using virutal users only
- opensuse 11.2 - postfix smtp - dovecot POP3 only

the most important goal is to have at least ONE user - me (hans) with
about half dozen aliases such as abuse@ info@ webmaster@ and a few other
mail alias

the next step could be - but no absolute requirement - to have a FEW
(max a dozen) other virtual mail users

any tip or help welcome


greetings

hans
Post by Brent Bloxam
Post by Hans Neukomm
any help or pointer to a solution or howto setup dovecot pop3 accounts
for non-system users would be MOST welcome
greetings
hans
See here: http://wiki.dovecot.org/AuthDatabase/PasswdFile
If you still need help after reading over that, post output of `dovecot -n`
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
Url : http://dovecot.org/pipermail/dovecot/attachments/20100702/78d9832c/attachment.bin
Thomas Leuxner
2010-07-02 07:35:40 UTC
Permalink
Post by Hans Neukomm
mechanisms: plain cram-md5
debug_passwords: yes
driver: passwd-file
args: /etc/dovecot/passwd
driver: static
args: uid=303 gid=303 home=/var/spool/mail/home/%u
[snip]
Post by Hans Neukomm
hans myplaintext-password-here
http://wiki.dovecot.org/AuthDatabase/PasswdFile

[...]
If you want to enable user at domain logins but have only "user" in the
file, set this to %n.

passdb:
driver: passwd-file
args: username_format=%n /etc/dovecot/passwd

Try that format and see if it helps.

Regards
Thomas
Hans Neukomm
2010-07-02 17:56:40 UTC
Permalink
Thanks Thomas

that helped a lot
auth problems now solved

I also had to change the dovecot.conf

mail_location = mbox:~/mail:INBOX=/var/spool/mail/home/%u
to
mail_location = maildir:~/Maildir

because I got too many permission errors - NOT sure if this is correct
now for POP3-only mail without any imap ...

still some other stuff to fix - like mail sent to me disappears etc :)
and/or stays in mailq


greetings

hans
Post by Thomas Leuxner
Post by Hans Neukomm
mechanisms: plain cram-md5
debug_passwords: yes
driver: passwd-file
args: /etc/dovecot/passwd
driver: static
args: uid=303 gid=303 home=/var/spool/mail/home/%u
[snip]
Post by Hans Neukomm
hans myplaintext-password-here
http://wiki.dovecot.org/AuthDatabase/PasswdFile
[...]
If you want to enable user at domain logins but have only "user" in the
file, set this to %n.
driver: passwd-file
args: username_format=%n /etc/dovecot/passwd
Try that format and see if it helps.
Regards
Thomas
Loading...