手机版
你好,游客 登录 注册 搜索
背景:
阅读新闻

Linux邮件服务器反垃圾策略的设置过程

[日期:2009-03-31] 来源:Linux社区  作者:Linux编辑 [字体:大 中 小]

4、命令行下的参数配置:

1、 1、/etc/postfix/main.cf文件末尾添加如下内容:

default_process_limit=200

imss_timeout=10m

imss_connect_timeout=1s

content_filter = imss:localhost:10025

imss_destination_recipient_limit=200

imss_destination_concurrency_limit=20

2、在/etc/postfix/master.cf文件末尾添加以下内容:

#IMSS: content filter smtp transport "imss" for IMSS

imss unix - - n - - smtp

-o disable_dns_lookups=yes

-o smtp_connect_timeout=$imss_connect_timeout

-o smtp_data_done_timeout=$imss_timeout

#IMSS: content filter loop back smtpd

localhost:10026 inet n - n - 20 smtpd

-o content_filter=

-o smtpd_timeout=$imss_timeout

-o local_recipient_maps=

-o myhostname=localhost.$mydomain

3. Relay 控制

a. 允许Relay的Domain设置:

编辑/etc/postfix/main.cf文件,在如下位置添加允许的任意Relay的Domain,如:

relay_domains = 263.net

b. 允许接受的Domain设置:

编辑/etc/postfix/main.cf文件,在如下位置添加允许接受的Domain

mydestination = trendmicro.com.cn

c. 不受Relay限制的地址设置

编辑/etc/postfix/main.cf文件,在如下位置添加允许接受的Domain

mynetworks = 10.11.240.0/24, 127.0.0.1

说明:所谓Relay就是指别人能用这台SMTP邮件服务器,给任何人发信,这样别有用心的垃圾发送者可以使用笔者单位的这台邮件服务器大量发送垃圾邮件,而最后别人投诉的不是垃圾发送者,而是单位的服务器。

参数relay_domains & mydestination的主要区别在于:

Postfix会转发目的地符合 $relay_domains及其子域的邮件;

Postfix会接受目的地符合 $mydestination的邮件,并且在没有smart host的情况下尝试对这些域进行本地落地处理,因而,为了能正常的接受这些邮件,一定要对齐设置smart host;IMSS UNIX的Relay 控制界面设置中的域,即是$mydestination参数值,因而,一定要在IMSS的Domain-Based Delivery中做相应Deliver设置。

5、重新启动Postfix服务器:

#postfix start

重新让postfix读取更改后的配置只需运行“postfix reload”即可。

打开服务

器的8081端口:

# iptables -A FORWARD -i eth0 -p tcp ——dport 8081 -j ACCEPT

iptables -A FORWARD -i eth0 -p udp ——dport 8081 -j ACCEPT

linux
相关资讯       Linux服务器  Linux邮件服务器 
本文评论   查看全部评论 (0)
表情: 表情 姓名: 字数

       

评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款