[asterisk-users] 1.4.0, IMAP and Dovecot

Tzafrir Cohen tzafrir.cohen at xorcom.com
Thu Dec 28 01:59:57 MST 2006


On Thu, Dec 28, 2006 at 12:35:57PM +1300, Ray Jackson wrote:
> Dan,
> 
> I have IMAP support working now with Courier IMAP.  Since Courier (and 
> probably Dovecot) do not support a single authuser connection that may 
> access any mailbox, you have to omit the 'authuser' and 'authpassword' 
> settings in voicemail.conf and then add the username/password login per 
> extension... e.g.

Are you sure that this is an explicit support in the mail server?

Here's what Mark Crispin (the author of both UW-imapd and c-client)
wrote recently:


| > Does UW-IMAP have an admin user?  If so, where is it configured?
| 
| It's hidden in the release notes file.
| 
| Any user who is in a UNIX group called "mailadm" has administrator
| rights in UW imapd and ipop3d.  "Administrator rights" are the right to 
| log in as any other user.
| 
| For c-client based client programs (mailutil, Pine, Alpine, etc.), the 
| /authuser flag is used by the mail administrator.  For example the 
| mailbox name specifier:
| 
|  	{imap.example.com/authuser=fred/user=joe}INBOX
| 
| will open a connection to imap.example.com and log in as user
| joe using user fred's password, and then open joe's INBOX.  This assumes
| that user fred is in group mailadm on the imap.example.com.

So can you do this trick manually? authenticate as one user and read
another user's mailbox?

Here's an example with root and pre-authentication. I figure that some
tricks with pam and such will get you further:

root at server# MAIL=maildir:/home/tzafrir/Maildir /usr/lib/dovecot/imap
* PREAUTH [CAPABILITY IMAP4rev1 SORT THREAD=REFERENCES MULTIAPPEND
* UNSELECT LITERAL+ IDLE CHILDREN LISTEXT LIST-SUBSCRIBED NAMESPACE]
* Logged in as root
1 list "" "*"
* LIST (\HasNoChildren) "." INBOX
1 OK List completed.
2 select INBOX
* FLAGS (\Answered \Flagged \Deleted \Seen \Draft)
* OK [PERMANENTFLAGS (\Answered \Flagged \Deleted \Seen \Draft \*)]
* Flags permitted.
* 0 EXISTS
* 0 RECENT
* OK [UIDVALIDITY 1161851409] UIDs valid
* OK [UIDNEXT 1] Predicted next UID
2 OK [READ-WRITE] Select completed.
* logout
* BYE Logging out
* OK Logout completed.

This is dovecot 0.99.14 on Debian Sarge. Note that I actually don't use
that imap mailbox normally.

-- 
               Tzafrir Cohen       
icq#16849755                    jabber:tzafrir at jabber.org
+972-50-7952406           mailto:tzafrir.cohen at xorcom.com       
http://www.xorcom.com  iax:guest at local.xorcom.com/tzafrir


More information about the asterisk-users mailing list