I have a large IMAP email account which contains many emails in a rich structure of directories. How to back up the whole IMAP account to my local computer? The requirements:
我有一个很大的IMAP 电子邮件帐户,其中包含许多具有丰富目录结构的电子邮件。 如何将整个IMAP帐户备份到我的本地计算机? 要求:
Automatically downloading these files. There are many directories, and copying-pasting emails will take too much time.
自动下载这些文件 。 目录很多,复制粘贴电子邮件将花费太多时间。
Keep the directory structures which are used to organize these emails.
保留用于组织这些电子邮件的目录结构。
I use offlineimap
to synchronize the emails when the iMail at HKUST change to @Connect.
当HKUST的iMail更改为@Connect时,我使用offlineimap
同步电子邮件。
On Fedora, installing offlineimap
by # yum install offlineimap
.
在Fedora上,通过offlineimap
# yum install offlineimap
。
The configuration in my ~/.offlineimaprc
:
我的~/.offlineimaprc
的配置:
[general]
accounts = USTiMail
[Account USTiMail]
localrepository = Local
remoterepository = Remote
[Repository Local]
type = Maildir
localfolders = ~/Mail/USTiMail
[Repository Remote]
type = IMAP
readonly = true
remotehost = imap.ust.hk
remoteuser = zma
To start the backing up, simply run offlineimap
and it will ask for the password.
要开始备份,只需运行offlineimap
,它将要求输入密码。
The readonly = true
in the Remote repository part is to make sure changes at local by accident are not synced to the remote IMAP side.
远程存储库部分中的readonly = true
是确保偶然在本地进行的更改不会同步到远程IMAP端。
After the emails are sync’ed from the IMAP server, archive or compress as you need.
从IMAP服务器同步电子邮件后,根据需要存档或压缩。
The emails are organized in the Maildir format. Many tools can be used to view the emails. I use mutt
by
电子邮件以Maildir格式组织。 许多工具可用于查看电子邮件。 我用mutt
mutt -f /path/to/a/mail/dir/
翻译自: https://www.systutorials.com/how-to-back-up-a-complete-imap-account/