首页 | 邮件资讯 | 技术教程 | 解决方案 | 产品评测 | 邮件人才 | 邮件博客 | 邮件系统论坛 | 软件下载 | 邮件周刊 | 热点专题 | 工具
网络技术 | 操作系统 | 邮件系统 | 客户端 | 电子邮箱 | 反垃圾邮件 | 邮件安全 | 邮件营销 | 移动电邮 | 邮件软件下载 | 电子书下载

邮件服务器

技术前沿 | Exchange | Domino | Sendmail | Postfix | Qmail | IMail | MDaemon | Foxmail | James | Kerio | JavaMail | WinMail | Winwebmail | Merak | CMailServer | 金笛 | 其它 | 邮件与开发 |
首页 > 邮件服务器 > Postfix > postfix + SpamAssassin with SPAM Quarantine > 正文
金笛邮件系统

postfix + SpamAssassin with SPAM Quarantine

出处:onetforum.com/fourm 作者:kalinga 时间:2006-10-24 10:48:00
简单三步解决企业垃圾邮件难题
here's the postfix + SpamAssassin with SPAM Quarantine

same as you did with the basic script here

1. Install SpamAssassin

if you need any help visit
http://spamassassin.apache.org/

add a user call spamfilter with out shell.

CODE:
adduser spamfilter -s /sbin/nologin




2. Setup Postfix

edit the master.cf

add the line

CODE:
spamfilter unix - n n - - pipe
flags=Rq user=spamfilter argv=/usr/local/bin/spamfilter -f ${sender} -- ${recipient}





edit the SMTP as

CODE:
smtp     inet n     -     n     -     -     smtpd
    -o content_filter=spamfilter:dummy





now create a file call

/usr/local/bin/spamfilter

eg

CODE:
vi /usr/local/bin/spamfilter



QUOTE:
# Kalinga Athulathmudali
# 2006-01-06
# Variables

SENDMAIL="/usr/sbin/sendmail.postfix -i"
EGREP=/bin/egrep

# Exit codes from <sysexits.h>

EX_UNAVAILABLE=69

# Number of *'s in X-Spam-level header needed to sideline message:
# (Eg. Score of 5.5 = "*****" )

SPAMLIMIT=5

# Clean up when done or when aborting.

trap "rm -f /var/tempfs/out.$$" 0 1 2 3 15

# Pipe message to spamc

cat | /usr/bin/spamc -u filter > /var/tempfs/out.$$

if $EGREP -q "^X-Spam-Level: \*{$SPAMLIMIT,}" < /var/tempfs/out.$$

  then

## Change the Email address where you want your spam to get fwd to

  $SENDMAIL -f spamadmin@yourdomain.com spamtrap@yourdomain.com < /var/tempfs/out.$$

  else


  $SENDMAIL "$@" < /var/tempfs/out.$$

  fi

# Postfix returns the exit status of the Postfix sendmail command.

exit $?




now chnage the email address in script

your admin email address spamadmin@yourdomain.com
this is where your spam get fwd to spamtrap@yourdomain.com


now chnage the owner of the file to spamfilter


CODE:
chown spamfilter /usr/local/bin/spamfilter



now set permisson as

QUOTE:
chmod 755 /usr/local/bin/spamfilter



creat a dir call tempfs in var

CODE:
mkdir /var/tempfs



chnage the folder owner to spamfilter

CODE:
chown spamfilter:root /var/tempfs



reload postfix

CODE:
/etc/init.d/postfix reload



your done.

原文出处:
http://onetforum.com/fourm/viewtopic.php?t=34

