Hi,
I have to say that Dovecot is certainly the most challenging piece of
software I've ever had the pleasure of setting up (due mainly to the
reams of largely unhelpful documentation). After 36 almost non-stop
hours reading and trying, I finally end up here. :-)
I really would appreciate your help - and many thanks in advance!
***************************************************************
/var/log/dovecot.info.log
(showing unsuccessful login)
***************************************************************
Aug 04 21:32:36 auth: Debug: Loading modules from directory:
/usr/lib64/dovecot/auth
Aug 04 21:32:36 auth: Debug: Module loaded:
/usr/lib64/dovecot/auth/libauthdb_ldap.so
Aug 04 21:32:36 auth: Debug: Module loaded:
/usr/lib64/dovecot/auth/libdriver_sqlite.so
Aug 04 21:32:36 auth: Debug: Module loaded:
/usr/lib64/dovecot/auth/libmech_gssapi.so
Aug 04 21:32:36 auth: Debug: passwd-file /usr/local/etc/dovecot.passdb:
Read 1 users
Aug 04 21:32:36 auth: Debug: auth client connected (pid=24769)
Aug 04 21:32:41 auth: Debug: client in: AUTH 1 PLAIN
service=imap securedlip=::1 rip=::1 lport=143 rport=52551
resp=AHBldGVyAGZ1YXNpbjU0MTRz
Aug 04 21:32:41 auth: Debug: passwd-file(peter,::1): lookup: user=peter
file=/usr/local/etc/dovecot.passdb
Aug 04 21:32:41 auth: Debug: client out: OK 1 user=peter
Aug 04 21:32:41 auth: Debug: master in: REQUEST 1417805825 24769
1 44a3aec60ec6eaec6eff0efb99971eee
Aug 04 21:32:41 auth: Debug: master out: USER 1417805825 peter
Aug 04 21:32:41 imap-login: Info: Login: user=<peter>, method=PLAIN,
rip=::1, lip=::1, mpid=24772, secured
***************************************************************
END
***************************************************************
***************************************************************
/var/log/dovecot.log
(showing unsuccessful login)
***************************************************************
Aug 04 21:32:41 IMAP(peter): Error: user peter: Couldn't drop
privileges: User is missing UID (see mail_uid setting)
Aug 04 21:32:41 IMAP(peter): Error: Internal error occurred. Refer to
server log for more information.
***************************************************************
END
***************************************************************
***************************************************************
dovecot -n
***************************************************************
# 2.0.9: /etc/dovecot/dovecot.conf
# OS: Linux 2.6.32-279.2.1.el6.x86_64 x86_64 CentOS release 6.3 (Final) ext4
auth_debug = yes
auth_debug_passwords = yes
auth_verbose = yes
disable_plaintext_auth = no
first_valid_uid = 1000
info_log_path = /var/log/dovecot.info.log
last_valid_uid = 5000
log_path = /var/log/dovecot.log
login_trusted_networks = 127.0.0.1
mail_debug = yes
mail_location = maildir:/var/mail/%u/Maildir
mail_log_prefix = "%Us(%u): "
passdb {
args = /usr/local/etc/dovecot.passdb
driver = passwd-file
}
protocols = imap
ssl = no
verbose_proctitle = yes
***************************************************************
END
***************************************************************
***************************************************************
/usr/local/etc/dovecot.passdb
***************************************************************
peter:{CRYPT}BrtgyyOEX33w6:1000:500:Peter Snow:/var/mail/peter::
***************************************************************
END
***************************************************************
***************************************************************
cat /etc/passwd | grep peter
***************************************************************
peter:x:1000:500::/home/peter:/sbin/nologin
***************************************************************
END
***************************************************************
Notes:
'peter' does not yet have a system password, since I'm testing this
for
users which will only be virtual users.
I made the password for 'peter' in the dovecot.passdb using
"doveadm pw
-s crypt" although once I've got it working I'd like to change the
encryption to something as strong as possible - any suggestions please?
Hope you can help and many thanks.
Kind regards,
Peter
On 05/08/2012 06:22, Peter Snow wrote:> Hi, > > I have to say that Dovecot is certainly the most challenging piece of > software I've ever had the pleasure of setting up (due mainly to the > reams of largely unhelpful documentation). After 36 almost non-stop > hours reading and trying, I finally end up here. :-) > > I really would appreciate your help - and many thanks in advance!Phew, haven't you set yourself up for a hostile response..? It's only an opinion, but I would say that the Dovecot docs are rather helpful and thorough? Also dovecot ships with an almost working config out of the box, really you only need to adjust a couple of settings to achieve most setups. OK, reading your log files, I think this is probably the clue?> /var/log/dovecot.log > (showing unsuccessful login) > > *************************************************************** > Aug 04 21:32:41 IMAP(peter): Error: user peter: Couldn't drop > privileges: User is missing UID (see mail_uid setting) > Aug 04 21:32:41 IMAP(peter): Error: Internal error occurred. Refer to > server log for more information. > ***************************************************************I don't use that auth method so I don't want to give you a definitive suggestion, but we can certainly use google to get some ideas: http://lmgtfy.com/?q=dovecot+mail_uid+ Third link down seems to cover your question. Basically says you need to define the setting listed above, but also why. Note, I think it's easy to level critique against dovecot auth, but if you look for a few moments longer you will see that you are probably just criticising flexibility. You can use a very wide array of database types to store your auth information and with that flexibility comes the requirement to actually define your specific choice. Some people run a multi-tennanted system and like to be able to run each user under their own uid, hence that being flexible. Others want to use LDAP or a database to store auth info (I think you can even use both at the same time). It's even possible to use both at the same time I believe, or to lookup users in one db, and passwords in another. Note, I don't know your requirements, but you might want to look at some kind of database for your user storage if you have more than a fairly simple installation? Either LDAP or sql is likely to give you more flexibility than a flat file pwdb, but I don't know your requirements, so just a thought Finally note that there are literally dozens of "how to install dovecot" guides on the internet that will help you get a working setup with various auth db choices. Once you understand the big picture using one of those guides you will be able to customise things to a very specific situation Good luck Ed W