mail-archiver

mail-archiver

Docker app from Emphyrio's Repository

Overview

Mail Archiver is a web-based solution for archiving, searching, and exporting emails. All emails and attachments are stored in a Postgresql database. Also supports OpenID Connect (OIDC) for Single Sign On. The documentation contains examples for Authelia and Microsoft Entra ID.

Requirements

PostgreSQL database container (e.g. postgresql17).

Runtime arguments

Web UI
http://[IP]:[PORT:5000]
Network
bridge
Shell
sh
Privileged
false

Template configuration

Web UI PortPorttcp

Web interface port

Target
5000
Default
5000
Value
5000
Folder for Data Protection KeysPathrw

Folder for storing data protection keys

Target
/app/DataProtection-Keys
Default
/mnt/user/appdata/mailarchiver/data-protection-keys
Value
/mnt/user/appdata/mailarchiver/data-protection-keys
Database Connection StringVariable

PostgreSQL connection string. Format: Host=postgres-ip-address;Port=5432;Database=dbname;Username=user;Password=pass; Replace 'postgres' with your PostgreSQL IP address (on bridge network) or container name (on custom network) and update credentials as needed.

Target
ConnectionStrings__DefaultConnection
Default
Host=postgres-ip-address;Port=5432;Database=MailArchiver;Username=mailuser;Password=masterkey;
Value
Host=postgres;Port=5432;Database=MailArchiver;Username=mailuser;Password=masterkey;
Admin UsernameVariable

The username for the admin account.

Target
Authentication__Username
Default
admin
Value
admin
Admin PasswordVariable

The password for the admin account.

Target
Authentication__Password
Default
secure123!
Value
secure123!
Display Time ZoneVariable

The time zone used for displaying email timestamps in the UI. Use any TZ identifier from: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones

Target
TimeZone__DisplayTimeZoneId
Default
Etc/UTC
Value
Etc/UTC
OAuth EnabledVariable

Set to true to enable OIDC authentication.

Target
OAuth__Enabled
Default
false
Value
false
OAuth AuthorityVariable

The OIDC authority/issuer URL of your identity provider (e.g. for Authelia: https://auth.example.com/). Note the trailing slash at the end.

Target
OAuth__Authority
Default
https://auth.example.com/
Value
https://auth.example.com/
OAuth Client IdVariable

OIDC client ID configured in your identity provider (e.g. Authelia) for Mail Archiver.

Target
OAuth__ClientId
Default
mail-archiver
Value
mail-archiver
OAuth Client SecretVariable

Client secret for the OIDC client.

Target
OAuth__ClientSecret
OAuth Disable Password LoginVariable

Set to true to disable traditional username/password login and enforce OAuth-only authentication.

Target
OAuth__DisablePasswordLogin
Default
false
Value
false
OAuth Auto Approve UsersVariable

If set to true, new OIDC users are automatically approved. Enable if you manage your users exclusively in your OIDC provider.

Target
OAuth__AutoApproveUsers
Default
false
Value
false
OAuth Client Scopes 0Variable

Scope #1 as requested from the identity provider.

Target
OAuth__ClientScopes__0
Default
openid
Value
openid
OAuth Client Scopes 1Variable

Scope #2 as requested from the identity provider.

Target
OAuth__ClientScopes__1
Default
profile
Value
profile
OAuth Client Scopes 2Variable

Scope #3 as requested from the identity provider.

Target
OAuth__ClientScopes__2
Default
email
Value
email
Session Timeout (Minutes)Variable

The session timeout in minutes.

Target
Authentication__SessionTimeoutMinutes
Default
60
Value
60
Cookie NameVariable

The name of the authentication cookie.

Target
Authentication__CookieName
Default
MailArchiverAuth
Value
MailArchiverAuth
Mail Sync Interval (Minutes)Variable

The interval in minutes between email synchronization.

Target
MailSync__IntervalMinutes
Default
15
Value
15
Mail Sync Timeout (Minutes)Variable

The timeout for the sync operation in minutes.

Target
MailSync__TimeoutMinutes
Default
60
Value
60
Connection Timeout (Seconds)Variable

The connection timeout for IMAP connections in seconds.

Target
MailSync__ConnectionTimeoutSeconds
Default
180
Value
180
Command Timeout (Seconds)Variable

The command timeout for IMAP commands in seconds.

Target
MailSync__CommandTimeoutSeconds
Default
300
Value
300
Always Force Full SyncVariable

Whether to always force a full sync (true/false).

Target
MailSync__AlwaysForceFullSync
Default
false
Value
false
Ignore Self-Signed CertificatesVariable

Whether to ignore self-signed certificates (true/false).

Target
MailSync__IgnoreSelfSignedCert
Default
false
Value
false
Batch Restore Async ThresholdVariable

The number of emails that triggers async processing.

Target
BatchRestore__AsyncThreshold
Default
50
Value
50
Max Sync EmailsVariable

The maximum number of emails for sync processing.

Target
BatchRestore__MaxSyncEmails
Default
150
Value
150
Max Async EmailsVariable

The maximum number of emails for async processing.

Target
BatchRestore__MaxAsyncEmails
Default
50000
Value
50000
Batch Restore Session Timeout (Minutes)Variable

The session timeout for batch restore in minutes.

Target
BatchRestore__SessionTimeoutMinutes
Default
30
Value
30
Default Batch SizeVariable

The default batch size for email operations.

Target
BatchRestore__DefaultBatchSize
Default
50
Value
50
Batch Operation SizeVariable

The batch size for email operations.

Target
BatchOperation__BatchSize
Default
50
Value
50
Pause Between Emails (ms)Variable

The pause between individual emails in milliseconds.

Target
BatchOperation__PauseBetweenEmailsMs
Default
50
Value
50
Pause Between Batches (ms)Variable

The pause between batches in milliseconds.

Target
BatchOperation__PauseBetweenBatchesMs
Default
250
Value
250
Max Selectable EmailsVariable

The maximum number of emails that can be selected at once.

Target
Selection__MaxSelectableEmails
Default
250
Value
250
Database Command TimeoutVariable

The timeout for database commands in seconds.

Target
Npgsql__CommandTimeout
Default
900
Value
900
Max Upload File Size (GB)Variable

The maximum file size for uploads in GB.

Target
Upload__MaxFileSizeGB
Default
10
Value
10
Upload Keep Alive Timeout (Hours)Variable

The keep alive timeout for uploads in hours.

Target
Upload__KeepAliveTimeoutHours
Default
4
Value
4
Upload Request Headers Timeout (Hours)Variable

The timeout for request headers in hours.

Target
Upload__RequestHeadersTimeoutHours
Default
2
Value
2

Categories

Download Statistics

451,662
Total Downloads
96,516
This Month
72,399
Avg / Month

Total Downloads Over Time

Loading chart...

Details

Repository
s1t5/mailarchiver
Last Updated2026-04-14
First Seen2025-10-16

Run mail-archiver on Unraid.

mail-archiver is listed in Community Apps for Unraid OS. Explore Unraid to build a flexible home server, NAS, or homelab.