postfix限制本域用户可以群发到all邮箱

最近恶意广告邮件猜对了公司的群发邮件账号 [email protected]

于是拼命向这个账号发邮件,公司内部收到的垃圾邮件一大堆。

于是上网查了 postfix 群发邮件的认证方式:

 

以下用到的文件都在/etc/postfix下

1.# vi main.cf

添加下面几行:

#设置只能[email protected][email protected] 发邮件
smtpd_restriction_classes = local_only
local_only = check_sender_access hash:/etc/postfix/local_sender, reject
smtpd_sender_restrictions = check_recipient_access hash:/etc/postfix/local_recipient

2.#vi local_sender

加入允许群发到all的邮件列表:

[email protected]   OK
[email protected]   OK

如果允许本域所有用户可以群发到all,则只添加

kin.com  OK

即可。

3.# vi local_recipient
  添加群账号:

[email protected]    local_only

4.建立local_recipient和local_sender的hash表

#  postmap hash:/etc/postfix/local_sender

#  postmap hash:/etc/postfix/local_recipient 

在/etc/postfix目录下生成2个db文件:

local_recipient.db和local_sender.db

5.重启Postfix

# /etc/init.d/postfix restart

6.测试:只有在local_sender里的用户才能给[email protected]群发,其他不受影响。

参考:http://www.extmail.org/forum/viewthread.php?tid=524

 

本文来自CSDN博客,转载请标明出处:http://blog.csdn.net/xuyaqun/archive/2010/04/28/5538309.aspx

你可能感兴趣的:(postfix限制本域用户可以群发到all邮箱)