Using Anti-Virus with Mail Express

If you are using an anti-virus (AV) application with Mail Express, you should add an exclusion to the AV application to skip files with a "gsb" extension.

Most AV applications have some kind of “real-time” scan feature that scans files when they are accessed. Their user interface allows you to specify to “scan files” when writing to disk, when reading from disk, on network drives, and/or opened for backup. When AV applications detect an issue, they may clean it, delete it, or quarantine it. To Mail Express, the file will simply disappear (it will appear to be deleted by an agent other than Mail Express).

The AV applications try to be smart about when they “scan” a file; once they have scanned it, they do not re-scan it on access unless it has been changed. For example, the first time a file is read by an application, the AV application will scan it. If it is subsequently read, the AV applications will not rescan, because the file has not changed.

One of the problems AV applications have with Mail Express is that it writes to the file many times during the transfer process. AV applications see every write as a change, which triggers a re-scan. Performance can be affected dramatically, especially if the file has attributes that cause the AV applications to give it special attention.

Mail Express version 3.1 applies an extension to files that are "in-progress" to provide a signal to AV applications to not scan them. When Mail Express writes to a file, it adds a "gsb" extension. When Mail Express finishes transferring the file, it removes the extension and then triggers the AV application by tweaking the first byte of the file (Mail Express reads and then re-writes the first byte). Therefore, the network administrator should add an exclusion to the AV application to skip files with a "gsb" extension.  

The network administrator should also add an exclusion for temporary files uploaded from Mail Express's web portals. For example, if Mail Express were installed in C:\Program Files\Globalscape\Mail Express, then the folder for temporary files is C:\Program Files\Globalscape\Mail Express\temp. Temporary upload files to this folder will have the pattern “upload_###.tmp” where “###” is a unique identifier; this folder is generally used by all components of Mail Express when a temporary file is created.

These files will still be scanned by AV applications, but only after they have arrived at the Mail Express data folder. For larger files uploaded from the drop-off page, they will be temporarily staged in the "tmpdir"; without this exclusion, the AV application will delete the file from the "tmpdir" and the upload will fail with an error message which will be routed back to the client’s browser.