How to compress/remove attachments from incoming mail

Add a new rule to the list of rules via the Add button. Name the rule and describe it (Fig. 1.). This rule will be used to remove individual attachments exceeding a specified size range from an incoming message and store them on the server the program is installed on. Moreover, an HTML attachment will be inserted to the incoming message, informing that the attachment was removed and stored under a particular address.

Fig. 1. Adding and describing a new rule.

Go to the Conditions tab and configure the condition as follows: Message direction is incoming (Fig. 2.).

Fig. 2. Setting the condition to Message direction is incoming.

Next, move to the Actions tab and from the list of actions choose Strip/dump attachments (Fig. 3.).

Fig. 3. Adding the Strip/dump attachments action.

Once you add this action, you need to configure it via options available in the right pane. First, define the size range. Expand the context menu under If email contains and choose attachments of a specific size. Then, click the Options button. In the Attachments size configuration wizard that opens, define A size of an attachment is from [value] (Fig. 4.). Leave the to [value] box empty. This way the program will manage only those attachments whose size starts from the specified value but with no end value defined.

Fig. 4. Configuring the attachments' size range.


Note that instead of the size range of individual attachments, you can also configure the program to take into account the cumulative size of all attachments.

Move to the second option and from the context menu choose save these attachments to disk and delete them from the email. Next, click Options and in the window that opens choose a path to the folder where the removed attachments will be stored (Fig. 5.).

Fig. 5. Choosing the folder path where the removed attachments will be stored.


Note that here you can also define the folder's structure and the filename pattern.

Within the last configuration option, choose to insert the notification in the email as an HTML file attachment. Next, click the Options button to design the content of the HTML attachment (Fig. 6.) that will be included in the incoming messages if any of their attachments are removed.

Fig. 6. Designing a template of the HTML file attachment.

Create a second rule including the Compress attachments action. Click + Add, name the rule and describe it (Fig. 7.).

Fig. 7. Creating the second rule.

On the Conditions tab, choose Message direction is incoming (Fig. 8.).

Fig. 8. Setting the condition to Message direction is incoming.

Next, within the Actions tab, expand the list of actions using the Add button and choose Compress attachments. In the right pane of the action, define the value of attachments (in MB) that will be taken into account while compressing files attached to the incoming messages (Fig. 9.). By default, attachments in the ZIP, RAR, gif, jpeg, jpg and png format will not be compressed. To compress all attachments regardless of their file format, select the formats on the list and click Remove. Note that - contrary to other file formats - you cannot include ZIP and RAR files in the compression process.

Fig. 9. Setting the minimal size of attachments that should be compressed.

Save changes in the Administration Panel (Fig. 10.) and you are ready to go.

Fig. 10. Saving the rules in the Administration Panel.

From now on, each message containing attachments of the defined size range will either have them compressed or removed and dumped in the predefined folder. In the case of attachments' removal, the original message will contain an HTML file notifying that the attachments were removed and can be found in the previously specified folder (Fig. 11.).

Exchange Rules Pro - Attachment message example
Fig. 11. A received message that was stripped of attachments and a notification informing about the location where those attachments are stored.

Was this information useful?