[Dovecot] Best way to move mail to an archive
Hello all...new to dovecot and this list.
I have a question that may have been answered before, but I can't find anything yet that addresses it directly. I installed dovecot 2.0.8 (+postfix, fetchmail) on a small server to manage several e-mail accounts. I love this software!
So, to back to the question: I'd like to archive e-mail as it ages into a single IMAP archive directory. Ideally, I would like to set up a cron job to search for e-mail in all of my imap directories that older that 'X' days and move it to the archive directory. I know that dovecot wants to manage e-mail movement thru the IMAP interface, so I'm leery of just using ordinary Linux commands to move mail around and bypass the IMAP protocol. Does anybody have any recommendations about dovecot/IMAP safe commands I could use to accomplish this task?
Thanks in advance and I apologize for not being more knowledgeable about this subject.
Regards,
Richard
On Sat, 2010-12-18 at 12:21 -0500, Richard C. Cox wrote:
I'd like to archive e-mail as it ages into a single IMAP archive directory. Ideally, I would like to set up a cron job to search for e-mail in all of my imap directories that older that 'X' days and move it to the archive directory. I know that dovecot wants to manage e-mail movement thru the IMAP interface, so I'm leery of just using ordinary Linux commands to move mail around and bypass the IMAP protocol. Does anybody have any recommendations about dovecot/IMAP safe commands I could use to accomplish this task?
Personally, I just do it over IMAP.
http://david.woodhou.se/archivemail.sh
-- dwmw2
Thank you! Very nice script. Exactly what I was looking for!
On Sat, 2010-12-18 at 12:21 -0500, Richard C. Cox wrote:
I'd like to archive e-mail as it ages into a single IMAP archive directory. Ideally, I would like to set up a cron job to search for e-mail in all of my imap directories that older that 'X' days and move it to the archive directory. I know that dovecot wants to manage e-mail movement thru the IMAP interface, so I'm leery of just using ordinary Linux commands to move mail around and bypass the IMAP protocol. Does anybody have any recommendations about dovecot/IMAP safe commands I could use to accomplish this task?
Personally, I just do it over IMAP.
participants (2)
-
David Woodhouse
-
Richard C. Cox