[Dovecot] Thinking Outside the Box - Extending IMAP

Marc Perkel marc at perkel.com
Mon May 14 16:20:29 EEST 2007

Vulpes Velox wrote:
> On Sun, 13 May 2007 06:55:59 -0700
> Marc Perkel <marc at perkel.com> wrote:
>> Here's some thoughts I'd like to throw out there. I know it's not 
>> standard IMAP protocol but someone has to try new ideas first and I
>> want to see what people (Timo) think of this.
>> IMAP establishes a connection between the client and the server. 
>> Wouldn't it be great if it could be a conduit to let custom
>> Thunderbird plugins talk to custom server application over the IMAP
>> interface? For example, personalized server settings. Suppose for
>> example I want Thunderbird to edit my server side white lists or
>> black lists or any other setting? Wouldn't it be nice if IMAP
>> supported these changes? The connection is made. It's a secure
>> connection that's been authenticated. Lets use it!
>> Here's my initial thoughts on this. Suppose we extended IMAP to
>> include an EXECUTE command as follows:
>> EXECUTE command parameter, parameter ....
>> On the server side is a config file that has the commands that
>> execute will allow and what programs they run. When the execute
>> command is seen by Dovecot then Dovecot runs the program in the
>> list with the parameters passed. For example, suppose there is a
>> command to add a user to a server side blacklist.
>> 100 execute blacklist add joe at smith.com
>> 100 ok
> I like the idea of having to and from added to the w/b list. That way
> it would be way nicer to use with SpamAssassin.
>> Dovecot would open a two way connection to the server application 
>> allowing the client to talk to any application that is configured
>> and can send and receive text. The connection persists until the
>> server end terminates or the client closes the connection.
>> With a tool like this one can write generic applications easily
>> that would greatly expand what email clients can do interacting
>> with the server. Not only can setting be changes but you could
>> interact with server side calendars, pick up voice messages from
>> phone systems, run any sort of groupware, all over a generic IMAP
>> connection with this simple extension.
>> Example:
>> 100 EXECUTE calendar
>> 100 ok
>> 100 list schedule today 8:00 10:00
>> 100 8:00 make coffee
>> 100 9:00 meeting with boss
>> 100 9:30 Call Joe Blow at 415-555-1212
>> 100 ok
>> 100 quit
>> 100 ok
>> One thing I'd like to use it for is an outgoing SMTP connection to
>> send outgoing email over IMAP. A session might look like this:
>> 999 EXECUTE smtp
>> 999 220 darwin.ctyme.com ESMTP Exim 4.67 Sun, 13 May 2007 06:52:26
>> -0700 999 helo ctyme.com
>> 999 250 darwin.ctyme.com Hello localhost []
>> 999 mail from:marc at perkel.com
>> 999 250 OK
>> 999 rcpt to:dovecot at dovecot.org
>> 999 250 Accepted
>> ......
>> 999 quit
>> 999 OK
>> Who likes this idea?
> I love that idea. Especially if it could run it through a specified
> program for deliver as well as passing the username, from, and
> password to the  program. It may seem like a silly idea to pass that
> to the program, but it does have a awesome usage. That way the
> backend program can fetch the outgoing SMTP server through some
> method and figure out how to send it. Been kicking around writing
> something like that for QPSMTPD. It would be nice for with
> squirrelmail.

I would think that when Dovecot executed the server end program that 
they would pass through in environment variables all the user name and 
connection info so that the server had that info for lookups.

More information about the dovecot mailing list