postfix邮件监控

一。 修改main.cf

vi /etc/postfix/main.cf

添加以下内容:

recipient_bcc_maps = hash:/etc/postfix/recipient_bcc
sender_bcc_maps = hash:/etc/postfix/sender_bcc

二。新建文件

1。 touch /etc/postfix/recipient_bcc

2.    touch /etc/postfix/sender_bcc

三。建立监控邮件

1。 建立接受监控邮件的账户:monitor@163.com

2。 建立被监控的邮件:

      vi  /etc/postfix/recipient_bcc

      wangwu@163.com monitor@163.com

      vi /etc/postfix/sender_bcc

      wangwu@163.com monitor@163.com

四。建map数据库

 1. postmap   /etc/postfix/recipient_bcc

 2. postmap   /etc/postfix/sender_bcc

五。重启服务

service postfix restart

原文地址:https://www.cnblogs.com/derekchen/p/1907607.html