Howdy. I was in the process of turning up a new dbmail install when I ran into a rather large problem. When I upload more than two messages from my local inbox onto the server via IMAP, the server spins in a tight loop and runs forever, which is something of a problem when I want to mass-migrate people from cyrus to dbmail via imap. The problem seems to be that db_get_msgflag() and db_get_main_header() are getting called over and over, courtesy of _ic_fetch().

Wrong.

Like I said: it's _ic_search that's messing up here.

Aw come on, give a guy some credit. I'm a first time user on his first time install. :)

> COMMAND: [5 UID SEARCH RECENT HEADER MESSAGE-ID <[EMAIL PROTECTED]>]

It's not just that dbmail starts searching *all* messages in the mailbox involved whereas only 'recent' messages should be searched. Which is just very sloooooooow on large mailboxes to begin with (bug #97). The problem there is that the 'recent' flag is never cleared at the moment.

Hrm....

IMAPClientHandler(): Finished command append
IMAPClientHandler(): line read for PID 74220
COMMAND: [7 UID SEARCH RECENT HEADER MESSAGE-ID <[EMAIL PROTECTED]>]

Same type of search as before, but with a nasty twist...

dbpgsql.c,db_query: executing query [SELECT mailbox_idnr FROM dbmail_mailboxes WHERE mailbox_idnr = '1' AND owner_idnr = '3']

looking for RECENT messages

dbpgsql.c,db_query: executing query [SELECT block.messageblk FROM dbmail_messageblks block, dbmail_messages msg WHERE block.physmessage_id = msg.physmessage_id AND msg.message_idnr = '120' ORDER BY block.messageblk_idnr]

Parsing a message for the message-id header lookup.



dbpgsql.c,db_query: executing query [SELECT message_idnr FROM dbmail_messages WHERE mailbox_idnr = '1' AND status < '2' AND unique_id!='' AND recent_flag=1]

Here we go again. But this time no graceful exit:

dbpgsql.c,db_query: executing query [SELECT block.messageblk FROM dbmail_messageblks block, dbmail_messages msg WHERE block.physmessage_id = msg.physmessage_id AND msg.message_idnr = '120' ORDER BY block.messageblk_idnr]

Look maw, I'm looping.....

This is a nasty one Sean.

It's imaputils.c(perform_imap_search)

Hrm... alright... any ideas/workarounds? I'm pretty handy with C and PostgreSQL if you want me to test anything or hack something into place. -sc

--
Sean Chittenden

Reply via email to