Command-line interface for Mimecast Email Security API.
npm install -g @wyre-technology/mimecast-cliSet 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, zaSearch 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
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,policyTTP Log Types:
url- URL click protection logsattachment- Attachment sandbox logsimpersonation- Impersonation protection logs
Monitor email delivery queue:
# Get queue status
mimecast queue status --format tableBy default, all commands output JSON. Use --format table for human-readable tables:
mimecast messages find --sender admin@example.com --format tablemessages→msgthreats→threat
# 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| 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) |
# Install dependencies
npm install
# Build
npm run build
# Run in development
npm run dev
# Lint
npm run lint
# Type check
npm run typecheckMIT
For issues and questions:
- GitHub Issues: https://github.com/wyre-technology/mimecast-cli/issues
- Documentation: https://github.com/wyre-technology/mimecast-cli
- @wyre-technology/node-mimecast - Mimecast API client library
- @wyre-technology/mimecast-mcp - MCP server for Mimecast