master user in dovecot 1.2

Robert Schetterer rs at sys4.de
Thu Oct 15 15:31:29 UTC 2015


1.2.9 is very outdated, install a recent version

2009-12-16 	1.2.9 	changeset | changelog | files

vs

12 days ago 	Timo Sirainen 	Released v2.2.19. 2.2.19


Am 15.10.2015 um 13:12 schrieb Michal Žila:
> Hello list,
> 
> i would like to use master user functionality in dovecot v1.2, but i just cant get it to work:
> 
> Here’s my configuration:
> 
> # dovecot -n
> # 1.2.9: /etc/dovecot.conf
> # OS: Linux 2.6.18-164.10.1.el5PAE i686 Red Hat Enterprise Linux Server release 5.4 (Tikanga)
> login_dir: /var/run/dovecot/login
> login_executable(default): /usr/libexec/dovecot/imap-login
> login_executable(imap): /usr/libexec/dovecot/imap-login
> login_executable(pop3): /usr/libexec/dovecot/pop3-login
> first_valid_uid: 200
> mail_privileged_group: mail
> mail_location: mbox:~/mail:INBOX=/var/mail/%u
> mail_executable(default): /root/dovecot-master-postlogin
> mail_executable(imap): /root/dovecot-master-postlogin
> mail_executable(pop3): /usr/libexec/dovecot/pop3
> mail_plugin_dir(default): /usr/lib/dovecot/imap
> mail_plugin_dir(imap): /usr/lib/dovecot/imap
> mail_plugin_dir(pop3): /usr/lib/dovecot/pop3
> lda:
>   postmaster_address: postmaster at example.com
> auth default:
>   master_user_separator: *
>   debug: yes
>   passdb:
>     driver: passwd-file
>     args: /etc/dovecot.passwd.masterusers
>     pass: yes
>     master: yes
>   passdb:
>     driver: pam
>   userdb:
>     driver: passwd
> 
> 
> # cat /root/dovecot-master-postlogin
> #!/bin/bash
> MASTER_USER=$USER
> export MASTER_USER
> exec /usr/libexec/dovecot/imap "$@“
> 
> 
> # cat /etc/dovecot.passwd.masterusers
> masteruser:{PLAIN}Heslo42
> 
> 
> Trying login as normal user:
> 
> # telnet localhost imap
> Trying 127.0.0.1...
> Connected to localhost.localdomain (127.0.0.1).
> Escape character is '^]'.
> * OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE STARTTLS AUTH=PLAIN] Dovecot ready.
> a1 login jozefkova jozefkova026
> a1 OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE SORT SORT=DISPLAY THREAD=REFERENCES THREAD=REFS MULTIAPPEND UNSELECT IDLE CHILDREN NAMESPACE UIDPLUS LIST-EXTENDED I18NLEVEL=1 CONDSTORE QRESYNC ESEARCH ESORT SEARCHRES WITHIN CONTEXT=SEARCH] Logged in
> 
> 
> Trying login as master user:
> 
> # telnet localhost imap
> Trying 127.0.0.1...
> Connected to localhost.localdomain (127.0.0.1).
> Escape character is '^]'.
> * OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE STARTTLS AUTH=PLAIN] Dovecot ready.
> a1 login jozefkova*masteruser Heslo42
> a1 NO [AUTHORIZATIONFAILED] Authorization failed
> 
> 
> log sequence of failed auth:
> 
> Oct 15 13:04:47 linux dovecot: auth(default): client in: AUTH	1	PLAIN	service=imap	secured	lip=127.0.0.1	rip=127.0.0.1	lport=143	rport=34618	resp=<hidden>
> Oct 15 13:04:47 linux dovecot: auth(default): passwd-file(masteruser,127.0.0.1,master): lookup: user=masteruser file=/etc/dovecot.passwd.masterusers
> Oct 15 13:04:47 linux dovecot: auth(default): passdb(masteruser,127.0.0.1,master): Master user logging in as jozefkova
> Oct 15 13:04:47 linux dovecot: auth-worker(default): pam(jozefkova,127.0.0.1): lookup service=dovecot
> Oct 15 13:04:47 linux dovecot: auth-worker(default): pam(jozefkova,127.0.0.1): #1/1 style=1 msg=Password:
> Oct 15 13:04:49 linux dovecot: auth-worker(default): pam(jozefkova,127.0.0.1): pam_authenticate() failed: Authentication failure (password mismatch?)
> Oct 15 13:04:51 linux dovecot: auth(default): client out: FAIL	1	user=jozefkova	authz
> 
> 
> 
> So i can see it’s trying to loggin in using pam mech. Is there something i can configure in dovecot userdb or is it something else? I use pam to authenticate my real users…
> 
> 
> Thank you in advance…
> 
> 
> 
>> Michal Zila
> 



Best Regards
MfG Robert Schetterer

-- 
[*] sys4 AG

http://sys4.de, +49 (89) 30 90 46 64
Franziskanerstraße 15, 81669 München

Sitz der Gesellschaft: München, Amtsgericht München: HRB 199263
Vorstand: Patrick Ben Koetter, Marc Schiffbauer
Aufsichtsratsvorsitzender: Florian Kirstein


More information about the dovecot mailing list