Posted by Josh, Last modified by on 07 December 2010 03:40 PM
|Using SmartAttach in WebClient and other email clients (IceWarp 10)
SmartAttach can be used to minimize the load on a server by reducing the volume of data sent by users as email attachments. For example, a user sends an email with a large attachment to a mailing list with many recipients, e.g. a 10MB attachment to 100 users. When the attachment is sent the standard way, your server has to process 1GB of data, putting a high load on the server; connection speed may also be affected.
SmartAttach minimizes resource use; when a user sends the same email (a 10MB attachment to 100 users), the server sends the message and a link to the attachment rather than the entire file, so the load on the the server and the internet connection is reduced to a few KBs instead of 1GB. The recipient may download the attachment by clicking on the link in the message. This minimizes the load on the server storing the attachments and conserves bandwidth by distributing it over a longer time period. Using SmartAttach can also prevent email from being rejected by a server due to limits on attachment size.
Using SmartAttach, files are stored locally on your server, not copied to each recipient during sending, reducing the amount of disk storage used. When a user sends a message to local users, the attached file is not copied to each user’s inbox folder, but remains in the sender’s upload folder only. In our example, all recipients are local, and only 10MB of disk space is used, not 1GB as with a standard attachment.
How to use SmartAttach in WebClient
In WebClient a user selects the option to send a traditional attachment or to use SmartAttach when sending a message via a pulldown menu located on the left side of the message window, below the Subject line.
The default option is standard attachment; to set the default to SmartAttach, navigate to Tools > Administrator (or Domain) options > mail tab > default tab when logged in as a Domain or global Administrator.
How to use SmartAttach in other email clients
You can also use SmartAttach for users who are not using the IceWarp desktop client or WebClient. To begin, create a new content filter:
In this example, SmartAttach is applied to all messages which contain an attachment.
Click on SmartAttach to specify the user that you want to apply this rule to, then enter the appropriate user account or press the browse button to select a user.
After pressing the browse button (…) select a domain from the drop down menu, then an account type (single user account, group etc).
For example: select domain: a.com, account type: user and user firstname.lastname@example.org. You can select user by double clicking on this address on the list or by clicking on the user‘s address and pressing the Select Account button.
IceWarp Server will automatically select the default Files folder. If you want to specify a different folder, press the browse button (…) and select a folder.
Please note that if you want to select a different folder, that folder must exist. If you enter an invalid folder name, the files will be stored in the default Files folder. To save the files in another folder, create the folder in WebClient and then select it here.
Once the specified user (and folder) has been setup, SmartAttach will be performed for all messages with attachments. However, uploaded files will never expire and must be deleted manually. The recipient must also know his/her webdav login credentials to download the attachment.
As a workaround, you may set an expiration date for the uploaded file, on which the file will be deleted automatically. Select anonymous access so that the recipient can access the file without knowing the sender’s credentials. You can also use authentication only for messages delivered locally. The recipient will need at least read access rights to the Files folder where the attachment is stored. This will be important when the sender shares the Files folder to a local group or users and then sends an attachment which is stored in this shared folder. If the recipient wants to download this file,he will have to first authenticate with his credentials.
Smartattach text customization
All messages sent using SmartAttach include a predefined text header and footer.
The header/footer can be customized:
General header - applied to all SmartAttach messages.
The easiest way to customize the general header/ footer is to copy any files named smartattach* from <install_directory>/examples/ to <install_directory>/config/ (be careful with content in these files that contains <tags> and %variables% since this is where you customize the content)
If you would like to include any hyperlinks with your message text, copy the content of your header files to your footer files.
NOTE – Don’t forget to remove all commented lines from smartattach.dat and any other files! Customization will not work if your files contain any commented lines; even the configuration lines are not commented.
This is same message as the in our first example above, but with a customized general header/footer. The text from the header file is copied to the footer file and edited so that the link appears under the text. You could also keep one of the files empty for a blank header or footer.
NOTE – If neither the header nor the footer contains the mandatory template tags, then the default one is appended
Custom header per user or domain
You can also customize the header/footer on a per user basis. To add a custom header/ footer, create new files and copy the contents of files with filenames of smartattach* in /examples/ to the appropriate files and customize them.
Be sure to specify both options (text and html files). If you specify only one file (e.g. an html file) for the header/footer it will be added only to html messages, but not in the case of someone sending a message as text and vice versa. If you specify both files, the header/footer will be added whether messages sent are in text or html format.
When user email@example.com sends a message with an attachment, the content filter is applied. Instead of an attachment, the message contains only a link to the file, with header c_at_a_header.* and footer c_at_a_footer.* (html or txt according to message type) appended to message.