Email Tutorials - Herong's Tutorial Examples - v1.03, by Herong Yang
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/main.cf 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: <herong@example.com> X-Original-To: archive@herongyang.com Delivered-To: archive@herongyang.com Received: from (unknown [192.168.1.11]) by mail.herongyang.com (Postfix) with ESMTPS id EF4B9266002F ...
Cool. All emails will be duplicated and archived in a single mailbox.
Table of Contents
►Postfix - Mail Transport Agent (MTA)
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)