{"id":29473023,"url":"https://github.com/s1t5/mail-archiver","last_synced_at":"2026-03-10T13:12:35.997Z","repository":{"id":292531778,"uuid":"978742631","full_name":"s1t5/mail-archiver","owner":"s1t5","description":"Mail-Archiver is a web application for archiving, searching, and exporting emails from multiple IMAP accounts. Featuring folder sync, attachment support, mailbox migration  and a dashboard.","archived":false,"fork":false,"pushed_at":"2025-07-11T10:34:32.000Z","size":1475,"stargazers_count":157,"open_issues_count":13,"forks_count":1,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-07-11T13:26:28.908Z","etag":null,"topics":["archive","archiver","docker-compose","imap","mail"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/s1t5.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-05-06T12:51:29.000Z","updated_at":"2025-07-11T11:40:35.000Z","dependencies_parsed_at":null,"dependency_job_id":"48c4c1de-ef6b-49c4-84b6-ca3a0739008d","html_url":"https://github.com/s1t5/mail-archiver","commit_stats":null,"previous_names":["s1t5/mail-archiver"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/s1t5/mail-archiver","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/s1t5%2Fmail-archiver","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/s1t5%2Fmail-archiver/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/s1t5%2Fmail-archiver/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/s1t5%2Fmail-archiver/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/s1t5","download_url":"https://codeload.github.com/s1t5/mail-archiver/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/s1t5%2Fmail-archiver/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265311695,"owners_count":23745106,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["archive","archiver","docker-compose","imap","mail"],"created_at":"2025-07-14T15:01:45.068Z","updated_at":"2026-03-10T13:12:35.991Z","avatar_url":"https://github.com/s1t5.png","language":"C#","funding_links":["https://www.buymeacoffee.com/s1t5","https://www.paypal.com/ncp/payment/E4HP9BVRYN54N"],"categories":["C# #","C#","Software","C\\#"],"sub_categories":["Archiving and Digital Preservation (DP)"],"readme":"# 📧 Mail-Archiver - Email Archiving System\n\n**A comprehensive solution for archiving, searching, and exporting emails**\n\n\u003cdiv style=\"display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 20px;\"\u003e\n  \u003ca href=\"#\"\u003e\u003cimg src=\"https://img.shields.io/badge/Docker-2CA5E0?style=for-the-badge\u0026logo=docker\u0026logoColor=white\" alt=\"Docker\"\u003e\u003c/a\u003e\n  \u003ca href=\"#\"\u003e\u003cimg src=\"https://img.shields.io/badge/.NET-512BD4?style=for-the-badge\u0026logo=dotnet\u0026logoColor=white\" alt=\".NET\"\u003e\u003c/a\u003e\n  \u003ca href=\"#\"\u003e\u003cimg src=\"https://img.shields.io/badge/PostgreSQL-316192?style=for-the-badge\u0026logo=postgresql\u0026logoColor=white\" alt=\"PostgreSQL\"\u003e\u003c/a\u003e\n  \u003ca href=\"#\"\u003e\u003cimg src=\"https://img.shields.io/badge/Bootstrap-563D7C?style=for-the-badge\u0026logo=bootstrap\u0026logoColor=white\" alt=\"Bootstrap\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/s1t5/mail-archiver\"\u003e\u003cimg src=\"https://img.shields.io/github/stars/s1t5/mail-archiver?style=for-the-badge\u0026logo=github\" alt=\"GitHub Stars\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://www.buymeacoffee.com/s1t5\" target=\"_blank\"\u003e\u003cimg src=\"https://img.shields.io/badge/Buy%20Me%20a%20Coffee-s1t5-FFDD00?style=for-the-badge\u0026logo=buy-me-a-coffee\u0026logoColor=black\" alt=\"Buy Me a Coffee\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://www.paypal.com/ncp/payment/E4HP9BVRYN54N\" target=\"_blank\"\u003e\u003cimg src=\"https://img.shields.io/badge/PayPal-Donate-00457C?style=for-the-badge\u0026logo=paypal\u0026logoColor=white\" alt=\"PayPal Donate\"\u003e\u003c/a\u003e\n\u003c/div\u003e\n\n## ✨ Key Features\n\n### 📌 Core Features\n- Automated archiving of incoming and outgoing emails from multiple accounts\n- Storage of email content and attachments with scheduled synchronization\n- Mobile and desktop optimized, multilingual responsive UI with dark mode\n- OpenID Connect (OIDC) for integration of external authentication services ([OIDC Implementation Guide](doc/OIDC_Implementation.md))\n\n### 🔍 Search \u0026 Access\n- Advanced search across all archived emails with filtering options\n- Preview emails with attachment list\n- Export entire mail accounts as mbox files or zipped EML archives\n- Export selected individual emails or email batches\n\n### 👥 User Management\n- Multi-user support with account-specific permissions\n- Dashboard with statistics, storage monitoring, and sender analysis\n- Comprehensive access logging with detailed activity tracking of user activities (Access, Export, Deletion, Restore and many more) - see [Access Logging Guide](doc/Logs.md) for details\n\n### 🧩 Email Provider Support\n- **IMAP**: Traditional IMAP accounts with full synchronization capabilities\n- **M365**: Microsoft 365 mail accounts via Microsoft Graph API ([Setup Guide](doc/AZURE_APP_REGISTRATION_M365.md))\n- **IMPORT**: Import-only accounts for migrating existing email archives\n\n### 📥 Import \u0026 Restore Functions\n- MBox Import and EML Import (ZIP files with folder structure support)\n- Restore selected emails or entire mailboxes to destination mailboxes\n\n### 🗑️ Retention Policies\n- Configure automatic deletion of archived emails from mailserver after specified days ([Retention Policies Documentation](doc/RetentionPolicies.md))\n- Set retention period per email account (e.g., 30, 90, or 365 days)\n- **Local Archive Retention**: Configure separate retention period for local archive\n\n## 📚 Documentation\n\nFor detailed documentation on installation, configuration, and usage, please refer to the [Documentation Index](doc/Index.md). Please note that the documentation is still fresh and is continuously being expanded.\n\n## 🖼️ Screenshots\n\n### Dashboard\n![Mail-Archiver Dashboard](https://github.com/s1t5/mail-archiver/blob/main/Screenshots/dashboard.jpg?raw=true)\n\n### Archive\n![Mail-Archiver Archive](https://github.com/s1t5/mail-archiver/blob/main/Screenshots/archive.jpg?raw=true)\n\n### Email Details\n![Mail-Archiver Mail](https://github.com/s1t5/mail-archiver/blob/main/Screenshots/details.jpg?raw=true)\n\n## 🚀 Quick Start\n\n### Prerequisites\n- [Docker](https://www.docker.com/products/docker-desktop)\n- [Docker Compose](https://docs.docker.com/compose/install/)\n\n### 🛠️ Installation\n\n1. Install the prerequisites on your system\n\n2. Create a `docker-compose.yml` file \n```yaml\nservices:\n  mailarchive-app:\n    image: s1t5/mailarchiver:latest\n    restart: always\n    environment:\n      # Database Connection\n      - ConnectionStrings__DefaultConnection=Host=postgres;Database=MailArchiver;Username=mailuser;Password=masterkey;\n\n      # Authentication Settings\n      - Authentication__Username=admin\n      - Authentication__Password=secure123!\n\n      # TimeZone Settings\n      - TimeZone__DisplayTimeZoneId=Etc/UCT\n    ports:\n      - \"5000:5000\"\n    networks:\n      - postgres\n    volumes:\n      - ./data-protection-keys:/app/DataProtection-Keys\n    depends_on:\n      postgres:\n        condition: service_healthy\n\n\n  postgres:\n    image: postgres:17-alpine\n    restart: always\n    environment:\n      POSTGRES_DB: MailArchiver\n      POSTGRES_USER: mailuser\n      POSTGRES_PASSWORD: masterkey\n    volumes:\n      - ./postgres-data:/var/lib/postgresql/data\n    networks:\n      - postgres\n    healthcheck:\n      test: [\"CMD-SHELL\", \"pg_isready -U mailuser -d MailArchiver\"]\n      interval: 10s\n      timeout: 5s\n      retries: 5\n      start_period: 10s\n\nnetworks:\n  postgres:\n```\n\n3. Edit the database configuration in the `docker-compose.yml` and set a secure password in the `POSTGRES_PASSWORD` variable and the `ConnectionString`.\n\n4. Definie a `Authentication__Username` and `Authentication__Password` which is used for the admin user.\n\n5. Adjust the `TimeZone__DisplayTimeZoneId` environment variable to match your preferred timezone (default is \"Etc/UCT\"). You can use any IANA timezone identifier (e.g., \"Europe/Berlin\", \"Asia/Tokyo\").\n\n6. Configure a reverse proxy of your choice with https to secure access to the application. \n\n\u003e ⚠️ **Attention**\n\u003e The application itself does not provide encrypted access via https! It must be set up via a reverse proxy! Moreover the application is not build for public internet access!\n\n7. Initial start of the containers:\n```bash\ndocker compose up -d\n```\n\n8. Restart containers:\n```bash\ndocker compose restart\n```\n\n9. Access the application in your prefered browser.\n\n10. Login with your defined credentials and add your first email account:\n- Navigate to \"Email Accounts\" section\n- Click \"New Account\"\n- Enter your server details and credentials\n- Save and start archiving!\n- If you want, create other users and assign accounts.\n\n## 🔐 Security Notes\n- Use strong passwords and change default credentials\n- Consider implementing HTTPS with a reverse proxy in production\n- Regular backups of the PostgreSQL database recommended (see [Backup \u0026 Restore Guide](doc/BackupRestore.md) for detailed instructions)\n\n## ⚙️ Advanced Setup\nFor a complete list of all configuration options, please refer to the [Setup Guide](doc/Setup.md).\n\n\n## 📋 Technical Details\n\n### Architecture\n- ASP.NET Core 10 MVC application\n- PostgreSQL database for email storage\n- MailKit library for IMAP communication\n- Microsoft Graph API for M365 email access\n- Background service for email synchronization\n- Bootstrap 5 and Chart.js for frontend\n\n## 🤝 Contributing\n\nWe welcome contributions from the community! Please read our [Contributing Guide](CONTRIBUTING.md) for detailed information about how to contribute to Mail Archiver.\n\nFor code changes by third parties, please coordinate with us via email at mail@s1t5.dev before making any changes.\n\nYou can also:\n- Open an Issue for bug reports or feature requests\n- Submit a Pull Request for improvements\n- Help improve documentation\n\n## 💖 Support the Project\nIf you find this project useful and would like to support its continued development, you can buy me a coffee! Your support helps me dedicate more time and resources to improving the application and adding new features. While financial support is not required, it is greatly appreciated and helps ensure the project's ongoing maintenance and enhancement.\n\n\u003ca href=\"https://www.buymeacoffee.com/s1t5\" target=\"_blank\"\u003e\u003cimg src=\"https://img.shields.io/badge/Buy%20Me%20a%20Coffee-s1t5-FFDD00?style=for-the-badge\u0026logo=buy-me-a-coffee\u0026logoColor=black\" alt=\"Buy Me a Coffee\"\u003e\u003c/a\u003e\n\u003ca href=\"https://www.paypal.com/ncp/payment/E4HP9BVRYN54N\" target=\"_blank\"\u003e\u003cimg src=\"https://img.shields.io/badge/PayPal-Donate-00457C?style=for-the-badge\u0026logo=paypal\u0026logoColor=white\" alt=\"PayPal Donate\"\u003e\u003c/a\u003e\n\n---\n\n📄 *License: GNU GENERAL PUBLIC LICENSE Version 3 (see LICENSE file)*\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fs1t5%2Fmail-archiver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fs1t5%2Fmail-archiver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fs1t5%2Fmail-archiver/lists"}