Hi, I want to add a feature to the fetch command in IMAP, by enabling it to return the save date, when I request the SAVEDATE parameter. I want to use this for my webmail application, so I can show the users the deleted date when they are viewing the Trash folder. I was able to put it directly into the code (patch attached), but I was wondering if there is a way to put it as a plugin instead. Can somebody guide me on how to do that. Thanks a lot. ------------------------- Play the best Flash Games on the web with Maktoob Shams Games. http://games.maktoob.com/ -------------- next part -------------- A non-text attachment was scrubbed... Name: fetchSavedDate.patch Type: text/x-c Size: 2390 bytes Desc: not available URL: <http://dovecot.org/pipermail/dovecot/attachments/20090521/3f5409c5/attachment-0002.bin>
On Thu, 2009-05-21 at 00:25 +0000, Alaa Ibrahim wrote:> I want to add a feature to the fetch command in IMAP, by enabling it to return the save > date, when I request the SAVEDATE parameter. > I want to use this for my webmail application, so I can show the users the deleted date > when they are viewing the Trash folder.I guess this could be useful for other purposes too. Actually today I just needed this for testing that my dbox changes work. So committed it to v1.2+: http://hg.dovecot.org/dovecot-1.2/rev/aedec88c6e31> I was able to put it directly into the code (patch attached), but I was wondering if > there is a way to put it as a plugin instead.I think you could have also made it a plugin. In the plugin's init() function just call imap_fetch_handlers_register() to register your new handler(s). -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 197 bytes Desc: This is a digitally signed message part URL: <http://dovecot.org/pipermail/dovecot/attachments/20090520/5760fc5f/attachment-0002.bin>
I'm trying to put it in a plugin, but when I call imap_fetch_handlers_register(), it works but all other fetch handlers get removed, my init is void savedate_plugin_init(void) { const struct imap_fetch_handler savedate_handler[1] = { { "X-SAVEDATE", fetch_x_savedate_init } }; imap_fetch_handlers_register(savedate_handler,1); } is there something wrong that I'm doing? On Wed, 20 May 2009 22:55:34 -0400, Timo Sirainen <tss at iki.fi> wrote: On Thu, 2009-05-21 at 00:25 +0000, Alaa Ibrahim wrote:> I want to add a feature to the fetch command in IMAP, by enabling it to return the save > date, when I request the SAVEDATE parameter. > I want to use this for my webmail application, so I can show the users the deleted date > when they are viewing the Trash folder.I guess this could be useful for other purposes too. Actually today I just needed this for testing that my dbox changes work. So committed it to v1.2+: http://hg.dovecot.org/dovecot-1.2/rev/aedec88c6e31> I was able to put it directly into the code (patch attached), but I was wondering if > there is a way to put it as a plugin instead.I think you could have also made it a plugin. In the plugin's init() function just call imap_fetch_handlers_register() to register your new handler(s). ------------------------------------------ Ala'a A. Ibrahim Senior System Admin Maktoob.com, Inc. ------------------------- Discuss the hottest sports issue with Sport4ever forum Now! http://sport4ever.maktoob.com/