简体   繁体   English

fetchmail / procmailrc按日期过滤

[英]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.

相关问题 Fetchmail:是否可以检索远程文件夹并将它们放入特定的本地文件夹? - Fetchmail: Is it possible to retrieve remote folders and put these into specific local folders? 用于提取 Outlook 邮件的日期过滤器 - Date filter to extract Outlook mails Maildrop:按日期过滤邮件:标题 - Maildrop: Filter mail by Date: header 根据 .procmailrc 文件中的文本将 utf8 解码为 ISO-8859-1 邮件主题 - Decode the utf8 to ISO-8859-1 mail subject to text in .procmailrc file 使用小时和分钟按日期过滤电子邮件 - Filter emails by date using hours and minutes Nifi电子邮件ConsumeIMAP按主题,从,到和日期过滤 - Nifi Email ConsumeIMAP filter by subject, from , to and date 过滤当前日期(今天的日期)发送的 Outlook 电子邮件 - Filter outlook emails sent on current date (today's date) Postfix“错误的发件人地址语法”导致fetchmail重复重新获取同一封电子邮件 - Postfix “bad sender address syntax” causes fetchmail to re-fetch the same email repeatedly 如何使用Python中的imaplib在给定日期过滤掉多个发件人的电子邮件? - How to I filter out emails from multiple senders on a given date using imaplib in Python? 正则表达式可过滤电子邮件 - Regex expression to filter email
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM