On Sat, 2004-12-18 at 02:30 +0100, Johannes Berg wrote:
Here's a new version, it compiles (and appears to work) except the part in "copy_reclassified".
Can anyone help me (probably only Timo knows how) with that? http://johannes.sipsolutions.net/edit/Projects/dovecot-dspam-integration/pse...
You can get the looping code from cmd-copy.c's fetch_and_copy(). Just change mailbox_copy() to whatever you want to do with the message. mail->get_stream() gives you contents to the messages, but you previously said you wanted to hardlink the message? In that case you'd have to #include "lib-storage/index/maildir/maildir-storage.h" and use maildir_file_do() to make sure the message is found even if it's flags are being changed. See maildir/maildir-copy.c how to do it.