DEV Community

Qasim Muhammad
Qasim Muhammad

Posted on

Using nylas audit config set to set an audit configuration value. Valid keys: retention_days, max_size_mb, rotate_daily, comp...

When AI agents send emails on your behalf, you need a record of what happened. nylas audit config set is part of that audit trail.

The nylas audit config set command changes audit logging settings like retention period (retention_days), maximum log file size (max_size_mb), daily rotation (rotate_daily), compression (compress_old), and whether to capture API request IDs and details. Changes take effect immediately.

Examples

Change retention period:

nylas audit config set retention_days 30
Enter fullscreen mode Exit fullscreen mode

Move log storage:

nylas audit config set path /var/log/nylas-audit
Enter fullscreen mode Exit fullscreen mode

Increase max log size:

nylas audit config set max_size_mb 200
Enter fullscreen mode Exit fullscreen mode

Enable daily rotation:

nylas audit config set rotate_daily true
Enter fullscreen mode Exit fullscreen mode

Log API request details:

nylas audit config set log_api_details true
Enter fullscreen mode Exit fullscreen mode

Syntax

nylas audit config set <key> <value>
Enter fullscreen mode Exit fullscreen mode

How It Works

Every entry in the audit log captures: the exact command, all arguments (with secrets redacted), the invoker identity (human or AI agent name), the exit code, and a nanosecond timestamp. This level of detail is what compliance auditors expect.

Common Issues

Invalid configuration key
Valid keys: retention_days, max_size_mb, rotate_daily, compress_old, log_request_id, log_api_details, path.

Changes not taking effect
Configuration changes apply to new log entries. Existing entries are not affected.


Full docs: nylas audit config set reference — all flags, advanced examples, and troubleshooting.

All commands: Nylas CLI Command Reference

Get started: brew install nylas/nylas-cli/nylasother install methods

Top comments (0)