Knowledge Base

Strip / dump attachments - notifying recipient of removed attachments.

Problem:

How to save files attached to messages directly onto a hard drive and notify a recipient of removed attachments.

Solution:

One of the useful features CodeTwo Exchange Rules PRO offers is Strip/dump attachments action. It allows saving attachments from messages directly onto a hard drive. This feature lets administrators make sure that unwanted attachments are removed from messages before they reach the destination. Also, mailboxes can be significantly slimmed down as attachments are saved to a hard drive and can be accessed via UNC path.

The Strip/dump attachments feature is presented in this User’s Manual article. The article below shows how to configure the feature to remove and save attachments onto a location on a hard drive, and dynamically insert its path into the email.

Let’s start with creating new rule in the Administration module of CodeTwo Exchange Rules PRO. The sample one below is named Remove attachments.

517
Fig. 1. New sample rule Remove attachments.

In the Conditions tab, select Attachment filter so the program looks for messages containing attachments. In the right pane with action properties, you can choose attachments that will trigger the action. In our sample rule, all emails containing at least one attachment will be processed. It is also possible to add other criteria, as required.

518
Fig. 2. Conditions of the sample rule.

Proceed to the Actions tab now. Select the Strip/dump attachment action that will be triggered when an email meets the previously defined condition.

519
Fig. 3. Actions tab of the sample rule.

The Strip/dump attachments action can be adjusted using the specified criteria on the right.

522
Fig. 4. Specific settings for sample action.

The Attachment scope is set to process all attachments from emails. The Action is set for the application to remove attachments and save them to a hard drive. By clicking the Options button, you can define the folder, where the attachments will be saved – in this scenario the location is Attachments folder in a shared location.

524
Fig. 5. A shared folder selected for dumped attachments.

The last option – Notify recipient - defines how the recipient of the message notified that the attachments have been removed from the email. The image below presents the possible options.

525
Fig. 6. Selecting a way of notifying recipients of dumped attachments.

In this scenario, the notification is entered to the message header. Now, let’s make CodeTwo Exchange Rules PRO inform the recipient where the attachments were dumped. In order to do that, you need to click the Options button, which opens the Template Editor.

527
Fig. 7. A sample notification in Template Editor.

A sample notification has already been defined. It gives the location of the removed attachments. In order to have the location inserted dynamically, you need to select placeholder “Attachment filenames” from Dynamic Field / Message Attachments menu. Now, it necessary to define the placeholder. Highlight it, and select the required option in the window on the right. In this scenario, the “Only path” option will display the attachments location in the notification, however other options are also possible.

200-8
Fig. 8. Attachment filenames placeholder's settings.

By default, the notification will be added to HTML – formatted emails. You can also convert the header to RTF and Plain Text format, using the Convert feature of the Template Editor.
After all settings have been defined, it’s necessary to save them, both in the Template Editor, as well as the main Administration window. Otherwise, changes will not be applied.
Let’s see the result now.  An email, containing files attached, is sent from one user – Kelly – to another – Bob. This is what Kelly is sending:

200-9
Fig. 9. A sample email containing attachments.

After the message is processed by CodeTwo Exchange Rules PRO, and the attachments are removed and saved, this is what Bob receives:

200-10
Fig. 10. Email processed by CodeTwo Exchange Rules PRO.

As presented, the email has been stripped of the attached files, and notification with the files’ location has appeared at the top of the message.

The scenario above is only one of available for Strip/dump attachments action. Try modifying the presented settings to achieve more advanced results.

Was this information useful?