main.cf中与bcc有关的三个设置
参数 | 含义 |
sender_bcc_maps | 通过 postfix 发送出去的邮件 |
recipient_bcc_maps | 通过 postfix 接收到的邮件 |
always_bcc | 通过 postfix 发送和接收的任何邮件。参数是单独的 *一个* 邮件地址 |
注意:
- 如果设置了整个域的 bcc,又为域内的某个用户单独设置了 bcc,则只有域的 bcc 会生效。
- bcc 不支持多个地址,只能是单个地址。
如何设置
如果你的postfix管理着多个邮件域,你希望将所有的进出邮件都转发到一个地址,使用always_bcc进行简单配置就可以了。
编辑/etc/postfix/main.cf,加入
编辑/etc/postfix/main.cf,加入
always_bcc = user@simple.org
如果需要为不同的域设置不同的转发地址,只针对个别用户转发或只需要保存接收信件,则只能使用sender_bcc_maps与recipient_bcc_maps了。
编辑/etc/postfix/main.cf,加入
编辑/etc/postfix/main.cf,加入
sender_bcc_maps = hash:/etc/postfix/sender_bcc_maps recipient_bcc_maps = hash:/etc/postfix/recipient_bcc_maps
然后建立/etc/postfix/sender_bcc_maps与/etc/postfix/recipient_bcc_maps
## 用户## #a@a.org c@c.org #b@b.org c@c.org ## 全域## #@a.org c@c.org #@b.org c@c.org
根据你的需要,设置为全域或者单个用户即可
编辑完成后需要生成hash
db,否则postfix读不到配置文件
postmap hash:/etc/postfix/sender_bcc_maps postmap hash:/etc/postfix/recipient_bcc_maps
最后执行postfix
reload重载配置文件,你的更改就生效了
转载于:https://blog.51cto.com/zhangruirong/387207