Jump to: navigation, search

How to setup email archiving for cpanel

Interested in archiving CPanel mails on Vaultastic?

Setup email archiving for CPanel

Vaultastic is the easiest - most secure email archiving solution yet! Vaultastic provides archiving for Office 365, Google Apps, Exchange Online, MS Exchange, Zimbra, Mdaemon and other email solutions. Vaultastic helps your business with all eDiscovery, Compliance and Business Continuity needs. Refer the presentation to know How Vaultastic works?

Steps to setup email archiving for CPanel

Step 1. Provision your domain and users on Vaultastic
Provision your domain on Vaultastic. As an admin of the Vautastic domain, you can provision all/ required users on Vaultastic and allow them to access their account. By default, users provisioned on Vaultastic are not allowed to access their account.

Step 2. Configure your CPanel domain to add a mail route for the Vaultastic server
To enable the email archival setting for users of the CPanel domain, you need to configure a SMTP connector for Vaultastic server. This SMTP connector will be used to route mail from CPanel to Vaultastic.

Step 3. Configure forwarding rules to journal email messages sent from and received to all/selected users of CPanel domain
To archive mail from your primary email domain hosted on CPanel, the mail forwarding feature of CPanel is used. This forwards a copy of mail from the primary email server to the Vaultastic servers.

You can configure forwarding rules to journal email messages sent or received by all/ selected users of your CPanel domain as required.

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.
As an admin of the Vautastic domain, you can provision all/ required users on Vaultastic and allow them to access their account. By default, users provisioned on Vaultastic are not allowed to access their account.


Step 2: Setup Mail Routing

Configure a SMTP connector for the Vaultastic server on your CPanel domain to enable email archiving. This SMTP connector will be used to route mail from CPanel to Vaultastic.
To setup the mail route, you need to configure PREROUTER settings from the Exim Configuration Manager interface of CPanel.

1. Login to WEB HOST MANAGER using valid credentials.

Vaultastic CPanel Login.png

2. From the left panel search box, search for exim. This will navigate you to the Exim Configuration Manager section quickly.

Vaultastic CPanel Search Exim Configuration.png

3. Click the Exim Configuration Manager button.

Vaultastic CPanel View Wxim Configuration.png

4. Select the Advanced Editor tab.

Vaultastic CPanel Exim Advanced Editor.png

5. Locate the PREROUTERS section. To locate the section quickly, press the keys Ctrl + f and search for the string prerouters.

Vaultastic CPanel Exim Search Prerouters.png

6. Enter the following lines in the text-box

send_via_VAULTASTIC:
driver = manualroute
domains = *.vaultastic.com
transport = remote_smtp
route_list = * cpanel.vaultastic.com::25 byname
host_find_failed = defer

Vaultastic CPanel Update Prerouters.png

7. Scroll down and click the Save button.

Vaultastic CPanel Save Prerouters.png

This will restart the Exim server.

Vaultastic CPanel Exim Restarts1.png


Step 3: Enable Journaling for selected users of your Organization

To configure forwarding, you need to login to the Exim server using SSH. It is required to configure the following filters to archive mail on Vaultastic.

i. Filter to forward a copy of received mail to archive account
ii. Filter to forward a copy of sent mail to archive account

i. Create a filter to forward a copy of received mail to archive account

To configure a filter to forward a copy of received mail, you need to create a file /etc/valiases/<domain name>. This file will contain the rule for forwarding a copy of received mail to Vaultastic.

For example, to configure the filter to forward all received mail on the domain baya.in to its corresponding Vaultastic domain, create a file /etc/valiases/baya.in

  • Open the file /etc/valiases/<domain name> in vi editor
vi /etc/valiases/<domain name>

For example,

vi /etc/valiases/baya.in
  • Add all the user ids as per the format mentioned below
<userid>@<domainname>: <userid>@<domainprefix>.vaultastic.com

For example,
To forward mail received from users amit and deepa on the baya.in domain, add lines mentioned below

[email protected]: [email protected]
[email protected]: [email protected]
  • Save the file

Vaultastic for CPanel selected users receiving rule.png

ii. Create a filter to forward a copy of sent mail to archive account

To configure a filter to forward a copy of sent mail, you need to create a file /etc/cpanel_exim_system_filter2. This file will contain the rule for forwarding all sent mail to Vaultastic.

Once the file is created, you need to set this fie to the Systems Filter from the Web Host Manager interface.

A. Create the cpanel_exim_system_filter2 file

  • Login to the server using ssh
  • Make a copy of the System Filter file using the command mentioned below
cp /etc/cpanel_exim_system_filter /etc/cpanel_exim_system_filter2
  • Open the System Filter file in the vi editor
vi /etc/cpanel_exim_system_filter2
  • Add user details for whom you want to enable archiving in the format mentioned below
if $sender_address: contains "<userid>@<domainname>"
then
unseen deliver "[email protected]<domainprefix>.vaultastic.com"
endif

For Example:
If you need to enable archiving for the users amit and deepa' on the baya.in domain, enter the following lines in the filter file.

if $sender_address: contains "[email protected]"
then
unseen deliver "[email protected]"
endif
if $sender_address: contains "[email protected]"
then
unseen deliver "[email protected]"
endif
  • Save the file

Vaultastic for CPanel selected users sending rule.png

B. Set the System Filter file from WHM interface

Set the System Filter file to /etc/cpanel_exim_system_filter2

1. Login to WEB HOST MANAGER using valid credentials.

Vaultastic CPanel Login.png

2. From the left panel search box, search for exim. This will navigate you to the Exim Configuration Manager section quickly.

Vaultastic CPanel Search Exim Configuration.png

3. Click the Exim Configuration Manager button.

Vaultastic CPanel View Wxim Configuration.png

4. Select the Basic Editor tab

5. Locate the System Filter File section

6. Select the Edit option and paste the string as mentioned below

/etc/cpanel_exim_system_filter2

Vaultastic CPanel Exim Basic Editor.png

7. Scroll down and click the Save button.

Vaultastic CPanel Exim Save Basic Settings.png

This will update the settings and restart the Exim server.

Vaultastic CPanel Exim Restarts2.png