Hello,

I'm currently experimenting with the 2.1.x series and am facing a behavior I 
can't explain; I must be doing something wrong and probably miss the obvious... 
;-)

This is a very basic build on Mac OS X 10.8.2:

        ./configure --prefix=/_COD/dovecot-2.1.14 --sysconfdir=/_ETC 
--localstatedir=/_VAR --with-sqlite --with-ldap=yes

(Yes, I know, a strange layout, yet very convenient for testing various things 
here.)

Dovecot's configuration is very basic too:

        # 2.1.14: /_ETC/dovecot/dovecot.conf
        # OS: Darwin 12.2.1 x86_64  
        auth_verbose = yes
        disable_plaintext_auth = no
        mail_debug = yes
        mail_location = mbox:~/mboxes:INBOX=~/mboxes/inbox
        passdb {
          args = /_ETC/dovecot/db.conf
          driver = sql
        }
        ssl = no
        userdb {
          driver = prefetch
        }

It is started from launchd with the -F flag.

Two users are defined in the database, user1 (100002/100002) and user2 
(100003/100003), with "virtual" uids/gids.

Connecting for the first time as user1 through imap:

        $ telnet 127.0.0.1 143
        Trying 127.0.0.1...
        Connected to localhost.
        Escape character is '^]'.
        * OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE 
IDLE AUTH=PLAIN] Dovecot ready.
        a login user1 pass1
        a OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE 
IDLE SORT SORT=DISPLAY THREAD=REFERENCES THREAD=REFS THREAD=ORDEREDSUBJECT 
MULTIAPPEND UNSELECT CHILDREN NAMESPACE UIDPLUS LIST-EXTENDED I18NLEVEL=1 
CONDSTORE QRESYNC ESEARCH ESORT SEARCHRES WITHIN CONTEXT=SEARCH LIST-STATUS 
SPECIAL-USE] Logged in
        b logout
        * BYE Logging out
        b OK Logout completed.
        Connection closed by foreign host.

In mail.log:

        dovecot[2997]: imap-login: Login: user=<user1>, method=PLAIN, 
rip=127.0.0.1, lip=127.0.0.1, mpid=3006, secured, session=<EOWWzjbVxQB/AAAB>
        dovecot[2997]: imap(user1): Debug: Effective uid=100002, gid=100002, 
home=/_Data/Mailstores/100002
        dovecot[2997]: imap(user1): Debug: Home dir not found: 
/_Data/Mailstores/100002
        dovecot[2997]: imap(user1): Debug: fs: 
root=/_Data/Mailstores/100002/mboxes, index=, control=, 
inbox=/_Data/Mailstores/100002/mboxes/inbox, alt=
        dovecot[2997]: imap(user1): Debug: Namespace : 
/_Data/Mailstores/100002/mboxes doesn't exist yet, using default permissions
        dovecot[2997]: imap(user1): Debug: Namespace : Using permissions from 
/_Data/Mailstores/100002/mboxes: mode=0700 gid=-1
        dovecot[2997]: imap(user1): Disconnected: Logged out in=8 out=362

While logged in (ie after the login and before the logout), "doveadm who" shows:

        username # proto (pids) (ips)                                           
                              
        user1    1 imap  (3093) (127.0.0.1)                                     
                              

So far, so good.

Now, let's connect as user2 for the first time, through pop:

        $ telnet 127.0.0.1 110
        Trying 127.0.0.1...
        Connected to localhost.
        Escape character is '^]'.
        +OK Dovecot ready.
        user user2
        +OK
        pass pass2

and the session hangs forever.

This is written in the log:

        dovecot[2997]: pop3-login: Login: user=<user2>, method=PLAIN, 
rip=127.0.0.1, lip=127.0.0.1, mpid=3113, secured, session=<GTOlMjfV3gB/AAAB>
        dovecot[2997]: pop3(user2): Debug: Effective uid=100003, gid=100003, 
home=/_Data/Mailstores/100003
        dovecot[2997]: pop3(user2): Debug: Home dir not found: 
/_Data/Mailstores/100003
        dovecot[2997]: pop3(user2): Debug: fs: 
root=/_Data/Mailstores/100003/mboxes, index=, control=, 
inbox=/_Data/Mailstores/100003/mboxes/inbox, alt=
        dovecot[2997]: pop3(user2): Debug: Namespace : 
/_Data/Mailstores/100003/mboxes doesn't exist yet, using default permissions
        dovecot[2997]: pop3(user2): Debug: Namespace : Using permissions from 
/_Data/Mailstores/100003/mboxes: mode=0700 gid=-1
        dovecot[2997]: pop3(user2): Debug: Namespace : 
/_Data/Mailstores/100003/mboxes/inbox doesn't exist yet, using default 
permissions
        dovecot[2997]: pop3(user2): Debug: Namespace : Using permissions from 
/_Data/Mailstores/100003/mboxes: mode=0700 gid=-1
        dovecot[2997]: pop3(user2): Debug: Namespace : 
/_Data/Mailstores/100003/mboxes/inbox doesn't exist yet, using default 
permissions
        dovecot[2997]: pop3(user2): Debug: Namespace : Using permissions from 
/_Data/Mailstores/100003/mboxes: mode=0700 gid=-1

while "doveadm who" pretends nobody is connected:

        username # proto (pids) (ips)                                           
                           

To get rid of the pop3 process, I have to send it a KILL signal: no other way.
But this is noticed by the master process:

        dovecot[2997]: pop3(user2): Fatal: master: service(pop3): child 3113 
killed with signal 9

Note that it is possible to connect afterwards as user2 through imap.
On the other hand, trying to connect as user1 or user2 through pop always hangs.

TIA,
Axel

Reply via email to