[英]fetchmail/procmailrc filter by date
I have fetchmail grab my email from a pop account and send it to procmail. 我有fetchmail从一个流行帐户获取我的电子邮件,并将其发送到procmail。 I have 'keep' set in my fetchmailrc file because i also use the email for outlook and i cant have fetchmail taking all my emails. 我在fetchmailrc文件中设置了“保留”,因为我也将电子邮件用于Outlook,而我无法让fetchmail接收所有电子邮件。
My problem is i want to download just todays emails or at lease since last time fetchmail ran. 我的问题是自上次运行fetchmail以来,我只想下载今天的电子邮件或租借。
right now i am trying to filter by date in the procmail file but it is not working. 现在,我正在尝试按procmail文件中的日期进行过滤,但无法正常工作。
I am using fedora14 我正在使用fedora14
contents of .procmailrc .procmailrc的内容
SHELL=/bin/bash
DATEZ="date +'%a, %d %m %Y'"
:0
*^From.*\<(blah@blah\.com|blah2@blah2\.ca)\>
*^Content-Type:*
*^ name.*\.(xls|doc)
*$ ^Date:.*$DATEZ
{
:0fw
| uudeview -p $HOME/Inbound/Received -
:0
| $HOME/Inbound/Start.bash 2> /dev/null
}
Well it pays to read. 好吧,值得一读。 In the fetchmail manual it explains in detail to use the -U flag. 在fetchmail手册中,它详细说明了使用-U标志。 This then only downloads the emails from when you last polled the server. 然后,这只会从您上次轮询服务器时下载电子邮件。 so the command is: 所以命令是:
fetchmail -k -U
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.