Re: [Dovecot] Mailbox consistency with multiple clients

2008-09-23 Thread Yates Ian Mr (ITCS)
I'm confused by this as well.

Additionally with 1.1.3 we were getting lots of reports of people
deleting/moving items from their inbox and the items remaining in the
inbox?!  Also read items not being marked as read.  Both of these are
from squirrelmail, which as you say should be impossible as squirrelmail
logs in, performs the operation and logs out.

We aren't using any kind of IMAP proxy.

We are using the dovecot index files.

As I said before, this was not a problem when we were using dovecot
1.0.8.  In an effort to resolve this I will be downgrading to 1.0.8 this
morning, I'll let you know if this sorts out the problems!

I.

-Original Message-
From: [EMAIL PROTECTED] 
[mailto:[EMAIL PROTECTED] On 
Behalf Of Timo Sirainen
Sent: Monday, September 22, 2008 9:02 PM
To: Dovecot Mailing List
Subject: Re: [Dovecot] Mailbox consistency with multiple clients

On Thu, 2008-09-18 at 12:06 +0100, Yates Ian Mr (ITCS) wrote:
 There's a mix of the following:
  Outlook
  Outlook express
  Thunderbird
  Squirrelmail (webmail)
 
 But we tried getting the users sharing the account to use just one 
 client (squirrelmail) and they were still reporting the problem?!
 
 I forgot to say that they were working this way with no problems on 
 dovecot 1.0.2 but since the migration to 1.1.3 we've had 
this problem.
 
 In an effort to help the situation I changed the following settings 
 from the original, from enabling lazy writes to disabling:
 mbox_dirty_syncs: no
 mbox_lazy_writes: no

As long as you're using Dovecot's index files, these should 
make no difference. Do they?

I find this problem really weird. If you're using a shared 
account, it's exactly the same as if there were just a single 
user using multiple clients. Or in Squirrelmail case the same 
as if the same user was logged in multiple times with 
different web browsers. And in Squirrelmail case it connects, 
does something for a short time and disconnects. Dovecot 
doesn't even know if there are different users using it. So if 
it shows different views for different users, then the exact 
same thing should be happening also randomly to the same user 
even if s/he's the only one logged in.

Are you using any kind of an IMAP proxy?



Re: [Dovecot] cyrus2courrier mass migration

2008-09-23 Thread Mathieu Kretchner
Holger Weiss a écrit :
 * Mathieu Kretchner [EMAIL PROTECTED] [2008-09-22 16:11]:
 I would like to do a conversion of my imap accounts (and keep all theirs
 characteristics) from cyrus-imapd-2.2.12 in cyrus format to dovecot
 1.1.3 in courrier format.

 I've tried those 3 tools :

 cyrus2courrier.1.5.ts
 cyrus2courier-1.3z4
 imapsync (works well but very slow and should not be a true solution)

 But nothing is working to keep the seen/unseen flag (expect imapsync) !
 I know my cyrus version is too recent but do you have any idea how
 could I do this migration ?
 
 cyrus2courier 1.5.ts should work with Cyrus 2.2.12 if the seen (and
 subscription) states are available in flat text files; otherwise, they
 must first be converted using cvt_cyrusdb(8).
 
 However, for our conversion, we've written our own cyrus2dovecot which
 also supports skiplist databases (amongst another few features not
 provided by the other tools):
 
   http://cyrus2dovecot.sw.fu-berlin.de/
 
 Holger

Thank you, I'm just going to try !! And I keep you informed about my
experience!


begin:vcard
fn:Mathieu Kretchner
n:Kretchner;Mathieu
org:INRIA;Syslog
adr;dom:;;2007 route des lucioles - BP93;Sophia Antipolis;;06902 CEDEX
email;internet:[EMAIL PROTECTED]
tel;work:04 92 38 76 67
x-mozilla-html:FALSE
version:2.1
end:vcard



Re: [Dovecot] Dovecot LDA and quota

2008-09-23 Thread Timo Sirainen

On Sep 23, 2008, at 1:07 PM, Jonas Christian wrote:


  quota_rule=*:bytes:bytes

..


Sep 15 00:24:52 mailserver dovecot: auth(default): master out:  
USER 380864  [EMAIL PROTECTED]  uid=100
5gid=1005home=/var/vmail/mailboxes/xxx.com/ 
spamquota=maildir:bytes=2048


Says quota=maildir:bytes=2048 here, no quota_rule..



PGP.sig
Description: This is a digitally signed message part


Re: [Dovecot] Dovecot LDA and quota

2008-09-23 Thread Timo Sirainen

On Sep 23, 2008, at 1:28 PM, Jonas Christian wrote:

[EMAIL PROTECTED]:{PLAIN}password:1005:1005::/var/vmail/mailboxes/ 
xxx.com/spam::quota_rule=*:bytes=20971520


oh, right, userdb_quota_rule. Otherwise it's treated as a passdb field  
and sent to imap-login.




PGP.sig
Description: This is a digitally signed message part


Re: [Dovecot] cyrus2courrier mass migration

2008-09-23 Thread Mathieu Kretchner
Holger Weiss a écrit :
 * Mathieu Kretchner [EMAIL PROTECTED] [2008-09-22 16:11]:
 I would like to do a conversion of my imap accounts (and keep all theirs
 characteristics) from cyrus-imapd-2.2.12 in cyrus format to dovecot
 1.1.3 in courrier format.

 I've tried those 3 tools :

 cyrus2courrier.1.5.ts
 cyrus2courier-1.3z4
 imapsync (works well but very slow and should not be a true solution)

 But nothing is working to keep the seen/unseen flag (expect imapsync) !
 I know my cyrus version is too recent but do you have any idea how
 could I do this migration ?
 
 cyrus2courier 1.5.ts should work with Cyrus 2.2.12 if the seen (and
 subscription) states are available in flat text files; otherwise, they
 must first be converted using cvt_cyrusdb(8).

My last try has nothing good :

cyrus2courier-1.5-dev : segfault
cyrus2courier-1.5-ts : segfault

I dont understand why ? But it's happening only with -e my_seen_dir option!


 
 However, for our conversion, we've written our own cyrus2dovecot which
 also supports skiplist databases (amongst another few features not
 provided by the other tools):
 
   http://cyrus2dovecot.sw.fu-berlin.de/

I've tried this one too and I'm stuck too :

[EMAIL PROTECTED] testimap]# ./cyrus2dovecot -C /root/Mail/%u  -D dovecot-mail/
mketchn

