Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

We currently run a mail server using Postfix and Amavisd.

A client has asked us to see if we can archive all of their internet email and we had started with using the Postfix always_bcc option.

However, we have come to realize that when emails include BCC's, all of theat information is not proeproly preserved. The always_bcc message only has the TO: and CC: fields.

In our instance, the client mail server uses Postfix for smarthosting and at this point, I'm sure that the BCC information is intact when sent to the Postfix server. The logs will show the email going to the TO:, CC:, and BCC: field all using the same Postfix ID so I'm pretty sure the information is there.

I have recenly been looking at qpsmtpd as another option for capturing this information and trying to see what other otpions I may have for preserving tand archiving the email with the info.

share|improve this question
1  
What I was looking for is to archive the actual email as it passes through the system and also the SMTP commands RCPT TO: and MAIL FROM: that is passed to Postfix. I understand that when a person is a BCC on mail, the sending email server sends each RCPT TO: SMTP command, but the To: and CC: headers never show a Bcc:. No one should know about these. What is shown in the Postfix logs is the RCPT TO: commands that Postfix received. always_bcc does not show the actual RCPT TO: info, only the headers. I have found a way to do this with qpsmtpd and a small change to the content_log plugin. –  Tim Koscielski Aug 27 '09 at 18:49

2 Answers 2

up vote 1 down vote accepted

To clarify, are you asking how to archive the actual email as it passes thru the system, or simply the envelope information that's stored in the logs?

To, BCC, & CC don't really make any difference when you're looking at the envelope information, as it still has to be passed to the remote system to be delivered.

An example:

Aug 27 08:53:14 dhdx421 postfix/pickup[1683]: 23341A2143: uid=500 from=<myname>
Aug 27 08:53:14 dhdx421 postfix/cleanup[1696]: 23341A2143: message-id=<20090827135314.23341A2143@mail-gw-e2.mycompany.com>
Aug 27 08:53:14 dhdx421 postfix/nqmgr[572]: 23341A2143: from=<myname@mail-gw-e2.mycompany.com>, size=388, nrcpt=2 (queue active)
Aug 27 08:53:14 dhdx421 postfix/smtp[1699]: 23341A2143: to=<myname@mycompany.com>, relay=momail.mycompany.cfx[172.18.250.206], delay=0, status=sent (250 2.6.0  <20090827135314.23341A2143@mail-gw-e2.mycompany.com> Queued mail for delivery)
Aug 27 08:53:15 dhdx421 postfix/smtp[1698]: 23341A2143: to=<anothername@gmail.com>, relay=gmail-smtp-in.l.google.com[209.85.210.25], delay=1, status=sent (250 2.0.0 OK 1251381195 33si258728yxe.125)

This email was sent to myname@mycompany.com, and CC'd to anothername@gmail.com. As you can see, they both register as "to=" addresses.

share|improve this answer

Postfix sets the headers X-Delivered-To and Delivered-To with information about the actual RCPT TO recipient, for each delivered copy of the message. Would that be sufficient for you?

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.