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

305 views Asked by At

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:

[email protected] [email protected]

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, [email protected], but it doesn't work either.

1

There are 1 answers

0
Axle12693 On

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.