Skip to content

wyre-technology/mimecast-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@wyre-technology/mimecast-cli

Command-line interface for Mimecast Email Security API.

Installation

npm install -g @wyre-technology/mimecast-cli

Authentication

Set the following environment variables:

export MIMECAST_CLIENT_ID="your-client-id"
export MIMECAST_CLIENT_SECRET="your-client-secret"
export MIMECAST_REGION="us"  # Optional: us, eu, de, au, ca, za

Usage

Messages

Search and manage email messages:

# Search for messages
mimecast messages find --sender user@example.com --format table

# Get message details
mimecast messages get <message-id>

# Hold a message
mimecast messages hold <message-id> --reason "Security review"

# Release a held message
mimecast messages release <message-id>

Options for messages find:

  • -v, --value <value> - Keyword search across message fields
  • -s, --sender <email> - Filter by sender email
  • -r, --recipient <email> - Filter by recipient email
  • --from-date <iso-date> - Start date (ISO 8601 format)
  • --to-date <iso-date> - End date (ISO 8601 format)
  • --status <status> - Filter by status (accepted, blocked, bounced, deferred, delivered, failed, held, processing, queued)
  • --page-size <size> - Results per page (max: 100)
  • --page-token <token> - Pagination token

Threats

Access threat intelligence and audit logs:

# Get threat incidents
mimecast threats incidents --status open --format table

# Get TTP URL click logs
mimecast threats ttp-logs --type url --from-date 2026-03-01T00:00:00Z

# Get TTP attachment sandbox logs
mimecast threats ttp-logs --type attachment --format table

# Get TTP impersonation protection logs
mimecast threats ttp-logs --type impersonation

# Get audit events
mimecast threats audit --from-date 2026-03-01T00:00:00Z --categories administration,policy

TTP Log Types:

  • url - URL click protection logs
  • attachment - Attachment sandbox logs
  • impersonation - Impersonation protection logs

Queue

Monitor email delivery queue:

# Get queue status
mimecast queue status --format table

Output Formats

By default, all commands output JSON. Use --format table for human-readable tables:

mimecast messages find --sender admin@example.com --format table

Command Aliases

  • messagesmsg
  • threatsthreat

Examples

# Find recent messages from a sender
mimecast msg find --sender alerts@example.com --from-date 2026-03-15T00:00:00Z

# Get detailed message information in table format
mimecast msg get eNoVzE... --format table

# Review threat incidents from the past week
mimecast threat incidents --format table

# Check URL click logs for suspicious activity
mimecast threat ttp-logs --type url --from-date 2026-03-10T00:00:00Z --format table

# Monitor delivery queue
mimecast queue status

Environment Variables

Variable Required Description
MIMECAST_CLIENT_ID Yes Mimecast API client ID
MIMECAST_CLIENT_SECRET Yes Mimecast API client secret
MIMECAST_REGION No Region (us, eu, de, au, ca, za). Default: us
MIMECAST_BASE_URL No Custom API base URL (overrides region)

Development

# Install dependencies
npm install

# Build
npm run build

# Run in development
npm run dev

# Lint
npm run lint

# Type check
npm run typecheck

License

MIT

Support

For issues and questions:

Related Projects

About

CLI for Mimecast — manage messages, queues, and threat detection from the terminal

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors