diff --git a/TODO-documentation.md b/TODO-documentation.md
index b173ca4..305f103 100644
--- a/TODO-documentation.md
+++ b/TODO-documentation.md
@@ -3,7 +3,7 @@
**Branch:** `v20260207-02-wiki-documentation`
**Date Started:** 2026-02-07
**Date Updated:** 2026-02-08
-**Status:** In Progress - 10 of 33 pages complete
+**Status:** In Progress - 14 of 33 pages complete
---
@@ -36,6 +36,12 @@
- ✅ Approved Jobs (with job-details.png)
- ✅ Job Schedules (with schedule-indicators.png)
+**Phase 3: Mail & Import (4/4 pages - COMPLETE)**
+- ✅ Mail Import Setup
+- ✅ Inbox Management
+- ✅ Mail Parsing
+- ✅ Auto-Import Configuration
+
### Screenshots Added (10 total)
1. user-management.png - User role checkboxes
2. user-settings.png - Password change form
@@ -47,12 +53,6 @@
### Remaining Work 🚧
-**Phase 3: Mail & Import (0/4 pages - PLACEHOLDER)**
-- ⏳ Mail Import Setup
-- ⏳ Inbox Management
-- ⏳ Mail Parsing
-- ⏳ Auto-Import Configuration
-
**Phase 3: Backup Review (0/5 pages - PLACEHOLDER)**
- ⏳ Approving Backups
- ⏳ Daily Jobs View
@@ -67,10 +67,10 @@
- Troubleshooting (0/3 pages)
**Progress Summary:**
-- ✅ 10 of 33 pages complete (30%)
+- ✅ 14 of 33 pages complete (42%)
- ✅ 10 screenshots added
- ✅ All completed pages reviewed and corrected based on actual UI
-- ⏳ 23 pages remaining (placeholders created)
+- ⏳ 19 pages remaining (placeholders created)
---
@@ -998,7 +998,7 @@ Add to navigation menu (after existing items):
**Status:** COMPLETE
**Time Spent:** ~6 hours
-### Phase 3: Content Pages - Core Features 🚧 IN PROGRESS (7 of 16 complete)
+### Phase 3: Content Pages - Core Features 🚧 IN PROGRESS (11 of 16 complete)
- [x] User Management (3 pages) ✅
- [x] Users & Roles
- [x] Login & Authentication
@@ -1008,11 +1008,11 @@ Add to navigation menu (after existing items):
- [x] Configuring Jobs
- [x] Approved Jobs
- [x] Job Schedules
-- [ ] Mail & Import (4 pages) ⏳
- - [ ] Mail Import Setup
- - [ ] Inbox Management
- - [ ] Mail Parsing
- - [ ] Auto-Import Configuration
+- [x] Mail & Import (4 pages) ✅
+ - [x] Mail Import Setup
+ - [x] Inbox Management
+ - [x] Mail Parsing
+ - [x] Auto-Import Configuration
- [ ] Backup Review (5 pages) ⏳
- [ ] Approving Backups
- [ ] Daily Jobs View
@@ -1021,9 +1021,9 @@ Add to navigation menu (after existing items):
- [ ] Remarks & Tickets
- [x] Take screenshots for core features (10 screenshots added)
-**Status:** 43% complete (7/16 pages)
-**Time Spent:** ~12 hours
-**Remaining:** ~8 hours
+**Status:** 69% complete (11/16 pages)
+**Time Spent:** ~16 hours
+**Remaining:** ~4 hours
### Phase 4: Content Pages - Advanced Features
- [ ] Reports (4 pages)
diff --git a/containers/backupchecks/src/templates/documentation/mail-import/auto-import.html b/containers/backupchecks/src/templates/documentation/mail-import/auto-import.html
index ab3b4b3..1b87df2 100644
--- a/containers/backupchecks/src/templates/documentation/mail-import/auto-import.html
+++ b/containers/backupchecks/src/templates/documentation/mail-import/auto-import.html
@@ -4,16 +4,362 @@
Auto-Import Configuration
- Configure automatic mail import.
+ Configure automatic email import from your Microsoft Graph mailbox to run on a schedule.
+Overview
+
+BackupChecks can automatically import backup report emails from your mailbox at regular intervals. This eliminates the need to manually trigger imports and ensures new backup reports are processed promptly.
+
+Auto-import features:
+
+
+ - Scheduled imports: Automatically fetch new emails at configured intervals
+ - Auto-approval: Emails matching existing jobs are automatically approved
+ - Background processing: Runs in a background thread without blocking the application
+ - Error handling: Logs failures and retries on the next interval
+ - Manual override: Trigger imports manually when needed
+
+
+Automatic Import
+
+Automatic import runs continuously in the background and fetches new emails based on a configured interval.
+
+Enabling Auto-Import
+
+To enable automatic import:
+
+
+ - Navigate to Settings → Imports tab
+ - Locate the Automatic mail import section
+ - Check the Enable automatic import checkbox
+ - Set the Import interval in minutes (default: 15 minutes)
+ - Click Save settings at the bottom of the page
+
+
- 📝 Coming Soon:
- This page is under construction. Full content will be added in a future update.
+ 💡 First Run:
+ After enabling auto-import, the first import runs immediately. Subsequent imports run at the configured interval.
-Content
+Import Interval
-Detailed content will be added here in a future update.
+The import interval determines how often BackupChecks checks for new emails:
+
+
+
+
+ | Interval |
+ Use Case |
+ Recommendation |
+
+
+
+
+ | 5 minutes |
+ High-frequency backups, real-time monitoring |
+ May increase server load, use only if necessary |
+
+
+ | 15 minutes |
+ Standard setup (default) |
+ Recommended for most organizations |
+
+
+ | 30 minutes |
+ Low-priority backups, small teams |
+ Good balance between timeliness and load |
+
+
+ | 60 minutes |
+ Batch processing, overnight backups only |
+ Suitable for organizations with scheduled backup windows |
+
+
+
+
+
+ 💡 Performance Consideration:
+ Shorter intervals provide faster email processing but increase server load and Microsoft Graph API usage. 15 minutes is recommended as a good balance for most organizations.
+
+
+Batch Size
+
+Auto-import fetches a fixed number of emails per run to prevent overwhelming the system:
+
+
+ - Automatic import: Always fetches 10 messages per run
+ - If more than 10 new emails exist, they will be fetched on subsequent runs
+ - This prevents long-running imports that could block other operations
+
+
+How Auto-Import Works
+
+Here's what happens during each automatic import cycle:
+
+
+ - Timer triggers: The configured interval elapses (e.g., 15 minutes)
+ - Check settings: Verify that auto-import is still enabled
+ - Authenticate: Obtain access token from Microsoft Graph
+ - Fetch emails: Retrieve up to 10 new emails from the incoming folder
+ - Parse emails: Run parsers to extract backup information
+ - Auto-approve: If the email matches an existing approved job, automatically approve it
+ - Move emails: Move processed emails to the processed folder (if configured)
+ - Log results: Record import statistics in the audit log
+ - Persist objects: Store backup objects for auto-approved runs
+ - Wait: Sleep until the next interval
+
+
+Auto-Approval
+
+During automatic import, BackupChecks can automatically approve emails that match previously approved jobs. This eliminates the need to manually approve recurring backup reports.
+
+How Auto-Approval Works
+
+An email is automatically approved if:
+
+
+ - The email is successfully parsed (backup software, type, and job name extracted)
+ - A matching job already exists in the database (based on sender, job name, backup software)
+ - The job was previously approved by a user
+ - The match is unique across all customers (no ambiguity)
+
+
+When auto-approved:
+
+
+ - A new
JobRun is created and linked to the existing job
+ - Backup objects are extracted and stored
+ - The email is marked as approved and moved out of the inbox
+ - The run appears in Daily Jobs, Run Checks, and job history
+
+
+
+ 💡 First Approval is Manual:
+ The first email for a new backup job must always be manually approved from the inbox. After that, future emails for the same job are automatically approved.
+
+
+When Auto-Approval Fails
+
+If auto-approval fails, the email remains in the inbox and requires manual approval:
+
+
+ - Parsing failed: Email format not recognized by any parser
+ - No matching job: This is the first email for this backup job
+ - Ambiguous match: Multiple jobs match the same criteria (different customers with identical job names)
+ - Job renamed: The backup software renamed the job, breaking the match
+
+
+Manual Import
+
+You can manually trigger an import at any time without waiting for the automatic import interval.
+
+Triggering Manual Import
+
+
+ - Navigate to Settings → Imports tab
+ - Scroll to the Manual mail import section
+ - Optionally adjust the Number of items (default: 50)
+ - Click the Import now button
+ - BackupChecks will immediately fetch emails from the mailbox
+ - You'll see a success message showing how many emails were imported
+
+
+Manual Import Batch Size
+
+Manual import allows you to configure how many emails to fetch:
+
+
+ - Default: 50 emails per manual import
+ - Range: 1 to 50 emails
+ - Use case: Fetch a large batch when setting up a new customer or after a long period without imports
+
+
+The default batch size can be changed in Settings → Imports → Manual import batch size.
+
+
+
💡 When to Use Manual Import:
+ Manual import is useful when:
+
+ - Testing mail configuration for the first time
+ - Setting up a new customer and you need their emails imported immediately
+ - Auto-import is disabled but you need to import specific emails
+ - You want to fetch a larger batch than the automatic 10-message limit
+
+
+
+Import Settings Summary
+
+Here's a complete reference of all mail import settings:
+
+
+
+
+ | Setting |
+ Location |
+ Default |
+ Description |
+
+
+
+
+ | Enable automatic import |
+ Settings → Imports |
+ Disabled |
+ Turn automatic email import on or off |
+
+
+ | Import interval |
+ Settings → Imports |
+ 15 minutes |
+ How often to check for new emails (automatic import only) |
+
+
+ | Manual import batch size |
+ Settings → Imports |
+ 50 messages |
+ Default number of emails to fetch during manual import |
+
+
+ | EML retention period |
+ Settings → Imports |
+ 7 days |
+ How long to store raw .eml files (0, 7, or 14 days) |
+
+
+
+
+Monitoring Import Activity
+
+You can monitor import activity through several interfaces:
+
+Audit Log
+
+Every import operation is logged in the audit log:
+
+
+ - Navigate to Settings → Maintenance → Admin events
+ - Look for events like:
+
+ mail_import_auto - Automatic import completed
+ mail_import_manual - Manual import completed
+ mail_import_auto_error - Automatic import failed
+
+
+ - Event messages show statistics:
fetched=10, new=3, auto_approved=7, errors=0
+
+
+Inbox Page
+
+The inbox shows all imported emails:
+
+
+ - Check the Parsed column to see when emails were imported and parsed
+ - Emails with blank Backup or Job name were not successfully parsed
+ - Approved emails move out of the inbox automatically
+
+
+Jobs and Daily Jobs
+
+Auto-approved emails appear as new runs in:
+
+
+ - Jobs page - Shows all backup jobs with their latest run status
+ - Daily Jobs page - Shows backup runs for today, grouped by customer
+ - Run Checks page - Shows all runs awaiting review
+
+
+Troubleshooting
+
+Auto-Import Not Running
+
+If auto-import is enabled but emails are not being imported:
+
+
+ - Verify that Enable automatic import is checked in Settings → Imports
+ - Check the audit log for
mail_import_auto_error events
+ - Verify Microsoft Graph credentials are still valid (client secret may have expired)
+ - Ensure the BackupChecks application server is running (the background thread starts on app startup)
+ - Check system logs for thread errors or crashes
+
+
+Emails Not Auto-Approved
+
+If emails are imported but not auto-approved:
+
+
+ - Check the Inbox - emails may be parsed but not matched to existing jobs
+ - Verify the first email for this job was manually approved (auto-approval only works for subsequent emails)
+ - Ensure the job name, backup software, and sender match exactly between emails
+ - Check for duplicate jobs across different customers (auto-approval requires a unique match)
+
+
+Import Errors
+
+If imports fail with errors:
+
+
+ - Authentication error: Verify Microsoft Graph credentials (tenant ID, client ID, client secret)
+ - Folder not found: Check that incoming/processed folder paths are correct
+ - Timeout error: Network issues or Microsoft Graph API unavailability - will retry on next interval
+ - Disk space error: Free disk space below 2 GB - mail import is blocked until space is freed
+
+
+Best Practices
+
+
+ - Enable auto-import: Use automatic import for hands-off email processing
+ - Use 15-minute interval: Recommended for most setups (balances timeliness and load)
+ - Monitor audit logs: Regularly check for import errors
+ - Approve first emails manually: Always manually approve the first email for a new job to enable auto-approval
+ - Keep credentials fresh: Set calendar reminders to renew Microsoft Graph client secrets before expiration
+ - Test manual import first: Before enabling auto-import, test manual import to verify configuration
+ - Use dedicated mailbox: Don't mix backup reports with personal email
+
+
+Advanced Configuration
+
+Disabling Auto-Import Temporarily
+
+To temporarily stop automatic imports without losing configuration:
+
+
+ - Navigate to Settings → Imports
+ - Uncheck Enable automatic import
+ - Click Save settings
+ - The background thread will stop fetching emails but settings are preserved
+ - Re-enable later by checking the box again
+
+
+EML Storage Retention
+
+Control how long raw .eml files are stored in the database:
+
+
+ - 0 days: Don't store .eml files (saves database space, but troubleshooting is harder)
+ - 7 days: Default - good balance between troubleshooting capability and storage
+ - 14 days: Extended retention for environments with complex parsing issues
+
+
+Older .eml files are automatically purged based on this retention period.
+
+High-Volume Environments
+
+For organizations with hundreds of backup jobs:
+
+
+ - Consider 5-minute intervals to process emails more quickly
+ - Ensure server resources (CPU, RAM, disk) are sufficient for frequent imports
+ - Monitor database size growth - consider reducing EML retention to 0 days
+ - Use multiple BackupChecks instances with separate mailboxes to distribute load
+
+
+Next Steps
+
+
{% endblock %}
diff --git a/containers/backupchecks/src/templates/documentation/mail-import/inbox-management.html b/containers/backupchecks/src/templates/documentation/mail-import/inbox-management.html
index 735a704..8b721da 100644
--- a/containers/backupchecks/src/templates/documentation/mail-import/inbox-management.html
+++ b/containers/backupchecks/src/templates/documentation/mail-import/inbox-management.html
@@ -4,16 +4,354 @@
Inbox Management
- Manage incoming backup report emails.
+ Review incoming backup report emails, examine parsed results, and approve jobs for monitoring.
+Overview
+
+The Inbox is the central location where all imported backup report emails appear before being approved and linked to jobs. Think of it as a staging area where you review and validate incoming backup reports.
+
+The inbox workflow:
+
+
+ - Import: Emails are automatically imported from your mailbox
+ - Parse: BackupChecks automatically parses email content to extract backup information
+ - Review: You review the parsed results in the inbox
+ - Approve: You approve emails to create backup jobs and link future reports
+ - Monitor: Approved jobs appear in Daily Jobs and other operational views
+
+
+Accessing the Inbox
+
+To access the inbox:
+
+
+ - Navigate to Inbox in the main navigation menu
+ - Available to Admin, Operator, and Viewer roles
+ - Viewers can see emails but cannot approve or delete them
+
+
+Inbox Page Layout
+
+The Inbox page displays a table with all imported emails. Each row represents one email message.
+
+Table Columns
+
+
+
+
+ | Column |
+ Description |
+
+
+
+
+ | From |
+ Sender email address (e.g., backups@veeam.com) |
+
+
+ | Subject |
+ Email subject line |
+
+
+ | Date / time |
+ When the email was received (in configured timezone) |
+
+
+ | Backup |
+ Detected backup software (e.g., Veeam, Synology, NAKIVO) |
+
+
+ | Type |
+ Backup job type (e.g., Backup Job, Replication Job) |
+
+
+ | Job name |
+ Extracted backup job name from email content |
+
+
+ | Overall |
+ Overall status extracted from email (Success, Warning, Failed) |
+
+
+ | Parsed |
+ Timestamp when the email was parsed |
+
+
+ | EML |
+ Checkmark (✓) if raw .eml file is stored |
+
+
+
+
+Pagination
+
+The inbox displays 50 emails per page. Use the pagination controls at the top and bottom of the table:
+
+
+ - Previous / Next buttons: Navigate between pages
+ - Page X of Y: Shows current page and total pages
+ - Go to: Jump directly to a specific page number
+
+
+Viewing Email Details
+
+To view the full content and parsed details of an email:
+
+
+ - Click anywhere on the email row in the inbox table
+ - A large modal dialog opens showing the email details
+
+
+Email Detail Modal
+
+The email detail modal contains three main sections:
+
+1. Metadata Section (Top)
+
+Displays email header information:
+
+
+ - From: Sender address
+ - Subject: Email subject
+ - Received: Timestamp
+ - Backup software / Type / Job name: Parsed values
+ - Overall status: Success/Warning/Failed indicator
+ - Customer: If already approved and linked to a customer
+ - Approved: Checkmark if this email has been approved
+
+
+2. Email Body (Middle)
+
+The email body is displayed in an embedded iframe:
+
+
+ - HTML emails are rendered in their original formatting
+ - Plain text emails are displayed as preformatted text
+ - Styling and images are preserved when possible
+
+
- 📝 Coming Soon:
- This page is under construction. Full content will be added in a future update.
+ 💡 HTML Rendering:
+ The email body is sandboxed in an iframe for security. This prevents malicious scripts from executing while still allowing you to see the formatted email content.
-Content
+3. Parsed Objects (Bottom)
-Detailed content will be added here in a future update.
+If the email was successfully parsed, this section shows the backup objects extracted from the email:
+
+
+
+
+ | Column |
+ Description |
+
+
+
+
+ | Name |
+ Object name (VM name, server name, etc.) |
+
+
+ | Object type |
+ Type of object (e.g., VM, Server, Repository) |
+
+
+ | Status |
+ Status of this object (Success, Warning, Failed) |
+
+
+ | Message |
+ Any error or warning message for this object |
+
+
+
+
+For example, a Veeam backup job email might show:
+
+
+ - Object:
DC01, Type: VM, Status: Success
+ - Object:
FILESERVER, Type: VM, Status: Success
+ - Object:
EXCHANGE01, Type: VM, Status: Warning, Message: "Retry attempt succeeded"
+
+
+Approving Emails
+
+Approving an email creates a backup job in BackupChecks and links it to a customer. Future emails matching the same job will be automatically linked.
+
+How to Approve
+
+
+ - Open the email detail modal by clicking on an inbox row
+ - Review the email content and parsed objects
+ - Click the Approve button at the top of the modal
+ - An approval dialog opens with two fields:
+
+ - Select customer: Choose which customer this backup job belongs to
+ - Job name: Pre-filled with the parsed job name (you can edit if needed)
+
+
+ - Select the customer from the dropdown (or start typing to search)
+ - Verify or adjust the job name
+ - Click Confirm to approve
+
+
+
+
💡 Customer Selection:
+ Always create the customer account
before approving emails. This allows you to immediately link the job to the correct customer. See
Managing Customers for details.
+
+
+What Happens After Approval
+
+When you approve an email:
+
+
+ - A Job record is created in the database (if it doesn't already exist)
+ - A JobRun record is created, representing this specific backup run
+ - JobObject records are created for each parsed object (VMs, servers, etc.)
+ - The email is marked as approved and moved out of the inbox
+ - The job immediately appears in Jobs, Daily Jobs, and Run Checks pages
+ - Future emails matching the same job are automatically linked without manual approval
+
+
+
+ ⚠️ Job Matching:
+ After approval, future emails are matched to this job based on sender address, job name, and backup software. If these change (e.g., job is renamed), you may need to approve a new email to create a new job record.
+
+
+Re-parsing Emails
+
+If an email was not parsed correctly, you can re-parse it after updating parser configuration.
+
+Re-parse Single Email
+
+To re-parse a single email:
+
+
+ - Open the email detail modal
+ - Click the Re-parse button
+ - BackupChecks will re-run all parsers on this email
+ - The modal will refresh with updated parsed results
+
+
+Re-parse All Emails
+
+To re-parse all emails in the inbox at once:
+
+
+ - At the top of the inbox page, click the Re-parse all button
+ - This re-runs parsers on all inbox emails
+ - Useful after adding new parsers or fixing parser bugs
+
+
+
+ 💡 When to Re-parse:
+ Re-parsing is useful when emails were imported before a parser was configured, or when parser logic has been updated. Re-parsing does not re-fetch emails from the mailbox - it only re-processes emails already in the database.
+
+
+Deleting Emails
+
+Admins and Operators can delete emails from the inbox.
+
+Delete Single Email
+
+
+ - Open the email detail modal
+ - Click the Delete button
+ - Confirm the deletion
+ - The email is marked as deleted and moved out of the inbox
+
+
+Bulk Delete Emails
+
+
+ - Check the checkboxes next to emails you want to delete
+ - Click the Delete selected button at the top of the inbox
+ - Confirm the bulk deletion
+
+
+
+ ⚠️ Soft Delete:
+ Emails are soft-deleted, not permanently removed. Deleted emails are hidden from the inbox but remain in the database. Admins can view deleted emails in Settings → Maintenance → Deleted mails.
+
+
+Downloading .EML Files
+
+If EML storage is enabled, you can download the original .eml file for any email:
+
+
+ - Open the email detail modal
+ - Click the Download .eml button
+ - The raw .eml file is downloaded to your browser
+ - You can open this file in Outlook, Thunderbird, or any email client
+
+
+This is useful for:
+
+
+ - Troubleshooting parsing issues
+ - Forwarding the email to a vendor for support
+ - Archiving backup reports outside BackupChecks
+
+
+Inbox Filters and Search
+
+The inbox currently displays all imported emails in chronological order (newest first). Filtering and search features are planned for a future update.
+
+
+ 📝 Future Feature:
+ Search and filter capabilities (by sender, subject, backup software, status) are planned to help manage large inboxes. For now, use the pagination controls to browse emails.
+
+
+Common Workflows
+
+Setting Up a New Customer
+
+
+ - Create the customer in Customers page
+ - Wait for backup reports to arrive in the inbox (or trigger a manual import)
+ - Review each email for the customer in the inbox
+ - Approve each email, selecting the new customer from the dropdown
+ - Jobs are now created and linked to the customer
+ - Future reports are automatically linked without approval
+
+
+Troubleshooting Unparsed Emails
+
+
+ - Find emails with empty Backup or Job name columns
+ - Open the email detail modal
+ - Review the email body to understand its format
+ - Check if a parser exists for this backup software in Settings → Parsers
+ - If no parser exists, request one or create a custom parser
+ - After adding a parser, use Re-parse to process the email again
+
+
+Cleaning Up Spam or Test Emails
+
+
+ - Identify unwanted emails in the inbox (e.g., spam, test messages)
+ - Select them using checkboxes
+ - Click Delete selected
+ - Configure mail rules in your mailbox to prevent future spam
+
+
+Best Practices
+
+
+ - Review new emails daily: Check the inbox regularly to approve new jobs promptly
+ - Create customers first: Always create customer accounts before approving their jobs
+ - Use descriptive job names: Edit job names during approval if the parsed name is unclear
+ - Clean up the inbox: Delete or approve emails to keep the inbox manageable
+ - Monitor parsing success: Check for emails with missing backup software - these may need parser configuration
+
+
+Next Steps
+
+
{% endblock %}
diff --git a/containers/backupchecks/src/templates/documentation/mail-import/mail-parsing.html b/containers/backupchecks/src/templates/documentation/mail-import/mail-parsing.html
index 500c157..134cba9 100644
--- a/containers/backupchecks/src/templates/documentation/mail-import/mail-parsing.html
+++ b/containers/backupchecks/src/templates/documentation/mail-import/mail-parsing.html
@@ -4,16 +4,370 @@
Mail Parsing
- Learn how email parsing works.
+ Understand how BackupChecks automatically extracts backup information from email reports using parsers.
+Overview
+
+When emails are imported from your mailbox, BackupChecks automatically parses (analyzes) the email content to extract structured backup information. This eliminates the need to manually read each email and enter data.
+
+Parsing extracts:
+
+
+ - Backup software: The product that generated the email (e.g., Veeam, Synology, NAKIVO)
+ - Backup type: The type of backup job (e.g., Backup Job, Replication Job)
+ - Job name: The name of the backup job
+ - Overall status: Success, Warning, or Failed
+ - Backup objects: Individual items backed up (VMs, servers, files) with their statuses
+
+
+How Parsing Works
+
+The mail parsing process follows these steps:
+
+
+ - Retrieval: Email is imported from Microsoft Graph and stored as a
MailMessage record
+ - Preprocessing: Email body is normalized (line endings, character encoding) for consistent parsing
+ - Parser selection: All active parsers are evaluated in order to find a match
+ - Matching: Each parser checks if the email matches its criteria (sender, subject, body patterns)
+ - Parsing: When a match is found, the parser extracts backup information from the email
+ - Storage: Parsed data is stored in the database and linked to the email
+
+
+Parsers
+
+A parser is a piece of code that knows how to extract backup information from a specific backup software's email format.
+
+Viewing Available Parsers
+
+To see all available parsers:
+
+
+ - Navigate to Settings → Parsers (Admin only)
+ - The parsers page shows a table with all parsers and their configuration
+
+
+Parser Information
+
+Each parser entry shows:
+
+
+
+
+ | Column |
+ Description |
+
+
+
+
+ | Name |
+ Unique identifier for the parser (e.g., veeam_backup_job) |
+
+
+ | Backup software |
+ The product this parser handles (e.g., Veeam, NAKIVO) |
+
+
+ | Backup type(s) |
+ Types of jobs this parser supports (e.g., Backup Job, Replication Job) |
+
+
+ | Match criteria |
+ Rules used to identify matching emails (sender, subject, body patterns) |
+
+
+ | Order |
+ Evaluation order (lower numbers are checked first) |
+
+
+ | Enabled |
+ Checkbox to enable/disable this parser |
+
+
+
+
+Match Criteria
+
+Parsers use match criteria to determine if an email matches their expected format. Common criteria include:
+
+Sender Match
+
+Match based on the sender's email address:
+
+
+ - from contains: Sender address must contain a specific string
+
+ - Example:
from contains 'veeam.com' matches backups@veeam.com
+
+
+
+
+Subject Match
+
+Match based on the email subject line:
+
+
+ - subject contains: Subject must contain specific text
+
+ - Example:
subject contains '[Backup]'
+
+
+ - subject matches: Subject must match a regular expression pattern
+
+ - Example:
subject matches /Backup.*Success/
+
+
+
+
+Body Match
+
+Match based on email body content (not shown in table but used internally):
+
+
+ - Specific phrases or patterns in the email HTML or text body
+ - Table structures, HTML tags, or formatting patterns
+
+
+Supported Backup Software
+
+BackupChecks includes built-in parsers for popular backup solutions:
+
+Veeam Backup & Replication
+
+
+ - Backup jobs
+ - Backup Copy jobs
+ - Replication jobs
+ - VM-level and object-level details
+ - Warning and error messages
+ - VSPC (Veeam Service Provider Console) active alarms
+
+
+Synology Active Backup
+
+
+ - Task result notifications
+ - PC backup, VM backup, file server backup
+ - Success/failure status per device
+
+
+NAKIVO Backup & Replication
+
+
+ - Job completion emails
+ - VM-level status and warnings
+
+
+Other Supported Software
+
+Additional parsers exist for:
+
+
+ - Boxafe: Cloud backup for Microsoft 365
+ - Panel3: Backup monitoring platform
+ - QNAP: NAS backup notifications
+ - Syncovery: File synchronization and backup
+ - 3CX: VoIP system backup notifications
+ - RDrive Image: Disk imaging backups
+ - NTFS Auditing: File access audit reports
+
+
- 📝 Coming Soon:
- This page is under construction. Full content will be added in a future update.
+ 💡 Custom Parsers:
+ If your backup software is not listed, you can request a custom parser or create one yourself if you have Python development skills. Parser code is located in backend/app/parsers/.
-Content
+Parser Execution Order
-Detailed content will be added here in a future update.
+When an email is parsed, BackupChecks evaluates parsers in a specific order based on their Order value. This is important because:
+
+
+ - The first matching parser is used - no other parsers are evaluated after a match
+ - More specific parsers should have lower order numbers (checked first)
+ - Generic parsers should have higher order numbers (checked last)
+
+
+For example:
+
+
+
+
+ | Order |
+ Parser |
+ Rationale |
+
+
+
+
+ | 1 |
+ veeam_replication_job |
+ Specific Veeam job type - check before generic Veeam parser |
+
+
+ | 2 |
+ veeam_backup_job |
+ Generic Veeam parser - fallback for other Veeam emails |
+
+
+ | 10 |
+ synology_active_backup |
+ Unrelated to Veeam - order doesn't matter relative to Veeam |
+
+
+
+
+Enabling and Disabling Parsers
+
+You can enable or disable individual parsers without deleting them. This is useful when:
+
+
+ - You temporarily don't need emails from a specific backup software
+ - A parser is matching emails incorrectly (disable it while troubleshooting)
+ - You're testing a new parser (disable the old one to force the new one to match)
+
+
+How to Disable a Parser
+
+
+ - Navigate to Settings → Parsers
+ - Find the parser you want to disable
+ - Uncheck the Enabled checkbox
+ - The parser will no longer be evaluated for new emails
+
+
+
+ ⚠️ Impact of Disabling:
+ Disabling a parser affects future email parsing only. Already-parsed emails are not affected. If you disable a parser, emails that would have matched it will remain unparsed (blank backup software and job name).
+
+
+Re-parsing Emails
+
+If parsing fails or produces incorrect results, you can re-parse emails after fixing the issue.
+
+When to Re-parse
+
+
+ - A parser was disabled when the email was imported
+ - A new parser was added for previously unsupported software
+ - Parser code was updated to fix a bug
+ - Match criteria were adjusted
+
+
+How to Re-parse
+
+
+ - Single email: Open the email detail modal in the inbox and click Re-parse
+ - All inbox emails: Click Re-parse all at the top of the inbox page
+
+
+
+ 💡 Re-parsing is Safe:
+ Re-parsing only updates parsed fields (backup software, job name, objects, etc.). It does not re-fetch the email from the mailbox or modify the original email content stored in the database.
+
+
+Parsing Workflow Example
+
+Here's how a typical Veeam backup email is parsed:
+
+Example Email
+
+
+ - From:
backups@veeam.com
+ - Subject:
[Veeam] Backup Job 'Daily VM Backup' completed with Warning
+ - Body: HTML table showing:
+
+ - VM: DC01 - Success
+ - VM: FILESERVER - Success
+ - VM: EXCHANGE01 - Warning: "Retry succeeded"
+
+
+
+
+Parsing Steps
+
+
+ - Import: Email is fetched from Graph API and stored
+ - Match: Veeam backup job parser matches (sender contains 'veeam.com', subject contains '[Veeam]')
+ - Extract: Parser extracts:
+
+ - Backup software:
Veeam
+ - Backup type:
Backup Job
+ - Job name:
Daily VM Backup
+ - Overall status:
Warning (from subject)
+ - Objects: 3 VMs with their individual statuses
+
+
+ - Store: Data is saved to the database
+ - Display: Email appears in inbox with parsed fields populated
+
+
+Troubleshooting Parsing Issues
+
+Email Not Parsed (Blank Fields)
+
+If an email shows blank Backup software or Job name:
+
+
+ - Check if a parser exists for this backup software in Settings → Parsers
+ - If no parser exists, you'll need to create or request one
+ - If a parser exists, check that it's enabled
+ - Verify the email format matches the parser's expected format (sender, subject, body structure)
+ - Check parser order - a different parser may be matching first
+
+
+Incorrect Parsing Results
+
+If parsing produces wrong job names or objects:
+
+
+ - Verify the email format hasn't changed (backup software update may change email templates)
+ - Check if the wrong parser is matching (disable it temporarily to test)
+ - Review parser match criteria - may be too broad and matching unintended emails
+ - Contact support or review parser code to identify the issue
+
+
+Partial Parsing
+
+If some fields parse correctly but others don't:
+
+
+ - The parser may not support all fields in this email format
+ - Email structure may vary slightly from what the parser expects
+ - Parser may need updates to handle new email formats
+
+
+Parser Limitations
+
+Parsers have some inherent limitations:
+
+
+ - Format dependency: Parsers rely on consistent email formats. If your backup software changes its email template, the parser may break
+ - Language dependency: Most parsers expect English-language emails. Non-English emails may not parse correctly
+ - First match only: Only the first matching parser is used. An email cannot be parsed by multiple parsers
+ - No AI inference: Parsers use pattern matching, not AI. They cannot interpret freeform text or adapt to unexpected formats
+
+
+
+ 💡 Future Enhancement:
+ AI-powered parsing (using LLMs to interpret backup emails) is being considered for future versions to handle more diverse email formats without custom parsers.
+
+
+Best Practices
+
+
+ - Don't customize backup email templates: Use default email formats from your backup software for best parsing results
+ - Test new parsers: When adding a custom parser, test it on multiple sample emails before enabling it
+ - Monitor unparsed emails: Regularly check for emails with blank backup software fields
+ - Keep parsers enabled: Only disable parsers when necessary - it's better to have too many than too few
+ - Re-parse after updates: If you update parser code or add new parsers, re-parse existing inbox emails
+
+
+Next Steps
+
+
{% endblock %}
diff --git a/containers/backupchecks/src/templates/documentation/mail-import/setup.html b/containers/backupchecks/src/templates/documentation/mail-import/setup.html
index 5bfbedd..50e5bf8 100644
--- a/containers/backupchecks/src/templates/documentation/mail-import/setup.html
+++ b/containers/backupchecks/src/templates/documentation/mail-import/setup.html
@@ -4,16 +4,306 @@
Mail Import Setup
- Configure Microsoft Graph API integration.
+ Configure Microsoft Graph API integration to automatically retrieve backup report emails from an Exchange Online mailbox.
+Overview
+
+BackupChecks uses the Microsoft Graph API to retrieve emails from an Exchange Online (Microsoft 365) mailbox. This allows the system to automatically import backup reports sent to a dedicated mailbox.
+
+The mail import process involves:
+
+
+ - Authenticating with Microsoft Graph using an Azure AD app registration
+ - Retrieving emails from a specified folder in the mailbox
+ - Parsing email content to extract backup job information
+ - Moving processed emails to a separate folder
+
+
- 📝 Coming Soon:
- This page is under construction. Full content will be added in a future update.
+ 💡 Why Microsoft Graph?
+ BackupChecks uses Microsoft Graph API instead of traditional IMAP/POP3 because it provides better security (OAuth2), reliability, and integration with Microsoft 365 environments. Most organizations already use Microsoft 365 for email, making this the most convenient option.
-Content
+Prerequisites
-Detailed content will be added here in a future update.
+Before configuring mail import in BackupChecks, you need:
+
+
+ - Microsoft 365 subscription with Exchange Online
+ - Dedicated mailbox for receiving backup reports (e.g., backupreports@yourdomain.com)
+ - Azure AD application registration with Mail.Read and Mail.ReadWrite permissions
+ - Admin access to BackupChecks to configure settings
+
+
+Step 1: Create Azure AD App Registration
+
+To allow BackupChecks to access your mailbox, you must create an Azure AD app registration and grant it the necessary permissions.
+
+1.1 Register the Application
+
+
+ - Sign in to the Azure Portal
+ - Navigate to Azure Active Directory → App registrations
+ - Click New registration
+ - Enter a name (e.g., "BackupChecks Mail Importer")
+ - Select Accounts in this organizational directory only
+ - Leave Redirect URI blank
+ - Click Register
+
+
+After registration, note the following values from the Overview page:
+
+
+ - Application (client) ID - you'll enter this as Client ID in BackupChecks
+ - Directory (tenant) ID - you'll enter this as Tenant ID in BackupChecks
+
+
+1.2 Create a Client Secret
+
+
+ - In your app registration, go to Certificates & secrets
+ - Click New client secret
+ - Enter a description (e.g., "BackupChecks access")
+ - Select an expiration period (recommended: 24 months)
+ - Click Add
+ - Important: Copy the secret Value immediately - you cannot view it again later
+
+
+
+ ⚠️ Secret Expiration:
+ Client secrets expire after the selected period. Set a calendar reminder to renew the secret before expiration, or mail import will stop working. When renewing, create a new secret, update BackupChecks settings, then delete the old secret.
+
+
+1.3 Grant API Permissions
+
+BackupChecks requires application permissions (not delegated) to access the mailbox:
+
+
+ - In your app registration, go to API permissions
+ - Click Add a permission
+ - Select Microsoft Graph
+ - Select Application permissions (not Delegated)
+ - Search for and add the following permissions:
+
+ Mail.Read - Read mail in all mailboxes
+ Mail.ReadWrite - Read and write mail in all mailboxes
+
+
+ - Click Add permissions
+ - Important: Click Grant admin consent for [your organization]
+ - Confirm the consent
+
+
+
+ 💡 Why ReadWrite?
+ The Mail.ReadWrite permission is required to move processed emails from the incoming folder to the processed folder. If you only grant Mail.Read, BackupChecks can import emails but cannot move them after processing.
+
+
+Step 2: Configure Mail Settings in BackupChecks
+
+After creating the Azure AD app registration, configure BackupChecks to use it:
+
+
+ - Log in to BackupChecks as an Admin
+ - Navigate to Settings → General tab
+ - Scroll to the Mail (Microsoft Graph) section
+
+
+2.1 Enter Graph Credentials
+
+Fill in the following fields with values from your Azure AD app registration:
+
+
+
+
+ | Field |
+ Description |
+ Example |
+
+
+
+
+ | Tenant ID |
+ Azure AD Directory (tenant) ID |
+ 12345678-1234-1234-1234-123456789abc |
+
+
+ | Client ID |
+ Azure AD Application (client) ID |
+ 87654321-4321-4321-4321-abcdef123456 |
+
+
+ | Client secret |
+ The secret value you copied in Step 1.2 |
+ abc123...xyz789 |
+
+
+ | Mailbox address |
+ Email address of the mailbox to import from |
+ backupreports@yourdomain.com |
+
+
+
+
+
+ 💡 Security Note:
+ The client secret field shows ******** (stored) when a secret is already saved. Leave this field empty to keep the existing secret, or enter a new secret to replace it.
+
+
+2.2 Configure Mail Folders
+
+BackupChecks uses two folders in the mailbox:
+
+
+
+
+ | Folder |
+ Purpose |
+ Example Path |
+
+
+
+
+ | Incoming folder |
+ Where backup reports arrive and are fetched from |
+ Inbox or Inbox/Backup Reports |
+
+
+ | Processed folder |
+ Where emails are moved after processing |
+ Archive or Inbox/Processed |
+
+
+
+
+To configure folders:
+
+
+ - Click the Browse... button next to the Incoming folder field
+ - A folder browser dialog will open showing your mailbox folder structure
+ - Select the folder where backup reports arrive (e.g.,
Inbox)
+ - Click Select
+ - Repeat for the Processed folder (e.g.,
Archive or create a subfolder like Inbox/Processed)
+
+
+
+ ⚠️ Folder Structure:
+ Folder paths are case-sensitive and use forward slashes (/) to separate levels. For example: Inbox/Backup Reports refers to a subfolder named "Backup Reports" inside the Inbox folder.
+
+
+2.3 Save Settings
+
+After entering all credentials and folder paths:
+
+
+ - Click Save settings at the bottom of the page
+ - BackupChecks will validate the configuration
+ - If successful, you'll see a confirmation message
+ - If there's an error, check your credentials and folder paths
+
+
+Step 3: Test the Configuration
+
+After saving settings, verify that mail import is working:
+
+
+ - Send a test backup report email to your configured mailbox address
+ - Wait a few minutes for the scheduled import to run (or trigger a manual import - see below)
+ - Navigate to Inbox in BackupChecks
+ - Verify that the test email appears in the inbox
+
+
+Manual Import
+
+To manually trigger a mail import without waiting for the scheduled task:
+
+
+ - Navigate to Settings → Imports tab
+ - Click the Import now button in the "Mail import" section
+ - BackupChecks will immediately fetch new emails from the incoming folder
+ - Check the Inbox page to see imported emails
+
+
+
+ 💡 Import Schedule:
+ By default, BackupChecks automatically imports new emails every 15 minutes. Manual import is useful for testing or when you need immediate import of a new email.
+
+
+Troubleshooting
+
+Authentication Errors
+
+If you see "Failed to obtain access token" errors:
+
+
+ - Verify that Tenant ID, Client ID, and Client secret are correct
+ - Check that the client secret has not expired in Azure AD
+ - Ensure admin consent was granted for the API permissions
+ - Verify the app registration is in the same tenant as the mailbox
+
+
+Folder Not Found Errors
+
+If folder configuration fails:
+
+
+ - Use the Browse... button to select folders (don't type paths manually)
+ - Ensure the folders exist in the mailbox (create them if needed)
+ - Check that folder names are spelled exactly as they appear in Outlook
+ - Folder paths are case-sensitive
+
+
+No Emails Imported
+
+If manual import succeeds but no emails appear:
+
+
+ - Verify that emails exist in the incoming folder
+ - Check that emails have not already been moved to the processed folder
+ - Ensure the mailbox has emails dated within the retention period (default: 7 days)
+ - Check system logs for parsing errors
+
+
+Advanced Configuration
+
+Email Retention
+
+BackupChecks stores email content in the database but can also retain the original .eml file for a specified period:
+
+
+ - 0 days: EML files are not stored (saves database space)
+ - 7 days: Default retention period
+ - 14 days: Extended retention for troubleshooting
+
+
+This setting is configured in Settings → Imports tab.
+
+Multiple Mailboxes
+
+BackupChecks currently supports importing from one mailbox at a time. If you need to monitor multiple mailboxes:
+
+
+ - Use mail forwarding rules in Exchange to forward backup reports to the configured mailbox
+ - Create shared mailboxes and configure all backup software to send to the shared mailbox
+
+
+Security Best Practices
+
+
+ - Use a dedicated mailbox: Don't use a personal mailbox for backup reports
+ - Restrict app permissions: Only grant the minimum required permissions (Mail.Read and Mail.ReadWrite)
+ - Rotate secrets regularly: Set calendar reminders to renew client secrets before expiration
+ - Limit admin access: Only BackupChecks admins should have access to Settings
+ - Monitor import logs: Check audit logs regularly for failed authentication attempts
+
+
+Next Steps
+
+
{% endblock %}
diff --git a/docs/changelog-claude.md b/docs/changelog-claude.md
index a0486eb..609464a 100644
--- a/docs/changelog-claude.md
+++ b/docs/changelog-claude.md
@@ -4,6 +4,13 @@ This file documents all changes made to this project via Claude Code.
## [2026-02-08]
+### Added
+- Completed Mail & Import documentation section (4 pages):
+ - **Mail Import Setup**: Microsoft Graph API configuration (Azure AD app registration, permissions, credentials), folder configuration (incoming/processed), test configuration, troubleshooting (authentication errors, folder not found, no emails imported), advanced configuration (email retention, multiple mailboxes), security best practices
+ - **Inbox Management**: Inbox overview and workflow, table columns explanation, viewing email details (metadata, body iframe, parsed objects), approving emails (customer selection, job name), what happens after approval, re-parsing emails (single and bulk), deleting emails (single and bulk delete, soft delete behavior), downloading .eml files, common workflows (new customer setup, troubleshooting unparsed emails, cleaning spam), best practices
+ - **Mail Parsing**: Parsing overview and workflow (retrieval, preprocessing, parser selection, matching, parsing, storage), parsers (viewing available parsers, parser information), match criteria (sender, subject, body match), supported backup software (Veeam, Synology, NAKIVO, Boxafe, Panel3, QNAP, Syncovery, 3CX, RDrive, NTFS Auditing), parser execution order, enabling/disabling parsers, re-parsing emails, parsing workflow example, troubleshooting parsing issues, parser limitations, best practices
+ - **Auto-Import Configuration**: Auto-import overview and features, enabling auto-import, import interval configuration (5/15/30/60 minutes), batch size explanation, how auto-import works (timer, check settings, authenticate, fetch, parse, auto-approve, move, log, persist, wait), auto-approval logic and conditions, when auto-approval fails, manual import (triggering, batch size 1-50), import settings summary table, monitoring import activity (audit log, inbox page, jobs/daily jobs), troubleshooting (auto-import not running, emails not auto-approved, import errors), best practices, advanced configuration (disabling temporarily, EML retention, high-volume environments)
+
### Added
- Added comprehensive documentation system for user onboarding and reference:
- **Documentation Blueprint**: New `/documentation` route with dedicated blueprint (doc_bp)