添加用户发送全员邮件权限
2017-01-17 10:17
351 查看
初始功能开启:以下用到的文件都在/etc/postfix下
1.# vi main.cf
添加下面几行:
#设置只能555@bobo365.com 给allstaff@bobo365.com 发邮件
smtpd_restriction_classes = local_only
local_only = check_sender_access hash:/etc/postfix/local_sender,reject
smtpd_sender_restrictions = check_recipient_accesshash:/etc/postfix/local_recipient
2.#vi local_sender
加入允许群发到all的邮件列表:
555@bobo365.com OK
333@bobo365.com OK
如果允许本域所有用户可以群发到all,则只添加
bobo365.com OK
即可。
3.# vi local_recipient
添加群账号:
allstaff@bobo365.com 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 reload
6.测试:只有在local_sender里的用户才能给allstaff@bobo365.com群发,其他不受影响。——————————————————————–后期增加:1.#vi /etc/postfix/local_sender
加入允许群发到all的邮件列表:
king@bobo365.com OK2.更新数据库# postmap hash:/etc/postfix/local_sender3.重启Postfix
# /etc/init.d/postfix restart 升级篇:(支持多邮件列表) main.cf smtpd_restriction_classes = allow_to_all,allow_to_vm,allow_to_idc
allow_to_all = check_sender_access hash:/etc/postfix/allow_to_all, reject
allow_to_vm = check_sender_access hash:/etc/postfix/allow_to_vm, reject
allow_to_idc = check_sender_access hash:/etc/postfix/allow_to_idc, reject
smtpd_sender_restrictions =check_recipient_access hash:/etc/postfix/limit_sender_group
limit_sender_group allstaff@bobo365.com allow_to_all
wm-all@bobo365.com allow_to_vm
it-idc@bobo365.com allow_to_idc
allow_to_all fei@bobo365.com ok
da@bobo365.com ok
allow_to_vm xu@bobo365.com ok
xin@bobo365.com ok
allow_to_idc jin@bobo365.com ok
生成三个db文件
postmap hash:/etc/postfix/limit_sender_group
postmap hash:/etc/postfix/allow_to_all
postmap hash:/etc/postfix/allow_to_vm
postmap hash:/etc/postfix/allow_to_idc
1.# vi main.cf
添加下面几行:
#设置只能555@bobo365.com 给allstaff@bobo365.com 发邮件
smtpd_restriction_classes = local_only
local_only = check_sender_access hash:/etc/postfix/local_sender,reject
smtpd_sender_restrictions = check_recipient_accesshash:/etc/postfix/local_recipient
2.#vi local_sender
加入允许群发到all的邮件列表:
555@bobo365.com OK
333@bobo365.com OK
如果允许本域所有用户可以群发到all,则只添加
bobo365.com OK
即可。
3.# vi local_recipient
添加群账号:
allstaff@bobo365.com 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 reload
6.测试:只有在local_sender里的用户才能给allstaff@bobo365.com群发,其他不受影响。——————————————————————–后期增加:1.#vi /etc/postfix/local_sender
加入允许群发到all的邮件列表:
king@bobo365.com OK2.更新数据库# postmap hash:/etc/postfix/local_sender3.重启Postfix
# /etc/init.d/postfix restart 升级篇:(支持多邮件列表) main.cf smtpd_restriction_classes = allow_to_all,allow_to_vm,allow_to_idc
allow_to_all = check_sender_access hash:/etc/postfix/allow_to_all, reject
allow_to_vm = check_sender_access hash:/etc/postfix/allow_to_vm, reject
allow_to_idc = check_sender_access hash:/etc/postfix/allow_to_idc, reject
smtpd_sender_restrictions =check_recipient_access hash:/etc/postfix/limit_sender_group
limit_sender_group allstaff@bobo365.com allow_to_all
wm-all@bobo365.com allow_to_vm
it-idc@bobo365.com allow_to_idc
allow_to_all fei@bobo365.com ok
da@bobo365.com ok
allow_to_vm xu@bobo365.com ok
xin@bobo365.com ok
allow_to_idc jin@bobo365.com ok
生成三个db文件
postmap hash:/etc/postfix/limit_sender_group
postmap hash:/etc/postfix/allow_to_all
postmap hash:/etc/postfix/allow_to_vm
postmap hash:/etc/postfix/allow_to_idc
相关文章推荐
- Zimbra用户对群组发送邮件的权限设置
- python 实例7 为rhel添加系统用户与登录密码,并给root 发送邮件
- 为用户添加了被删用户的smtp地址,作为备用smtp地址之后发送邮件不可达
- Event Handler的开发与部署--扩展练习:上传文档后,指定用户,添加发送邮件通知操作
- 使用c#给outlook添加任务、发送邮件
- 向mysql添加新用户并分配权限
- 四.用户管理页面(显示所有的用户信息,同时为用户的添加,编辑,修改密码,删除,修改权限等功能提供相应的链接) UserMange.aspx
- 在Exchange Server 2003 如何防止用户发送或接收 Internet 邮件
- 批量添加JS脚本,像126发送邮件时的上传附件,可以自由增,减
- Oracle 存储过程中发送邮件,并支持用户验证、中文标题和内容
- 向mysql添加新用户并分配权限
- 购物网站20:用户/顾客action----用户列表---用户退出---用户管理---用户登录---用户注册---修改密码---发送邮件
- Exchange 2003允许部分用户发送邮件到部分外网服务器
- SQLServer2005 添加用户,及操作权限
- Postfix限制部分用户发送和接收外部邮件
- Oracle 存储过程中发送邮件,并支持用户验证、中文标题和内容
- Linux添加管理员权限用户 进程命令
- 没有向此收件人发送邮件的权限,请与系统管理员联系获取帮助.
- linux 下添加root 权限的用户
- 如何只给管理员添加和删除用户权限