Attachment Linking

Attachment Linking (Setup » Web & IM Services » Attachment Linking) is a feature that makes it possible for MDaemon to remove all attachments from incoming email messages, store them in a designated location, and then place URL links to the files in each message from which they are extracted. The recipients can then click those links to download the files. This can greatly speed up mail processing when your users retrieve their messages or synchronize their mail folders, since the messages will be devoid of large attachments. It can also provide increased security and an increased level of protection for your users, because attachments can be stored in a central location for monitoring by the administrator and will not be downloaded automatically to mail clients where they might be executed automatically. Further, if you choose the "Let Webmail automatically manage Attachment Linking" option, management of the file locations and the Webmail URL is handled automatically. If you choose to manage Attachment Linking manually, you can specify the location where the files will be stored, and you can use special macros to make the location dynamic. In order for Attachment Linking to work, it must be enabled globally using the option on this screen, and each Account that you wish to use it must be configured specifically to do so on the Attachments screen of the Account Editor. On that same screen there is also an option for applying Attachment Linking to outbound messages as well; the account's outbound messages will have attachments extracted and replaced with a link to the stored files. Finally, the links to the attachments that MDaemon will place in messages do not contain direct file paths. Instead they contain a unique identifier (GUID) that the server uses to map the file to the actual path. This GUID map is stored in the AttachmentLinking.dat file.

Attachment Linking will try to use the file name provided in the MIME headers (if present). If the file name is longer than 50 characters then only the last 50 characters will be used. If the file name is missing an extension, ".att" will be appended.

By default, the Attachment Linking feature places the text, "MDaemon replaced the following files with these links:" into certain emails. If you wish to change that text, add the following key to your MDaemon.ini file, located in the \app\ folder, then restart MDaemon:

HeaderText=This Is My Text.

Enable attachment linking

Click this checkbox to enable Attachment Linking for all accounts that are specifically configured to use it on the Attachments screen of the Account Editor. When you enable this global option you will be asked if you also wish to enable the account specific option for all MDaemon accounts. If you choose "Yes" then Attachment Linking will be enabled for all accounts, and the corresponding option on the New Accounts template will also be enabled. If you choose "No" then the Attachment Linking feature will be enabled but the account specific option will not—you must manually activate it for each account that you wish to use it. When Attachment Linking is enabled, the Webmail server must remain active.

Let Webmail automatically manage Attachment Linking

This is the default option when Attachment Linking is enabled. Use this option if you wish to let Webmail handle Attachment Linking automatically. Extracted files will be stored at: "...\MDaemon\Attachments\$DOMAIN$\$MAILBOX$\".

Manually configure Attachment Linking

Choose this option if you wish to designate the folder in which extracted file attachments will be stored. You must designate both the attachment path and the Webmail URL when you choose this option.

Attachment path

Use this text box to designate the folder in which to store extracted file attachments. You can set a static file path or use template and script macros to make the path dynamic. For example, "$ROOTDIR$\Attachments\$DOMAIN$\" will group all attachments into a subfolder named for the domain to which the user belongs, which is under another subfolder called "Attachments" contained in MDaemon's root folder (usually C:\MDaemon\). So, for "" the above example would cause the extracted attachments to be placed in the subfolder, "C:\MDaemon\Attachments\\." You could further subdivide attachment storage by appending the "$MAILBOX$" template macro to the above example. This would cause  user1's files to be stored in a subfolder beneath "\\" called "user1." Therefore the new file path would be: "C:\MDaemon\Attachments\\user1\."

Webmail URL

Enter Webmail's URL here (e.g. ""). MDaemon will use this URL when inserting the links to extracted attachments in messages.

Ignore attachments smaller than this many KB (0 = none)

This is the minimum size required before an attachment will be extracted from a message. Use this option if you do not wish to extract smaller attachments. If set to "0" then Attachment Linking will extract all attachments, no matter how small.

Delete attachments older than this many days (0 = never)

Use this option if you wish to set a limit on the number of days that attachments will be stored. As part of the daily cleanup event MDaemon will remove any stored attachments that are older than the designated limit, if those attachments are contained within the default attachment folder or one of its subfolders. The default folder is: "<MDaemonRoot>\Attachments\...". Attachments will not be removed if you customize the attachment folder to point elsewhere. This option is disabled by default (set to "0").  

Delete attachments from disk when messages are deleted

Click this option if you want to delete extracted attachments from the server whenever the messages to which they are linked are deleted.

When this option is enabled and a user collects his email via a POP3 client that is not configured to leave messages on the server, then all of his extracted attachments will be irretrievably lost. If this option is not enabled then no attachments will be lost, but a great deal of your hard drive space could eventually be taken up by outdated and useless files that their original recipient no longer wants or needs. Virtually all POP clients have the ability to leave messages on the server.

Extract quoted printable “text/plain” attachments

By default, quoted printable text/plain attachments will not be extracted. Click this checkbox if you wish to include them in automatic extraction.

White List

Click this button to open the Attachment Linking white list. Include any file names that you do not wish to extract from messages. Winmail.dat is included on this list by default.