Mutt:使用Fetchmail收邮件时在服务器上只保留部分文件夹内容

公司邮箱空间只有4G,邮件太多,特别是社区里的邮件.现在是收到警告就上去删一次,太麻烦了.当然强大的Gmail不存在这个问题.

~/.fetchmailrc 里可以执行多次poll 命令, 针对不同的文件夹采用不同的选项参数.
“no keep” 表示不在服务器保留接受过的邮件.
mda命令是对poll回来的邮件做处理, 每个poll命令后面需要紧跟一个mda命令.

# Only keep important internal mails on mail server
poll mailserver.com proto imap authenticate password user akong password mypasswd folder 'inbox' 'rhvirt' 'rhkernel' no fetchall keep ssl
mda "/usr/bin/procmail -d %T"

# Upstream maillists have archive, I also backup them in Gmail, so don't keep them in company mail server.
poll mailserver.com proto imap authenticate password user akong password mypasswd folder 'kvm-upstream' 'kernel-flood' 'seabios' 'autotest' no fetchall no keep ssl
mda "/usr/bin/procmail -d %T"

# set sleep time before next polling
set daemon 180