[Vmail-discuss] Courier IMAP anyone?

Donovan Craig donovan@snapfrozen.com
Tue, 25 Feb 2003 13:32:57 +1100


Hey,

Courier-Imap 1.70 actually comes with an example for vmail-sql:

# MYSQL_SELECT_CLAUSE   SELECT popbox.local_part,                       \
#                       CONCAT('{MD5}', popbox.password_hash),          \
#                       popbox.clearpw,                                 \
#                       domain.uid,                                     \
#                       domain.gid,                                     \
#                       CONCAT(domain.path, '/', popbox.mbox_name),     \
#                       '',                                             \
#                       domain.quota,                                   \
#                       '',                                             \
#                       FROM popbox, domain                             \
#                       WHERE popbox.local_part = '$(local_part)'       \
#                       AND popbox.domain_name = '$(domain)'            \
#                       AND popbox.domain_name = domain.domain_name
#

This seemed to do it for me..

Regards,

Donovan

On 21 Jan 2003 08:25:24 -0200
Jose de Paula Eufrasio Junior <jjunior@pib.com.br> was rumoured to have said:

> On Mon, 2003-01-20 at 19:43, Chris Lightfoot wrote:
> > On Mon, Jan 20, 2003 at 01:44:32PM -0800, William X Walsh wrote:
> > > On Mon, 2003-01-20 at 13:35, Chris Lightfoot wrote:
> > > > On Mon, Jan 20, 2003 at 01:18:43PM -0800, William X Walsh wrote:
> > > > > 
> > > > > Has anyone either made changes to their vmail-sql configs to conform to
> > > > > Courier's expectations, or modified Courier IMAP to conform to the
> > > > > vmail-sql setup?
> 
> I did...
> 
> > > > 
> > > > My intention is to write an IMAP server -- provisionally,
> > > > timapd -- which will implement the various authentication
> > > > schemes of tpop3d and remedy some deficiencies I perceive
> > > > in current IMAP implementations.
> > > > 
> > > > This project is at the `thinking very hard about it'
> > > > stage, and has not quite reached the `writing some code'
> > > > stage yet.
> > > 
> > > As a fan of your tpop3d, I'd most likely switch to that when it was
> > > ready to use....but I need a solution in the interim, and I'm sure I'm
> > > not alone  :)
> 
> Yeah! A imapd using the same scheme that tpop3d will be great! tpop3d is
> light, powerfull and works with almost anything :)
> I hope that you start the project as soon as you get the time (and
> interest). tpop3d and exim are the most proeminent virtual email setup
> in the recent times, and sure an imap server would be great.
> 
> In meanwhile, the current courier-imap (courier-imap-1.6.1) can get the
> login and home data from a mysql query, so i did it get the data from my
> vmail-sql tables with little modifications (in the popbox table I added
> the fields imap_quota and clearpw, that I let blank anyway, and in the
> domain table I put the uid and gid fields with the uid and gid for the
> unix user of the domain).
> 
> Build the courier-imapd with support for authdaemon and the authmysql
> module and edit the /courier-path/etc/authmysqlrc.
> 
> One of the last statements is "mysql_select_clause", here the one I use
> (and works, the documentation and the comments of the config file are
> rather sparse about the order of the fields and I have to figure it on
> my own looking at the code):
> 
> MYSQL_SELECT_CLAUSE     SELECT popbox.local_part,                      
> \
>                         TRIM('{crypt}' FROM popbox.password_hash),     
> \
>                         domain.gid,                                    
> \
>                         domain.uid,                                    
> \
>                         popbox.clearpw,                                
> \
>                         TRIM(TRAILING 'Maildir' FROM CONCAT(domain.path,
> '/', popbox.mbox_name)),\
>                         CONCAT(domain.path, '/', popbox.mbox_name),    
> \
>                         popbox.imap_quota,                             
> \
>                         ''                                      \
>                         FROM popbox, domain                            
> \
>                         WHERE popbox.local_part = '$(local_part)'      
> \
>                         AND popbox.domain_name = '$(domain)'           
> \
>                         AND popbox.domain_name = domain.domain_name
> 
> It's not pretty and I'm sure that it can be optimized, but it works here
> :)
> 
> []s
> coredump
> 
> 
>  
> 
> 
> 
> _______________________________________________
> vmail-discuss mailing list
> vmail-discuss@lists.beasts.org
> http://lists.beasts.org/mailman/listinfo/vmail-discuss
> 



S n a p f r o z e n  S o l u t i o n s

http://www.snapfrozen.com.au






Disclaimer:

This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they are
addressed.

If you have received this email in error, please notify the
addressee by return email.