Alex Baule
2010-Sep-23 20:31 UTC
[Dovecot] get MAIL_FETCH_UIDL_FILE_NAME after save a email
Hi Timo... 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. Have another way to get the name from a saved email, after save it ? after this: ret = zbox->super.transaction_commit(t, changes_r); To get the correct name from a saved email.
Timo Sirainen
2010-Sep-23 20:56 UTC
[Dovecot] get MAIL_FETCH_UIDL_FILE_NAME after save a email
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.