垃圾邮件过滤

最近被垃圾邮件骚扰,烦恼又无奈。只好屏蔽了特定域名的邮件。判断条件如下:

  • 1 发给 ganwtATganwt.com 的邮件
  • 2 几个特定域名(.info,.biz,.co,.us,.live,.online)

但凡符合以上两个条件的邮件,都一律直接移到【已删除】并标记为【已阅读】。

为了防止有些邮件的误删,所以不做直接删除的判定,如果有符合条件又非垃圾邮箱的情况下,手动从【已删除】里找一下也简单。

代码如下:

require ["fileinto","imap4flags","regex"];
# rule:[ganwt+.info]
if allof (header :contains "to" "[email protected]", header :matches "from" "^[a-zA-Z][email protected]*.info

quot;) { fileinto "INBOX.Trash"; setflag "\\Seen"; } # rule:[ganwt+.biz] if allof (header :contains "to" "[email protected]", header :regex "from" "^[a-zA-Z][email protected]*.biz

quot;) { fileinto "INBOX.Trash"; setflag "\\Seen"; } # rule:[ganwt+.co] if allof (header :contains "to" "[email protected]", header :regex "from" "^[a-zA-Z][email protected]*.co

quot;) { fileinto "INBOX.Trash"; setflag "\\Seen"; } # rule:[ganwt+.us] if allof (header :contains "to" "[email protected]", header :regex "from" "^[a-zA-Z][email protected]*.us

quot;) { fileinto "INBOX.Trash"; setflag "\\Seen"; } # rule:[ganwt+.live] if allof (header :contains "to" "[email protected]", header :regex "from" "^[a-zA-Z][email protected]*.live

quot;) { fileinto "INBOX.Trash"; setflag "\\Seen"; } # rule:[ganwt+.online] if allof (header :contains "to" "[email protected]", header :regex "from" "^[a-zA-Z][email protected]*.online

quot;) { fileinto "INBOX.Trash"; setflag "\\Seen"; }

发表评论

邮箱地址不会被公开。 必填项已用*标注