Skip to main content
QUICK REVIEW

[Paper Review] EMFET: E-mail Features Extraction Tool

Wadi’ Hijawi, Hossam Faris|arXiv (Cornell University)|Jan 1, 2017
Authorship Attribution and ProfilingComputer Science4 references5 citations
TL;DR

EMFET is an open-source, extensible tool for extracting 140 email features—categorized into header, payload (body), and attachment features—from EML-formatted email corpora. It enables researchers to build high-quality datasets for training machine learning models in spam detection by automating feature extraction via a user-friendly interface and modular code structure using .NET and external libraries like Stanford.NLP and HTML Agility Pack.

ABSTRACT

EMFET is an open source and flexible tool that can be used to extract a large number of features from any email corpus with emails saved in EML format. The extracted features can be categorized into three main groups: header features, payload (body) features, and attachment features. The purpose of the tool is to help practitioners and researchers to build datasets that can be used for training machine learning models for spam detection. So far, 140 features can be extracted using EMFET. EMFET is extensible and easy to use. The source code of EMFET is publicly available at GitHub (https://github.com/WadeaHijjawi/EmailFeaturesExtraction)

Motivation & Objective

  • To address the lack of flexible, open-source tools for extracting comprehensive email features from EML-formatted corpora.
  • To support researchers in building high-quality, standardized datasets for training machine learning models in spam detection.
  • To provide a modular, extensible framework that allows easy addition of new features through a plug-in-like interface.
  • To streamline the preprocessing pipeline for email spam detection by automating feature extraction from raw email data.
  • To enhance reproducibility and interoperability in email spam research by standardizing feature extraction across public email datasets.

Proposed method

  • The tool parses EML files using the Microsoft CDO for Windows 2000 COM library to extract email components (From, To, Subject, Body, etc.).
  • A tab-based GUI allows users to select specific features from three categories: header, payload/body, and attachment features.
  • Selected features are extracted using dedicated procedures linked to unique tags in a controller class, enabling modularity and extensibility.
  • External libraries such as HTML Agility Pack, Stanford.NLP.CoreNLP, and LINQ are used to process HTML content, perform NLP tasks, and query structured data.
  • Extracted features are saved in CSV format, with error logs generated for any malformed or unreadable emails.
  • The implementation is structured around a main class with separate initialization for variables, packages, and email objects, ensuring maintainability and scalability.

Experimental results

Research questions

  • RQ1Can a flexible, open-source tool be designed to extract a comprehensive set of features from EML-formatted email corpora for spam detection research?
  • RQ2How effective is the modular architecture of EMFET in enabling extensibility for adding new features without major code rewrites?
  • RQ3To what extent does EMFET support interoperability with major public email spam datasets such as SpamAssassin, CSDMC2010, and Ling-Spam?
  • RQ4What is the impact of feature diversity (header, body, attachment) on the quality and utility of datasets for training machine learning models in spam detection?
  • RQ5How does EMFET’s use of external libraries (e.g., Stanford.NLP, HTML Agility Pack) improve the accuracy and efficiency of feature extraction?

Key findings

  • EMFET successfully extracts 140 distinct features from EML-formatted emails, distributed across 49 header, 89 payload/body, and 2 attachment features.
  • The tool supports integration with major public email corpora such as SpamAssassin, CSDMC2010, and Ling-Spam, all of which are available in EML format.
  • The modular design allows for easy extension: new features can be added by creating a new checkbox, defining a unique tag, and linking it to a new extraction procedure.
  • The use of external libraries like Stanford.NLP and HTML Agility Pack significantly reduces code complexity and improves parsing accuracy for text and HTML content.
  • The tool generates structured CSV output for all extracted features, with error logging for malformed emails, ensuring data integrity and reproducibility.
  • EMFET’s interface includes a progress bar and folder browser, enhancing usability for researchers and practitioners without advanced programming skills.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.