[tpop3d-discuss] maildir

Donovan Craig donovan at snapfrozen.com
Wed, 27 Aug 2003 22:11:08 +1000


Hi,

Thank's to all of those who helped.

I got all it all working well in the end.

Here's the script I wrote to do the conversion:

I got my virtual.txt from mysql and create one for each unix user. Luckily I only had 3 unix users. I suppose I could have looped them too if they'd all had the same unix user.

--------------------------------%<-----------------------------
#!/bin/bash
SERVERPATH=/var/spool/mail/SERVERS
cp -rp $SERVERPATH $SERVERPATH.bak
#ls -c1 $SERVERPATH > /tmp/virtual.txt #if all boxes had the same unix user..
LINES=`cat /tmp/virtual.txt`
for line in $LINES
do
   DOMAIN=$line
   ls -c1  $SERVERPATH/$DOMAIN/ > /tmp/boxes.txt
   BOXES=`cat /tmp/boxes.txt`
   for box in $BOXES 
   do
        /usr/local/bin/mb2md -s $SERVERPATH/$DOMAIN/$box -d $SERVERPATH/$DOMAIN/$box.tmp
        rm -rf $SERVERPATH/$DOMAIN/$box
        mv $SERVERPATH/$DOMAIN/$box.tmp $SERVERPATH/$DOMAIN/$box
   done
done
--------------------------------%<-----------------------------

Regards,

Donovan

On Wed, 27 Aug 2003 10:06:23 +0200
"Jakob Hirsch" <jh@plonk.de> was rumoured to have said:

> Donovan Craig wrote:
> 
> > My question is: If you're using MySQL authentication and specifying
> > the path within the db, will tpop3d know to use maildir if a
> > directory is specified or do I need to do something else for this to
> > happen ?
> 
> No, the mailbox type is returned in the SQL-query. The default hard-coded
> query uses bsd:
> SELECT concat(domain.path, '/', popbox.mbox_name), popbox.password_hash,
> domain.unix_user, 'bsd'
> so you have to specify your own auth-mysql-pass-query and/or
> auth-mysql-apop-query which returns 'maildir' instead of 'bsd'.
> 
> > BTW: Saw the new version today (1.5.1).. Looks good. downloading it
> 
> yeah, runs very fine here. and maildir-only from the beginning :) (1.3.4 or
> something)
> 
> 
> _______________________________________________
> tpop3d-discuss mailing list
> tpop3d-discuss@lists.beasts.org
> http://lists.beasts.org/mailman/listinfo/tpop3d-discuss
> 



-----------------------------------------
Snapfrozen Solutions                      
http://www.snapfrozen.com                 
-----------------------------------------