Knowledge Base

How to save stripped off attachments from emails to the network location


You cannot dump stripped e-mail attachments onto a network drive. In the log files you find entries similar to this:

Error: Access to the path '\\ENV111-W81-1\Deployment\Administrator@domain111.lab' is denied. Failed to save attachment to disk: \\ENV111-W81-1\Deployment\Administrator@domain111.lab\1.txt module: CommonLanguageRuntimeLibrary


There are some additional settings to be added in the network drive folder permissions. Please follow these steps to ensure that the attachments are saved correctly:

  1. First of all please make sure you use network paths e.g. \\mypath\target-folder\ and not paths on mapped drives e.g. M:\mypath\target-folder as mapped drives may not work.
  2. In the security tab of the desired folder properties add a user NETWORK SERVICE and enable Full control permissions.
    1. Right click on the desired folder.
    2. Go to Security tab.
    3. Click Edit.
    4. Click Add.
    5. Start typing "Network".
    6. Click Check Names to resolve users names.
    7. Choose NETWORK SERVICE.
    8. Click OK to confirm
    9. Select NETWORK SERVICE on the list of users of the folder in the Security tab.
    10. Tick the box by "Full Control".
    11. Apply changes.
    12. Click OK to confirm and close the window.
  3. Do the same procedure as described in step 2. but for the  SYSTEM account, the User account which is used for configuring CodeTwo Exchange Rules Pro (in my case it was the Administrator) and the Computer account for the server which has our software installed. 
    1. To add the computer account for the server, please access the Object Types Window and check the Computers checkbox, click this link to see a screenshot of the setup.
    2. After the above step has been completed you can start typing the server's name similar to point 5. from the previous step.
    3. Add the SYSTEM account and the User account in a similar way as the NETWORK SERVICE account.
  4. The result of the security tab of the folder properties should look like this:
Fig. 1. Security tab of the network folder properties.

Was this information useful?