免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
12
最近访问板块 发新帖
楼主: t163t163
打印 上一主题 下一主题

[Mail] 如何在POSTFIX中限制群发问题. [复制链接]

论坛徽章:
0
11 [报告]
发表于 2006-07-23 18:30 |只看该作者
首先顺序是重要的;
其次, 我犯了1个错误, 应该是
check_recipient_access  hash:/etc/postfix/recipient_list
这句话放在
smtpd_recipient_restrictions =
   .......
  check_recipient_access hash:/etc/postfix/recipient_list
  ......

你可以再看看.



请问
check_recipient_access hash:/etc/postfix/recipient_list
是否要加上"="号

check_recipient_access = hash:/etc/postfix/recipient_list

论坛徽章:
0
12 [报告]
发表于 2010-10-12 14:14 |只看该作者
需求与1楼的相同,按照6楼的试了一下,没有成功,请问大家有没有做过,谢谢!

论坛徽章:
0
13 [报告]
发表于 2010-10-12 14:42 |只看该作者
邮件系统比较费时费力,而且最终问题也是一堆!建议大家使用开源的邮件系统解决方案!比较省时省力!一切都OK!

开源IREDMAIL

商业破解kerio mail server都很方便的.

论坛徽章:
0
14 [报告]
发表于 2010-10-12 15:32 |只看该作者
呵呵,就是用的iredmail,不过我用的是4.0,需要装iredapd才能实现,不过,经过一段时间的测试,iredapd不稳定,经常down掉,才寻找其它的方法.

论坛徽章:
0
15 [报告]
发表于 2010-10-12 17:35 |只看该作者
我来结贴吧,详解请看:http://chlotte.blog.51cto.com/

我们公司需求:只有公司高层才可以向全体员工发送邮件,除此之外,均无权向全体员工发送邮件。



公司高层邮箱:

wanglujing@ourgame.com

renlina@ourgame.com   

caiyanyan@ourgame.com

qinwen@ourgame.com   

shiwanting@ourgame.com  



全体员工邮箱:qtyg@ourgame.com





解决方法如下:



1,修改配置文件(注:红色的代表新增加的)

[root@mail postfix]# vi main.cf



#youshengtao 2010-10-12

smtpd_restriction_classes = local_only, local_only1

local_only = check_recipient_access hash:/etc/postfix/plugin/plugin.list,reject

local_only1 = check_sender_access hash:/etc/postfix/plugin/plugin.users,reject



smtpd_recipient_restrictions = reject_unknown_sender_domain, reject_unknown_recipient_domain, reject_non_fqdn_sender, reject_non_fqd

n_recipient, reject_unlisted_recipient, check_sender_access hash:/etc/postfix/plugin/plugin.users, check_sender_access hash:/etc/postfix/plugin/local_senders, check_recipient_access hash:/etc/postfix/plugin/local_recipients, permit_mynetworks, permit_sasl_authenticated, rejec

t_unauth_destination, reject_non_fqdn_helo_hostname, reject_invalid_helo_hostname, check_policy_service inet:127.0.0.1:10031







2,建立相关的目录,也可以不建目录,直接放在postifx目录下面,不过,为了以后维护方便,我还是建了一个目录。

[root@mail ~]# mkdir -p /etc/postfix/plugin

[root@mail ~]# cd /etc/postfix/plugin/



[root@mail plugin]# vi local_recipients

qtyg@ourgame.com local_only1



[root@mail plugin]# vi local_senders

wanglujing@ourgame.com local_only

renlina@ourgame.com    local_only

caiyanyan@ourgame.com  local_only

qinwen@ourgame.com     local_only

shiwanting@ourgame.com  local_only



[root@mail plugin]# vi plugin.list

qtyg@ourgame.com OK



[root@mail npc]# vi plugin.users

wanglujing@ourgame.com OK

renlina@ourgame.com    OK

caiyanyan@ourgame.com  OK

qinwen@ourgame.com     OK

shiwanting@ourgame.com OK





3,利用postmap生成postfix查数据库。

postmap hash:/etc/postfix/plugin/plugin.list

postmap hash:/etc/postfix/plugin/plugin.users

postmap hash:/etc/postfix/plugin/local_senders

postmap hash:/etc/postfix/plugin/local_recipients





4,重载postfix后,邮件服务器正常工作,实现了我们需要的功能。

[root@mail npc]# service postfix reload

重新载入postfix:[确定]







备注:不要忘记第3步,否则服务器会不能收发任何邮件,日志中会有如下提示:

Oct 12 13:55:15 mail postfix/smtpd[875]: fatal: open database /etc/postfix/plugin/recipient_list.db: No such file or directory

Oct 12 13:55:16 mail postfix/master[2266]: warning: process /usr/libexec/postfix/smtpd pid 875 exit status 1

Oct 12 13:55:16 mail postfix/master[2266]: warning: /usr/libexec/postfix/smtpd: bad command startup -- throttling

论坛徽章:
8
综合交流区版块每周发帖之星
日期:2015-12-02 15:03:53数据库技术版块每日发帖之星
日期:2015-10-02 06:20:00IT运维版块每日发帖之星
日期:2015-10-02 06:20:00IT运维版块每日发帖之星
日期:2015-09-14 06:20:00金牛座
日期:2014-10-10 11:23:34CU十二周年纪念徽章
日期:2013-10-24 15:41:34酉鸡
日期:2013-10-19 10:17:1315-16赛季CBA联赛之北京
日期:2017-03-06 15:12:44
16 [报告]
发表于 2010-10-12 18:00 |只看该作者
谢谢

归结起来:也就是2个class,然后限制recipient和sender

论坛徽章:
0
17 [报告]
发表于 2010-10-15 15:13 |只看该作者
非高层发信,收件人两个: qtyg@ourgame.comdef@ourgame.com

以上情况,def@ourgame.com 还能收到此邮件吗?

论坛徽章:
0
18 [报告]
发表于 2011-03-23 10:55 |只看该作者
回复 15# trt2008


local_only是用来限制给外网发邮件的。
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP