{'fraction_non_alphanumeric': 0.016175071360608945, 'fraction_numerical': 0.0, 'mean_word_length': 5.224852071005917, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
A STREAM-BASED MAIL PROXY WITH INTERLEAVED DECOMPRESSION AND VIRUS SCANNING

Anti-virus systems can operate on access gateways for centralized management and early virus blocking. When serving a group of computers, the traditional storagebased mechanism is less scalable because the mail should be stored. This work designs a stream-based mail proxy that processes the mail segment by segment without storing the entire mail and interleaves the MIME parsing, decoding, decompression and virus scanning. We integrate several modified open source packages into the proxy and use the system call select to achieve singleprocess concurrency. The benchmarking reveals this new proxy is seven times faster than the storage-based one on simply forwarding, three times faster on virus scanning, and twice faster on both file decompression and virus scanning. This proxy keeps nearly constant memory consumption and works without disk storage, while the storage-based proxy requires the disk space to be proportional to the number of clients and the mail size.