简体   繁体   English

Postfix+Dovecot 如何将 email 密件抄送回发件人?

[英]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.我试图达到的最终结果是发送出去的电子邮件也应该 go 进入发件箱。 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:后缀 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.注意:我也尝试过,always_bcc=person1+sent@example.com,而不是 sender_bcc_maps,但它也不起作用。

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.我必须在 sender_bcc 文件的路径之前添加“hash:”。
  2. I forgot to run postmap on the sender_bcc file.我忘了在 sender_bcc 文件上运行 postmap。
  3. I had to move the directive into the main.cf file, for some reason.出于某种原因,我不得不将该指令移动到 main.cf 文件中。

All of this allowed BCC'ing to work.所有这些都让 BCC'ing 得以发挥作用。 I still have other issues to work out, but they're not related.我还有其他问题需要解决,但它们并不相关。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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