EML analyzer

April 11, 2026 ยท View on GitHub

Coverage Status

EML analyzer is an application to analyze the EML file which can:

  • Analyze headers.
  • Analyze bodies.
    • Extract IOCs (URLs, domains, IP addresses, emails) in bodies.
  • Analyze attachments.
    • Identify whether attachments contain suspicious OLE files.

Installation

Docker

git clone https://github.com/ninoseki/eml_analyzer.git
cd eml_analyzer
docker build . -t eml_analyzer
docker run -i -d -p 8000:8000 eml_analyzer

The application is running at: http://localhost:8000/ in your browser.

Docker Compose

git clone https://github.com/ninoseki/eml_analyzer.git
cd eml_analyzer
docker-compose up

Docker vs. Docker compose

Thus Docker Compose is suitable for the production use.

Configuration

Configuration can be done via environment variables.

Alternatively you can set values through .env file. Values in .env file will be automatically loaded.

KeyDesc.Default
REDIS_EXPIRERedis cache expiration time (in seconds)3600
REDIS_KEY_PREFIXRedis key prefixanalysis
REDIS_URLRedis URL-
REDIS_CACHE_LIST_AVAILABLEExpose a list of cached keysTrue
SPAMASSASSIN_HOSTSpamAssassin host127.0.0.1
SPAMASSASSIN_PORTSpamAssassin port783
SPAMASSASSIN_TIMEOUTSpamAssassin timeout (in seconds)10
URLSCAN_API_KEYurlscan.io API Key-
VIRUSTOTAL_API_KEYVirusTotal API Key-
ASYNC_MAX_AT_ONCEMax number of concurrently running lookup tasksNone
ASYNC_MAX_PER_SECONDMax number of tasks spawned per secondNone

Development

Requirements

  • Python 3.12
  • Node.js v24
  • Docker & Docker Compose
  • Lefthook

Backend

# install dependencies
uv sync
# run test
uv run pytest

Frontend

cd frontend
# install dependencies
npm install
# run test
npm run test:unit

Linter

# setup pre-commit hooks
lefthook install
# run hooks manually
lefthook run pre-commit --all-files

ToDo

  • Support MSG format.
  • In-depth attachments analysis by using oletools.