MailScanner相关规则设置

页面导航:首页 > 操作系统 > LINUX > MailScanner相关规则设置

MailScanner相关规则设置

来源: 作者: 时间:2016-08-18 10:29 【

MailScanner相关规则设置1、垃圾邮件白名单编辑Mailscanner配置文件# vi /etc/Mailscanner/Mailscanner.confIs Definitely Not Spam = /etc/MailScanner/rules/whitelist.rules规则文件格式如下:# vi ...
MailScanner相关规则设置
 
1、垃圾邮件白名单
编辑Mailscanner配置文件
# vi /etc/Mailscanner/Mailscanner.conf
Is Definitely Not Spam = /etc/MailScanner/rules/whitelist.rules
规则文件格式如下:
# vi /etc/MailScanner/rules/whitelist.rules
##添加被列入白名单的地址:
From:    [email protected]    yes
From:    [email protected]    yes
##添加被列入白名单的IP的地址
From:    192.168.1.    yes
From:    /^192\.168\.13[4567]\./    yes
FromOrTo:    default    no
 
2、垃圾邮件黑名单
编辑Mailscanner配置文件
# vi /etc/Mailscanner/Mailscanner.conf
Is Definitely Spam = /etc/MailScanner/rules/blacklist.rules
规则文件格式如下:
# vi /etc/MailScanner/rules/blacklist.rules
##添加被列入白名单的地址:
From:    [email protected]    yes
From:    [email protected]    yes
##添加被列入黑名单的IP的地址
From:    192.16.8.1.    yes
FromOrTo:    default    no
 
3、对发送的邮件进行签名
编辑Mailscanner配置文件
# vi /etc/Mailscanner/Mailscanner.conf
Sign Clean Messages = /etc/MailScanner/rules/signing.rules
规则文件格式如下:
# vi /etc/MailScanner/rules/signing.rules
##添加发送的域名
From:    [email protected]    yes
##添加IP地址
From:    192.168.1.    yes
FromOrTo:    default    no
 
4、对不同的域使用不同的签名
编辑Mailscanner配置文件
# vi /etc/Mailscanner/Mailscanner.conf
Inline Text Signature = /etc/MailScanner/rules/sig.text.rules
Inline HTML Signature = /etc/MailScanner/rules/sig..rules
规则文件格式如下:
# vi /etc/MailScanner/rules/sig.text.rules
##添加不同的域
From:    [email protected]    /etc/MailScanner/reports/domain1.sig.txt
From:    [email protected]    /etc/MailScanner/reports/domain2.sig.txt
设置不同的域使用的HTML签名
# vi /etc/MailScanner/rules/sig.html.rules
##添加不同的域
From:    [email protected]    /etc/MailScanner/reports/domain1.sig.html
From:    [email protected]    /etc/MailScanner/reports/domain2.sig.html
 
5、只对某些域进行病毒扫描
编辑Mailscanner配置文件
# vi /etc/Mailscanner/Mailscanner.conf
Virus Scanning = /etc/MailScanner/rules/virus.scanning.rules
规则文件格式如下:
# vi /etc/MailScanner/rules/virus.scanning.rules
FromOrTo:    [email protected]    yes
FromOrTo:    default    no
 
6、给多个人发送管理员通知
编辑Mailscanner配置文件
# vi /etc/Mailscanner/Mailscanner.conf
Notices To = /etc/MailScanner/rules/notices.to.rules
规则文件格式如下:
# vi /etc/MailScanner/rules/notices.to.rules
##增加地址
To:
@domain1.com
[email protected] [email protected]
To:
@domain2.com
[email protected] [email protected]
FromOrTo:    default    [email protected]
 
7、只隔离某些病毒
编辑Mailscanner配置文件
# vi /etc/Mailscanner/Mailscanner.conf
Quarantine Infections = /etc/MailScanner/rules/quarantine.rules
规则文件格式如下:
# vi /etc/MailScanner/rules/quarantine.rules
##增加病毒名称
Virus:
sobig    no
Virus:
default    yes
 
8、在规则中使用两个条件
编辑Mailscanner配置文件
# vi /etc/Mailscanner/Mailscanner.conf
Spam Actions = /etc/MailScanner/rules/spam.actions.rules
规则文件格式如下:
# vi /etc/MailScanner/rules/spam.actions.rules
##增加条件
From:    domain.com and To: user@*    deliver
FromOrTo:    domain1.com and FromOrTo:    domain2.com    deliver
FromOrTo:    default    store notify
 
9、使用perl匹配更高级的规则:
规则文件格式如下:
##匹配 [email protected]@sub.domain.com
From:    /[\@\.]domain\.com$/    yes
##匹配所有 .gov 
From:    /\.gov$/    yes
##匹配德国或丹麦的域
From:    host:/(de|dk)$/    yes
 
10、设置邮件大小
规则文件格式如下:
# vi /etc/MailScanner/rules/max.message.size.rules
To:    [email protected]    10M
To:    [email protected]    20M
From:    [email protected]    5M
From:    [email protected]    500K
FromOrTo:    default    0
Tags:

文章评论

最 近 更 新
热 点 排 行
Js与CSS工具
代码转换工具

<