免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1318 | 回复: 2
打印 上一主题 下一主题

请高手编一个正式表达式过滤垃圾邮件 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-12-02 16:50 |只看该作者 |倒序浏览
邮件头如下:
Return-Path: <leungtszwai1@accamail.com>
Delivered-To: same@clifford-estates.com.cn
Received: from localhost (localhost.localdomain [127.0.0.1])
        by mail.clifford-estates.com.cn (Postfix - by extmail.org) with ESMTP id 3EC2680A05
        for <same@clifford-estates.com.cn>; Mon,  1 Dec 2008 21:38:53 +0800 (CST)
X-Virus-Scanned: amavisd-new at clifford-estates.com.cn
Received: from mail.clifford-estates.com.cn ([127.0.0.1])
        by localhost (mail.clifford-estates.com.cn [127.0.0.1]) (amavisd-new, port 10024)
        with ESMTP id EDfxscdYW3U3 for <same@clifford-estates.com.cn>;
        Mon,  1 Dec 2008 21:38:30 +0800 (CST)
Received: from linux.platinao.com.br (linux.platinao.com.br [200.181.113.34])
        by mail.clifford-estates.com.cn (Postfix - by extmail.org) with SMTP id EAA9980A08
        for <same@clifford-estates.com.cn>; Mon,  1 Dec 2008 21:38:27 +0800 (CST)
To: <same@clifford-estates.com.cn>
Subject: Delivery Status Notification (Failure)
From: <same@clifford-estates.com.cn>
MIME-Version: 1.0
Importance: High
Content-Type: text/html
Message-Id: <20081201133827.EAA9980A08@mail.clifford-estates.com.cn>
Date: Mon,  1 Dec 2008 21:38:27 +0800 (CST)
请高手帮我!

论坛徽章:
0
2 [报告]
发表于 2008-12-02 17:30 |只看该作者
就是将自己发给自己的邮件进行匹配

论坛徽章:
15
2015年辞旧岁徽章
日期:2015-03-03 16:54:15双鱼座
日期:2015-01-15 17:29:44午马
日期:2015-01-06 17:06:51子鼠
日期:2014-11-24 10:11:13寅虎
日期:2014-08-18 07:10:55酉鸡
日期:2014-04-02 12:24:51双子座
日期:2014-04-02 12:19:44天秤座
日期:2014-03-17 11:43:36亥猪
日期:2014-03-13 08:13:51未羊
日期:2014-03-11 12:42:03白羊座
日期:2013-11-20 10:15:18CU大牛徽章
日期:2013-04-17 11:48:45
3 [报告]
发表于 2008-12-02 19:59 |只看该作者

是不是这个意思?

A=`grep "^To: " urfile |awk '{print $2}'`
B=`grep "^From: " urfile |awk '{print $2}'`

If [ $A == $B ] then
...
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP