[asterisk-users] 1.4.0, IMAP and Dovecot

Dan Austin Dan_Austin at Phoenix.com
Wed Dec 27 20:30:31 MST 2006


Tzafrir wrote:
> On Wed, Dec 27, 2006 at 10:44:10AM -0800, Dan Austin wrote:
>> I thought I would give the new IMAP support a spin on my home
>> server, but without much luck so far.
>> 
>> Asterisk 1.4.0
>> Dovecot 0.99.14
>> Maildir format
>> C-client 2006d

> Not that I can be of much help, but:

> what is your MAILBOX env. set to in dovecot.conf?
No customization at all.  The MailDir folders are in 
my home directory (more below)

> 
>>  The imap server is also the Asterisk server, so connections are
>>  on the localhost.
> 
>> The error posted to the logs is:
>> IMAP Error: Can't open mailbox
>> {127.0.0.1:143/imap/authuser=root//user=dan_austin}INBOX: invalid
remote
>> specification

> What exactly passes on the wire? Can you get a dump of the session?
I am connecting over the localhost loopback, I might be able to get
a dump, I've honestly never tried a capture against 127.0.0.1

> I have a feeling that the imap client is supposed to take this string
> and interpert it into some parameters. 
Yes, and I think I found the culprit.

> 
>>  Digging in the code and the c-client documentation the '//' is where
>> additional flags would go.  I've tried a number of the flags
supported
>> by the c-client library, but the results are the same.
> 
>> Has anyone managed to get IMAP working in Asterisk with Dovecotas the
>> backend?
With the mtest tool in the c-client package, I found that dovecot
does not like the '//' in the connection string.  So imapflags is not
really optional against Dovecot, which has an easy work-around.  I'd
Guess that the code in app_voicemail should either use a sane default
for the imapflags or conditionally not include the second '/' if the
option is not set.

> One useful tool dovecot borrowd from uw-imapd is "pre-authentication":
> you can use the binaries in /usr/libexec/dovecot to start an imap (or
> Pop3) session with the permission of the relevant user. 

> authuser=root ?
Yeah, in the real world that would be exceedingly stupid.  On the other
hand this is basically a single user system with not much interesting
on it.  Once it is known to work with the all-powerful root, I can then
focus on a dedicated, less privileged account...


Thanks,
Dan


More information about the asterisk-users mailing list