On Tue, 2009-12-29 at 15:50 -0500, Tony Rutherford wrote:
Hi,Using Dovecot 1.2.9 with Maildir and Layout=FS.In a plugin, i'm overriding "update_flags":void my_mail_update_flags(struct mail *_mail, enum modify_type modify_type, enum mail_flags flags)For this email which is having its flags updated, I need to retrieve the physical filename of the message. I see where using:mail_get_special(_mail, MAIL_FETCH_UIDL_FILE_NAME, &fname);...I can retrieve part of the filename, but without the ":2" and the flags part.Is there a method I can use to get the whole filename (without having to reassemble it myself). I've looked around, and I'm guessing it exists, but I don't see it offhand.
The problem is that by the time you're trying to access the file, its flags may have already changed, which also means its filename could have changed. So even if you got it, your code would probably randomly fail.
What exactly are you going to do with the filename? Maybe you should instead be opening the file with mail_get_stream() and doing something with the fd.