Archive Emails using "always_bcc" Setting in Postfix

This section provides a tutorial example on how to duplicate and archive emails using the 'always_bcc' configuration setting in Postfix.

In certain situations, you may want keep a copy of each and every email that comes to your email server for archiving purposes. Here is how you can do it using the "always_bcc" setting.

1. Create user "archive" as the BCC mailbox owner.

herong$ sudo adduser archive

herong$ sudo passwd archive

2. Turn on "always_bcc" configuration setting.

herong$ sudo vi /etc/postfix/
  always_bcc = archive

herong$ sudo systemctl restart postfix

3. Send a test email to the SMTP service.

4. Look at "archive" mailbox. I see a copy of the email.

herong$ sudo cat /home/archive/Maildir/new/1606200348.Vfd02I202e0e1M6...
Return-Path: <>
Received: from (unknown [])
  by (Postfix) with ESMTPS id EF4B9266002F


Cool. All emails will be duplicated and archived in a single mailbox.

Table of Contents

 About This Book

 Introduction to Email

Postfix - Mail Transport Agent (MTA)

 What Is Postfix

 Install and Configure Postfix on CentOS

 Test Postfix Server with "telnet" Client

 SMTP Submission Service on Port 587 in Postfix

Archive Emails using "always_bcc" Setting in Postfix

 Move /var/spool/postfix to New Location

 "postconf" Command to Manage Postfix Configuration

 Turn on Postfix Server Logging for Troubleshooting

 SSL/TLS Secure Connections with Postfix Server

 Dovecot - IMAP and POP3 Server

 SSL/TLS Secure Connections with Dovecot Server

 Email Client Tools - Mail User Agents (MUA)

 Mozilla Thunderbird - Mail User Agents (MUA)

 PHPMailer - PHP Package for Sending Emails

 Email Message Format and Headers


 Full Version in PDF/EPUB