Maildrop:按日期过滤邮件:标题
我正在使用 getmail + maildrop + mutt + msmtp 链,消息存储在 Maildir 中。非常大的收件箱困扰着我,所以我想按日期组织邮件,如下所示:
Maildir
|-2010.11->all messages with "Date: *, * Nov 2010 *"
|-2010.12->same as above...
|-2011.01
`-2011.02
我在谷歌上搜索了很多并阅读了有关邮件过滤器语言的信息,但对我来说仍然很难编写这样的过滤器。 Maildrop 的邮件列表档案几乎没有这方面的内容(据我扫描)。 https://unix.stackexchange 有一些半解决方案.com/questions/3092/organize-email-by-date-using-procmail-or-maildrop,但我不喜欢它,因为我想使用“日期:”标题并且我想排序按月份,如数字“YEAR.MONTH”。 任何帮助、想法、链接、材料将不胜感激。
I'm using getmail + maildrop + mutt + msmtp chain with messages stored in Maildir. Very big inbox bothers me, so i wanted to organize mail by date like that:
Maildir
|-2010.11->all messages with "Date: *, * Nov 2010 *"
|-2010.12->same as above...
|-2011.01
`-2011.02
I've googled much and read about mailfilter language, but still it is hard for me to write such filter. Maildrop's mailing list archives has almost nothing on this (as far as i scanned through it). There is some semi-solution on https://unix.stackexchange.com/questions/3092/organize-email-by-date-using-procmail-or-maildrop, but i don't like it, because i want to use "Date:" header and i want to sort by month like "YEAR.MONTH" in digits.
Any help, thoughts, links, materials will be appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我主要使用
man
页面,想出了以下在 Ubuntu 10.04 上使用的解决方案。创建一个名为mailfilter-archive
的mailfilter
文件,其中包含以下内容:这使用
date
命令,采用date
标头内容作为输入(假设它采用 RFC-2822 格式)和生成一个格式化日期用作邮件文件名。然后对现有邮件文件执行以下操作以存档您的邮件:
如果
mail-archive
内容看起来不错,您可以删除mail1
、mail2
、mail3
、mail4
等邮件文件。Using mostly
man
pages, I came up with the following solution for use on Ubuntu 10.04. Create amailfilter
file called, for example,mailfilter-archive
with the following content:This uses the
date
command, taking thedate
header content as input (assuming it is in RFC-2822 format) and producing a formatted date to use as the mail file name.Then execute the following on existing mail files to archive your messages:
If the
mail-archive
contents look good, you could remove themail1
,mail2
,mail3
,mail4
, etc. mail files.