Resubmission after N days

Håkon Alstadheim hakon at alstadheim.priv.no
Thu Feb 5 08:54:44 UTC 2015


On 05. feb. 2015 08:59, Steffen Kaiser wrote:
>
> On Wed, 4 Feb 2015, Thomas Güttler wrote:
>> Am 04.02.2015 um 07:49 schrieb Steffen Kaiser:
>>> On Wed, 4 Feb 2015, Thomas Güttler wrote:
>>>
>>>> I would like to implement a 43Folder system[1] with dovecot and a 
>>>> mail user agent.
>>>
>>>> Use case:
>>>
>>>> - I have a new mail in my inbox. I read it and see that I can't 
>>>> handle it now. I want to handle this mail in 5 days.
>>>> - Now I want to have some sort of resubmission: the mail should be 
>>>> moved to a different location for these 5 days.
>>>> - After 5 days the mail should be moved to my inbox again.
>>>
>>> What mail storage are you using? With Maildir all messages are plain 
>>> files, you could move those messages into a specific folder and do:
>>
>> Yes, I use Maildir
>>
>>>
>>> find /path/to/folder -mtime +$days -print0 | \
>>>  xargs -r0 mv -t /path/to/INBOX/new
>>
>> Yes, this should work. But a solution which uses IMAP would be 
>> preferred.
>
> What specific action shall be done via IMAP? The move?
> Then use any IMAP client library, use the LIST command to get the 
> mailboxes, FETCH to get the messages and COPY/EXPUNGE to move them. 
No need to use the IMAP server directly.

Read the manual pages for doveadm(1) and the pages it refers to like 
doveadm-move(1) and doveadm-flags(1) , check out the \Seen flag. Then 
sit down with your favourite scripting language, and make some cron-jobs.

On principle you do NOT want to manipulate the the dates of the mails, 
but the user could sort by order received, to get the recently moved 
mails displayed at the top of the mailbox listing.




More information about the dovecot mailing list