简体   繁体   中英

Postfix+Dovecot How do I BCC an email back to the sender?

The end result I'm trying to achieve is that emails sent out should go into the sent box as well. I've tried multiple ways to do this, inspired by various other answers, but none have worked so far.

I'm able to send and receive emails, but they never get BCC'ed.

The relevant config is like this:

postfix master.cf:

submission inet n       -       y       -       -       smtpd
  -o content_filter=smtp-amavis:[127.0.0.1]:10026
  -o smtpd_tls_security_level=encrypt
  -o smtpd_sasl_auth_enable=yes
  -o smtpd_recipient_restrictions=permit_mynetworks,permit_sasl_authenticated,reject
  -o smtpd_sasl_type=dovecot
  -o smtpd_sasl_path=private/auth
  -o sender_bcc_maps=/etc/postfix/sender_bcc

sender_bcc:

person1@example.com person1+sent@example.com

I've set up sieve to filter this into the sent folder, and already confirmed that that part works, but why is nothing getting BCC'ed?

Note: I've also tried, instead of sender_bcc_maps, always_bcc=person1+sent@example.com, but it doesn't work either.

I've (mostly) figured this out. There were a couple things going on.

  1. I had to add the "hash:" before the path of the sender_bcc file.
  2. I forgot to run postmap on the sender_bcc file.
  3. I had to move the directive into the main.cf file, for some reason.

All of this allowed BCC'ing to work. I still have other issues to work out, but they're not related.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM