Agent skill

email-mailbox-analyzer

Analyzes email mailbox usage by extracting IMAP configurations and running imapdu to generate detailed usage reports. Use this skill when you need to analyze email storage, identify large mailboxes, and generate CSV reports.

Stars 1
Forks 0

Install this agent skill to your Project

npx add-skill https://github.com/akaihola/skills-akaihola/tree/main/email-mailbox-analyzer

SKILL.md

Email Mailbox Analyzer

This skill provides a tool for analyzing email mailbox usage and generating detailed reports.

Tool

email-mailbox-analyzer

Analyzes email mailbox usage by extracting IMAP server configurations from Thunderbird and running the imapdu tool to generate detailed usage reports.

When to Use This Skill

Use this skill when you need to:

  • Analyze email storage usage across multiple accounts
  • Identify large mailboxes that consume significant storage
  • Generate CSV reports with mailbox statistics

Features

  • Automatically extracts IMAP server settings from Thunderbird's prefs.js
  • Runs imapdu analysis for each configured email account
  • Generates CSV reports with mailbox statistics
  • Sorts results by mailbox size for easy identification
  • Creates timestamped output directories for organized results

Requirements

  • uvx (for running imapdu)
  • Thunderbird with IMAP accounts configured
  • Bash shell

Usage

Basic Usage

To analyze all configured IMAP accounts:

bash
./scripts/email-mailbox-analyzer.sh

Manual Usage

To run a specific analysis command:

bash
uvx git+https://github.com/cpackham/imapdu --user sender@example.com --csv --no-human-readable mail.example.com | sort -t, -k3 -n

Output Format

The tool generates CSV files with the following columns:

  • count: Number of messages in the folder
  • path/to/folder: Folder path
  • total-bytes: Total size of all messages in bytes
  • largest-message-bytes: Size of the largest message in bytes

Example Output

count,path/to/folder,total-bytes,largest-message-bytes
123,INBOX,4567890,123456
45,Sent,2345678,98765

Implementation Details

Scripts

The skill includes a main script that:

  1. Extracts IMAP server configurations from Thunderbird's prefs.js
  2. Identifies all IMAP accounts (skipping local folders and smart mailboxes)
  3. Runs imapdu analysis for each account
  4. Processes and sorts CSV output by mailbox size
  5. Creates timestamped output directories for results

Configuration

The script automatically detects Thunderbird's configuration by finding the first *.default-release profile directory under ~/.thunderbird/. If Thunderbird is installed in a non-standard location, pass the path explicitly to the script.

Error Handling

The script includes error handling for:

  • Missing Thunderbird configuration files
  • Failed IMAP connections
  • Authentication issues
  • Missing dependencies

Troubleshooting

  • Permission errors: Ensure read access to your Thunderbird profile's prefs.js (find it with ls ~/.thunderbird/*.default-release/prefs.js)
  • Connection issues: Check internet connection and IMAP server availability
  • Authentication problems: Ensure Thunderbird passwords are up to date
  • Missing dependencies: Install uvx before running the script

Notes

  • Results are sorted by total bytes (column 3) in ascending order
  • Each run creates a new timestamped directory in the home folder
  • The script automatically skips non-IMAP servers like "Local Folders" and "smart mailboxes"

Expand your agent's capabilities with these related and highly-rated skills.

akaihola/skills-akaihola

youtube-to-markdown

Convert a YouTube video into clean, readable Markdown using its free auto-generated captions (no paid API needed). Use when the user asks to "convert YouTube video to markdown", "get transcript from YouTube URL", "summarise this video", or wants to turn YouTube subtitles/captions into readable text. Prefer this over youtube-transcription when the video already has auto-generated subtitles — it's free and faster. Accepts YouTube URLs.

1 0
Explore
akaihola/skills-akaihola

brave-search

Search the web using Brave Search API. Use when the user asks to "search the web", "look up current information", "find news about", "research a topic online", "check prices online", or needs up-to-date facts that may not be in the model's training data. Requires BRAVE_SEARCH_API_KEY. Supports structured web results (pages, FAQs, news, videos) and an optional AI summarizer.

1 0
Explore
akaihola/skills-akaihola

verkkokauppa

Search products on the Verkkokauppa.com Finnish webshop. This skill uses the Verkkokauppa search API directly, requiring no browser. Use when the user asks to "search Verkkokauppa", "find products on verkkokauppa.com", "verkkokauppa product search", "check Verkkokauppa prices", or mentions searching the Verkkokauppa store.

1 0
Explore
akaihola/skills-akaihola

clasohlson

Search products on the Clas Ohlson Finland webshop (clasohlson.com/fi/). This skill uses the Voyado Elevate (Apptus eSales) search API directly, requiring no browser. Use when the user asks to "search Clas Ohlson", "find products on clasohlson.com", "clas ohlson product search", "check Clas Ohlson prices", or mentions searching the Finnish Clas Ohlson store.

1 0
Explore
akaihola/skills-akaihola

bauhaus

Search products on the Bauhaus webshop (bauhaus.fi). This skill uses the Algolia search API with automatic key refresh. Use when the user asks to "search Bauhaus", "find products on bauhaus.fi", "bauhaus product search", "check Bauhaus prices", or mentions searching the Bauhaus store.

1 0
Explore
akaihola/skills-akaihola

library

1 0
Explore

Didn't find tool you were looking for?

Be as detailed as possible for better results