Skip to content

Log Management

Managing, rotating, and archiving Mailborder logs.

Log Locations

Main logs: - /var/log/mailborder/ - All Mailborder logs - /var/log/mail.log - Postfix SMTP log - /var/log/nginx/ - Web server logs

Log Rotation

Automatic rotation: Configured in /etc/logrotate.d/mailborder

Default: - Daily rotation - 30 days retention - Compression enabled

Manual rotation:

sudo logrotate -f /etc/logrotate.d/mailborder

Cleanup

Automated:

sudo mb-maintenance --cleanup-logs

Manual:

# Delete logs older than 30 days
find /var/log/mailborder/ -name "*.log.*" -mtime +30 -delete

Archiving

Archive old logs:

sudo tar czf /archives/logs-$(date +%Y%m).tar.gz \
  /var/log/mailborder/*.log.[1-9]*

See Also