在所有IMAP文件夹上运行Archivemail。

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了在所有IMAP文件夹上运行Archivemail。相关的知识,希望对你有一定的参考价值。

Change 'username' (twice!) with your imap username,'password'with your imap password, and 'example.com' (twice!) with the url of your imap mailserver.

Works on: Ubuntu with Evolution, sqlite3 and archivemail installed.
Evolution is required because evolution stores the available folders in IMAP.
sqlite3 is requird to extract those available folders and recurse trough them.

This command looks up all the available folders in your imap box, recurses trough them and runs archivemail to archive all the online mail.

NOTE: remove the -n (dy-run) flag to actually archive the items.
NOTE: remove the -v (verbose) flag to be less verbose.

TODO: option to purge empty directories.
TODO: store username, password and mailserverURL in a $VAR.
  1. for folder in `sqlite3 .evolution/mail/imap/username@example.com/folders.db "SELECT folder_name FROM folders"`; do
  2. archivemail -d 60 -S 1048576 -u -v -n "imaps://username:[email protected]/$folder";
  3. done

以上是关于在所有IMAP文件夹上运行Archivemail。的主要内容,如果未能解决你的问题,请参考以下文章

在 php 网站上集成 IMAP

如何使用 IMAP 发送邮件?

Python:如何通过 IMAP 将带有密件抄送收件人的草稿电子邮件存储到 Exchange Server?

PHP 中的 imap_list() 没有显示我的“附加邮箱”

如何在 Gnus 中自动订阅新的 IMAP 文件夹?

如何使用配置文件 (.ebextensions) 在 AWS Elastic Beanstalk 上安装 PHP IMAP 扩展?