[Dovecot] get MAIL_FETCH_UIDL_FILE_NAME after save a email

Timo Sirainen tss at iki.fi
Thu Sep 23 23:56:18 EEST 2010


On 23.9.2010, at 21.31, Alex Baule wrote:

> I Try to get the name from the saved email, you said to me, to get this with
> the get_special, ok... thats work.
> 
> I get the name with this:
> mail_get_special(t->save_ctx->dest_mail, MAIL_FETCH_UIDL_FILE_NAME, &fname);
> 
> By i got some mistake... when i save a email that exist in the same
> directory, the email is rewrited with another name, but the get_special give
> me the old one name.

Do you mean the base filename (stuff before ":2,") is different also? The problem with getting maildir filenames is that the filename changes whenever flags change, so there are no guarantees that whatever filename you do get that by the time you try to use it it hasn't already changed. The base filename stays the same though.



More information about the dovecot mailing list