Jump to: navigation, search

How to setup email archiving for postfix

Interested in archiving Postfix mails on Vaultastic?

Setup email archiving for Postfix

Step 1: Create a Vaultastic domain

1. Visit Vaultastic.com and choose your plan.
2. Sign up for the free trial.

3. On successful Vaultastic domain creation, you will receive an email with the login details on the email id given during the domain creation.


Step 2: Allow SMTP connection on Vaultastic

To enable direct mail delivery from your Postfix server to Vaultastic, you need to share the hostname or IP address of the outgoing SMTP server with the Vaultastic team.

Send a mail to [email protected] with the primary domain name and IP address or Hostname of the outgoing SMTP server

Note: Before changing the outgoing SMTP server or hostname, please inform the Vaultastic team to update the connector. Failing to do so will result in Vaultastic bouncing the mail.

Step 3: Enable Journaling for all users of your domain

Assume the Postfix configuration files are in /etc/postfix.

cd /etc/postfix

Edit main.cf – search for always_bcc and include the following line:

1. In main.cf

# Add the following lines 
sender_bcc_maps=pcre:/etc/postfix/sender_bcc_map recipient_bcc_maps=pcre:/etc/postfix/recipient_bcc_map

2. In /etc/postfix/sender_bcc_map

# Add line for each domain archiving to vaultastic
# replace . (dot) in domain name with \. (slash dot)
# For example domain acmecorp.com:  /^(.*)@acmecorp\.com$/     [email protected] 
/^(.*)@<domainname>$/ [email protected]<domainprefix>.vaultastic.com

3. In /etc/postfix/recipient_bcc_map

# Add line for each domain archiving to vaultastic
# replace . (dot) in domain name with \. (slash dot)
# For example domain acmecorp.com: /^(.*)@acmecorp\.com$/     [email protected]  
/^(.*)@<domainname>$/ [email protected]<domainprefix>.vaultastic.com

4. Configure Transports

  • Edit transport

add the following line before all the routes

<domainprefix>.vaultastic.com    smtp:in.vaultastic.com:25
For example domain acmecorp.com:  
acmecorp.vaultastic.com smtp:in.vaultastic.com:25
  • Save transport file
postmap /etc/postfix/transport

5. Reload postfix

/etc/init.d/postfix reload