以下用到的文件都在/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