cyrus2dovecot [mketchn]: (error) No Cyrus INBOX at: /root/Mail/mketchn

I've red the perl code and found this :

if (-e $boxpath/cyrus.header and -e $boxpath/cyrus.index) {
//code
} else {
#
# The folder we're in is not in a Cyrus mailbox.
However, we
# don't simply return here because this folder might contain
# other folders which might be Cyrus mailboxes (unless
we're in
# the INBOX, in which case something is going wrong).
#
error('No Cyrus INBOX at:', $boxpath) if $box eq 'INBOX';
debug(Skipping $boxpath as it's not a Cyrus mailbox.);
$mailfolder = 0;
}


But I'm sure cyrus.header and cyrus.index exist.

Any idea (maybe this is a format problem because even cyrus2courier is
doing segfault)

 
 Holger

begin:vcard
fn:Mathieu Kretchner
n:Kretchner;Mathieu
org:INRIA;Syslog
adr;dom:;;2007 route des lucioles - BP93;Sophia Antipolis;;06902 CEDEX
email;internet:[EMAIL PROTECTED]
tel;work:04 92 38 76 67
x-mozilla-html:FALSE
version:2.1
end:vcard



Re: [Dovecot] cyrus2courrier mass migration

2008-09-23 Thread Timo Sirainen

On Sep 23, 2008, at 1:59 PM, Mathieu Kretchner wrote:


My last try has nothing good :

cyrus2courier-1.5-ts : segfault


Could you get gdb backtrace? If it's clear enough I could fix it.



PGP.sig
Description: This is a digitally signed message part


Re: [Dovecot] cyrus2courrier mass migration

2008-09-23 Thread Holger Weiss
* Mathieu Kretchner [EMAIL PROTECTED] [2008-09-23 12:59]:
 Holger Weiss a écrit :
  However, for our conversion, we've written our own cyrus2dovecot which
  also supports skiplist databases (amongst another few features not
  provided by the other tools):
  
  http://cyrus2dovecot.sw.fu-berlin.de/
 
 I've tried this one too and I'm stuck too :
 
 [EMAIL PROTECTED] testimap]# ./cyrus2dovecot -C /root/Mail/%u  -D 
 dovecot-mail/ mketchn
 
 cyrus2dovecot [mketchn]: (error) No Cyrus INBOX at: /root/Mail/mketchn

 [...]

 But I'm sure cyrus.header and cyrus.index exist.

