[postfix]转发邮件设置

http://stackoverflow.com/questions/22537523/postfix-recipient-bcc-maps-multiple-recipients-how-to

http://blog.csdn.net/ayumiwang/article/details/8810077

基本配置:

1.编辑主配置文件,加入如下内容
 vi /etc/postfix/main.cf

recipient_bcc_maps = hash:/etc/postfix/recipient_bcc_maps //收邮件
sender_bcc_maps = hash:/etc/postfix/sender_bcc_maps //发邮件
# always_bcc //监控所有用户,所有用户的邮件都会转发到bb的邮箱

2.编辑recipient_bcc_maps
# vi /etc/postfix/recipient_bcc_maps
# vi /etc/postfix/sender_bcc_maps

加入如下内容
aa@test.com bb@test.com  //aa@test.com 是被监控的人  bb@test.com是收邮件的人  ,中间要用tab键隔开

3.编辑完后需要执行 postmap:
# postmap hash:/etc/postfix/sender_bcc_maps
# postmap hash:/etc/postfix/recipient_bcc_maps 4.将 Postfix reload 后即可生效:
# postfix reload

 

问题,如果要设多个收件人怎么办,按照上面方法无法成功:

 

source@domain.tld    rcpt1@domain.tld,rcpt2.domain.tld,rcpt3@domain.tld
is not possible. But The BCC address is subject to virtual alias expansion (and aliases(5) expansion for any resulting local recipients). So

#/etc/postfix/main.cf
#...
virtual_alias_maps = hash:/etc/postfix/vmaps
#...

#/etc/postfix/recipient_bcc_maps
source@domain.tld    rcpt@domain.tld


#/etc/postfix/vmaps
rcpt@domain.tld    rcpt1@domain.tld,rcpt2.domain.tld,rcpt3@domain.tld

 

posted @ 2014-12-04 14:07  silence.li  阅读(846)  评论(0编辑  收藏  举报