相关文章 热门文章
  • 恶意软件上半年激增278% 攻击目标直指用户
  • 企业可考虑移动Email减少运行成本
  • CommVault Simpana增加了新的电子发现和依法保留功能
  • Cyanlotus青莲科技合作伙伴大会上海召开
  • 电邮附件统一管理终实现
  • Pushmail市场孕育新机遇
  • QQ邮箱使用过程中需注意的九个细节
  • 中山大学测试梭子鱼反垃圾邮件系统报告
  • 专家称反垃圾邮件的过程将是漫长的博弈
  • 东北大学温占考:信用机制现身反垃圾工作
  • 给AOL用户发送垃圾邮件 纽约男子被判入狱2年
  • Google开发Gmail、Calendar离线功能 时间未定
  • Install and configure Postfix with Cyrus-SASL+Cyrus-IMAP+MySQL
  • 在FreeBSD上建立一个功能完整的邮件服务器
  • postfix 邮件病毒过滤
  • 在Fedora上建立自己的邮件服务器
  • Postfix + SpamAssassin 安裝手冊
  • Postfix + Courier-IMAP + Cyrus-SASL + MySQL + IMP完全指南(新版)
  • Postfix + Cyrus-SASL + Cyrus-IMAPD + PgSQL HOWTO
  • 在FreeBSD5.1簡單安裝Postfix+Qpopper+Openwebmail
  • 在RHEL 4 上配置全功能的Postfix 服务器
  • Postfix + Cyrus-IMAP + Cyrus-SASL + MySQL + IMP 完全指南
  • 我的POSTFIX安装笔记
  • Postfix电子邮局的配置步骤
  • 自由广告区
     
     
    WINMAIL 让您轻松架设邮件系统
    eqmail
    最新软件下载
  • ORF Enterprise Edition 4.2 正式版
  • Exchange Server 2003 群集安装配置
  • ORF 4.2 Beta
  • Exchange 2000/2003 日志分析系统
  • Microsoft Outlook Personal Folders B..
  • MDaemon Server 9.07 英文正式版
  • Kerio MailServer 6.5.1 6098 Linux版
  • Kerio MailServer 6.5.1 6098 正式版
  • 酷邮(KooMail) V5.0 简体中文版
  • PowerGUI 
  • IMail Server 10
  • Foxmail6.5 Beta2
  • 今日邮件技术文章
  • 恶意软件上半年激增278% 攻击目标直指..
  • 企业可考虑移动Email减少运行成本
  • CommVault Simpana增加了新的电子发现..
  • Cyanlotus青莲科技合作伙伴大会上海召开
  • 电邮附件统一管理终实现
  • Pushmail市场孕育新机遇
  • QQ邮箱使用过程中需注意的九个细节
  • 中山大学测试梭子鱼反垃圾邮件系统报告
  • 专家称反垃圾邮件的过程将是漫长的博弈
  • 东北大学温占考:信用机制现身反垃圾工作
  • 给AOL用户发送垃圾邮件 纽约男子被判..
  • Google开发Gmail、Calendar离线功能 ..
  • 最新专题
  • Sendmail 邮件系统配置
  • 组建Exchange 2003邮件系统
  • Windows Server 2008 专题
  • ORF 反垃圾邮件系统
  • Exchange Server 2007 专题
  • ISA Server 2006 教程专题
  • Windows Vista 技术专题
  • “黑莓”(BlackBerry)专题
  • 移动电子邮件专题
  • Apache James 专题
  • IMail Server 操作指南
  • ISA Server 2004 使用专题
  • 分类导航
    邮件新闻资讯:
    IT业界 | 邮件服务器 | 邮件趣闻 | 移动电邮
    电子邮箱 | 反垃圾邮件|邮件客户端|网络安全
    行业数据 | 邮件人物 | 网站公告 | 行业法规
    网络技术:
    邮件原理 | 网络协议 | 网络管理 | 传输介质
    线路接入 | 路由接口 | 邮件存储 | 华为3Com
    CISCO技术 | 网络与服务器硬件
    操作系统:
    Windows 9X | Linux&Uinx | Windows NT
    Windows Vista | FreeBSD | 其它操作系统
    邮件服务器:
    程序与开发 | Exchange | Qmail | Postfix
    Sendmail | MDaemon | Domino | Foxmail
    KerioMail | JavaMail | Winwebmail |James
    Merak&VisNetic | CMailServer | WinMail
    金笛邮件系统 | 其它 |
    反垃圾邮件:
    综述| 客户端反垃圾邮件|服务器端反垃圾邮件
    邮件客户端软件:
    Outlook | Foxmail | DreamMail| KooMail
    The bat | 雷鸟 | Eudora |Becky! |Pegasus
    IncrediMail |其它
    电子邮箱: 个人邮箱 | 企业邮箱 |Gmail
    移动电子邮件:服务器 | 客户端 | 技术前沿
    邮件网络安全:
    软件漏洞 | 安全知识 | 病毒公告 |防火墙
    攻防技术 | 病毒查杀| ISA | 数字签名
    邮件营销:
    Email营销 | 网络营销 | 营销技巧 |营销案例
    邮件人才:招聘 | 职场 | 培训 | 指南 | 职场
    解决方案:
    邮件系统|反垃圾邮件 |安全 |移动电邮 |招标
    产品评测:
    邮件系统 |反垃圾邮件 |邮箱 |安全 |客户端
    广告联系 | 合作联系 | 关于我们 | 联系我们 | 繁體中文
    版权所有:邮件技术资讯网©2003-2007 www.5dmail.net, All Rights Reserved
    www.5Dmail.net Web Team   粤ICP备05009143号