Are you really sure?  That is, the following commands don't complain?

$ ls /root/Mail/mketchn/cyrus.header
$ ls /root/Mail/mketchn/cyrus.index

Holger


Re: [Dovecot] cyrus2courrier mass migration

2008-09-23 Thread Mathieu Kretchner
Holger Weiss a écrit :
 * Mathieu Kretchner [EMAIL PROTECTED] [2008-09-23 12:59]:
 Holger Weiss a écrit :
 However, for our conversion, we've written our own cyrus2dovecot which
 also supports skiplist databases (amongst another few features not
 provided by the other tools):

 http://cyrus2dovecot.sw.fu-berlin.de/
 I've tried this one too and I'm stuck too :

 [EMAIL PROTECTED] testimap]# ./cyrus2dovecot -C /root/Mail/%u  -D 
 dovecot-mail/ mketchn

 cyrus2dovecot [mketchn]: (error) No Cyrus INBOX at: /root/Mail/mketchn

 [...]

 But I'm sure cyrus.header and cyrus.index exist.
 
 Are you really sure?  That is, the following commands don't complain?
 
   $ ls /root/Mail/mketchn/cyrus.header
   $ ls /root/Mail/mketchn/cyrus.index
 
 Holger

Sorry for the noise it was my fault : mkretchn and not mketchn :

./cyrus2dovecot -C /root/Mail/%u -S ../seendir/%u.seen -U
../seendir/%u.sub -D dovecot-mail/ mkretchn
cyrus2dovecot [mkretchn]: 7619 messages in 52 folders (168.4 MiB, 25 s)

great but I still have all my e-mail unseen (maybe mkretchn.seen is
desynchronized, because I' working on a copy of my account) ! However
reply, forward and TODO falgs (maybe more) are kept.


Timo,

Is it enough for you ? I'm not familiar with gdb...

Starting program: /root/testimap/cyrus2courier-1.5.ts/src/cyrus2courier
-vvv /root/Mail/ /root/Mail/dovecot-mail/ -e /root/seendir/m/ -d mkretchn
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)

Program received signal SIGSEGV, Segmentation fault.
0x00628b1a in strcmp () from /lib/libc.so.6
(gdb) backtrace full
#0  0x00628b1a in strcmp () from /lib/libc.so.6
No symbol table info available.
#1  0x08048fab in setfolder_seenfile ()
No symbol table info available.
#2  0x08049f76 in cydump ()
No symbol table info available.
#3  0x0804ab26 in traverse ()
No symbol table info available.
#4  0x0804b399 in main ()
No symbol table info available.
(gdb) info registers
eax0x31 49
ecx0xbfce92eb   -1076981013
edx0x0  0
ebx0x5  5
esp0xbfce92bc   0xbfce92bc
ebp0xbfce9308   0xbfce9308
esi0xbfce92eb   -1076981013
edi0x8c271a8146960808
eip0x628b1a 0x628b1a strcmp+10
eflags 0x10202  [ IF RF ]
cs 0x73 115
ss 0x7b 123
ds 0x7b 123
es 0x7b 123
fs 0x0  0
gs 0x33 51
begin:vcard
fn:Mathieu Kretchner
n:Kretchner;Mathieu
org:INRIA;Syslog
adr;dom:;;2007 route des lucioles - BP93;Sophia Antipolis;;06902 CEDEX
email;internet:[EMAIL PROTECTED]
tel;work:04 92 38 76 67
x-mozilla-html:FALSE
version:2.1
end:vcard



[Dovecot] Debugging password schemes

2008-09-23 Thread Ian R. Justman


Hi, all.

I managed to get my new password scheme routine written, but a couple of 
things:


1.  The example module lacks an init routine.  Since I used it as a 
model, my module also lacks one.  As such, my newly-built module is seen 
but not registered.  In the meantime, I moved the routines into 
password-scheme.c instead where I had access to all the MD5 routines 
already set up for me.


2.  Once in password-scheme.c and modified to the point where it builds 
without warnings or errors and it doesn't gag on itself, it doesn't seem 
to work properly.


What's the best way to debug password-scheme.c so I can see what's going 
on so I can fix things accordingly?  I have to manually break apart 
the value stored in a database a bit differently than other salted 
values (it's using salted MD5 values a bit differently than normal). 
The password format from a Post.Office server, but apparently, Netscape 
Messaging Server uses this same format.


Thanks!

--Ian.

--
Ian R. Justman
UNIX hacker.  Anime fan.  Any questions?
ianj (at) ian-justman.com


Re: [Dovecot] Debugging password schemes

2008-09-23 Thread Ian R. Justman

I wrote:


Hi, all.

I managed to get my new password scheme routine written, but a couple of 
things:


1.  The example module lacks an init routine.  Since I used it as a 
model, my module also lacks one.  As such, my newly-built module is seen 
but not registered.  In the meantime, I moved the routines into 
password-scheme.c instead where I had access to all the MD5 routines 
already set up for me.


This issue is minor for now, but see below for more details.

2.  Once in password-scheme.c and modified to the point where it builds 
without warnings or errors and it doesn't gag on itself, it doesn't seem 
to work properly.


Fixed.  Stupid mistake I completely failed to see, even after a lot of 
cleanup.  Was passing the wrong value to a function (and it was an 
explicit constant value of 32 when it should have been 16!).


And on that note, would there be interest in code to allow use of 
Post.Office/Netscape Messaging Server SMD5 values?


Thanks!

--Ian.

--
Ian R. Justman
UNIX hacker.  Anime fan.  Any questions?
ianj (at) ian-justman.com


Re: [Dovecot] dovecot imap auth fails to reconnect pgsql backend

2008-09-23 Thread Frank Wang
 On Sun, 2008-09-21 at 15:44 +0800, Frank Wang wrote:
  Sep 21 14:23:49 mail dovecot: child 15241 (auth) killed with signal 11
 
 Can you still reproduce this crash? It would be nice to get its
 backtrace to get that bug fixed. The core file should be in Dovecot's
 base_dir (/var/run/dovecot probably). http://dovecot.org/bugreport.html
 
I tried the core dump method from the above link, but without luck. Here
is what I did:
1. vi /etc/dovecot.conf
mail_drop_priv_before_exec = yes
mail_debug = yes
# the rest is untouched
2. ulimit -c unlimited
3. service dovecot restart
4. echo 'core.%p'  /proc/sys/kernel/core_pattern

I noticed this in the maillog this morning:
Sep 24 07:34:20 mail dovecot: child 492 (auth) killed with signal 11

But there isn't any core dump found in the whole file system. Then I
doubted there's maybe some setting problems and did the following:
echo '/tmp/core.%p  /proc/sys/kernel/core_pattern
ulimit -c unlimited
/etc/init.d/dovecot restart
ps aux | grep dovecot-auth
kill -s 11 pid_of_dovecot_auth_found

And there still isn't any /tmp/core.* found. Is there any other way I
can try?

Regards,
Frank Wang