{"id":48713344,"url":"https://github.com/opterius/mail","last_synced_at":"2026-06-10T00:01:19.895Z","repository":{"id":350676356,"uuid":"1207772936","full_name":"opterius/mail","owner":"opterius","description":"Opterius Mail","archived":false,"fork":false,"pushed_at":"2026-05-24T11:58:14.000Z","size":402,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-24T13:13:27.096Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Blade","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/opterius.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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-11T11:35:30.000Z","updated_at":"2026-05-24T11:58:18.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/opterius/mail","commit_stats":null,"previous_names":["opterius/mail"],"tags_count":24,"template":false,"template_full_name":null,"purl":"pkg:github/opterius/mail","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opterius%2Fmail","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opterius%2Fmail/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opterius%2Fmail/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opterius%2Fmail/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/opterius","download_url":"https://codeload.github.com/opterius/mail/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opterius%2Fmail/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34130642,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-09T02:00:06.510Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2026-04-11T15:14:57.467Z","updated_at":"2026-06-10T00:01:19.887Z","avatar_url":"https://github.com/opterius.png","language":"Blade","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Opterius Mail\n\n**Modern open-source webmail.** A fast, lightweight replacement for Roundcube that works with any IMAP/SMTP server.\n\nShips as the default webmail in [Opterius Panel](https://github.com/opterius/panel) but runs independently with Dovecot, Postfix, Courier, Zimbra, Exchange, or any standard mail server.\n\n---\n\n## Features\n\n- **IMAP authentication** — users log in with their real email address and password; no separate user database required\n- **Read, compose, reply, forward** — full message threading support with quoted replies\n- **Folder navigation** — all IMAP folders listed with unread counts\n- **Dark mode** — toggle in user settings, stored per account\n- **Signatures** — per-user plain-text signature appended to compose / reply / forward\n- **Address book** — contact management with autocomplete in compose (To/CC/BCC)\n- **IMAP search** — fast search by subject and sender via `UID SEARCH`\n- **Keyboard shortcuts** — `c` compose, `/` search, `r` reply, `f` forward, `u` back, `Del` delete\n- **Swappable templates** — ship your own UI without touching application code; includes a built-in `minimal` template as an example\n- **Admin panel** — `/admin` with dashboard stats, mail groups with sending limits, outbound and login logs, and global settings\n- **Sending limits** — per-group or global hourly / daily / weekly / monthly caps and per-message recipient limits, enforced before SMTP dispatch\n- **Brute-force protection** — login rate-limited to 5 attempts per minute (webmail and admin)\n\n## Stack\n\n| Layer | Technology |\n|---|---|\n| Backend | Laravel 13 / PHP 8.3+ |\n| Frontend | Alpine.js 3 + Tailwind CSS (CDN) |\n| IMAP | Custom pure-PHP socket client (no ext-imap) |\n| Auth | Custom IMAP guard — no Jetstream / Fortify / Breeze |\n| Database | SQLite (default) or MySQL / MariaDB |\n\n---\n\n## Requirements\n\n- PHP 8.3+ with extensions: `pdo`, `pdo_sqlite` (or `pdo_mysql`), `mbstring`, `openssl`, `sockets`\n- Any IMAP server (Dovecot, Courier, Exchange, Gmail IMAP, …)\n- Any SMTP server on the same credentials as IMAP\n\nNo Node.js, no build step — all frontend assets are loaded from CDN.\n\n---\n\n## Installation\n\n### 1. Clone and install\n\n```bash\ngit clone https://github.com/opterius/mail\ncd mail\ncomposer install --no-dev --optimize-autoloader\n```\n\n### 2. Configure\n\n```bash\ncp .env.example .env\nphp artisan key:generate\n```\n\nOpen `.env` and set your IMAP/SMTP server:\n\n```env\nAPP_URL=https://mail.example.com\nAPP_DEBUG=false\n\nIMAP_HOST=mail.example.com\nIMAP_PORT=993\nIMAP_ENCRYPTION=ssl\nIMAP_VALIDATE_CERT=true\n\nSMTP_HOST=mail.example.com\nSMTP_PORT=587\nSMTP_ENCRYPTION=tls\n```\n\nFor SQLite (zero-config, great for small deployments), no DB changes are needed.\nFor MySQL, also set:\n\n```env\nDB_CONNECTION=mysql\nDB_HOST=127.0.0.1\nDB_PORT=3306\nDB_DATABASE=opterius_mail\nDB_USERNAME=root\nDB_PASSWORD=secret\n```\n\n### 3. Migrate\n\n```bash\nphp artisan migrate --force\n```\n\n### 4. Web server\n\n#### Using the built-in server (dev / testing)\n\n```bash\nphp artisan serve --port=8090\n```\n\n#### Using Nginx + PHP-FPM (production)\n\n```nginx\nserver {\n    listen 443 ssl;\n    server_name mail.example.com;\n\n    root /var/www/opterius-mail/public;\n    index index.php;\n\n    location / {\n        try_files $uri $uri/ /index.php?$query_string;\n    }\n\n    location ~ \\.php$ {\n        fastcgi_pass unix:/run/php/php8.3-fpm.sock;\n        fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;\n        include fastcgi_params;\n    }\n}\n```\n\nSet correct permissions:\n\n```bash\nchown -R www-data:www-data storage bootstrap/cache\nchmod -R 775 storage bootstrap/cache\n```\n\n### 5. First login\n\nOpen your browser and log in with any email address and password that are valid on your IMAP server.\n\n---\n\n## Admin panel\n\nThe admin panel lives at `/admin`. Navigate there to create the first admin account (setup page appears automatically when no admin exists).\n\n### Standalone mode (default — `MAIL_ADMIN=false`)\n\nGives you:\n- Dashboard with send / login statistics\n- Mail groups — assign users to groups and set sending limits\n- Logs — outbound mail and login history (with IPs)\n- Settings — global defaults for sending limits\n\n### Panel-integrated mode (`MAIL_ADMIN=true`)\n\nAdds the full mail server management sidebar:\n- Domains, Accounts, Aliases, Autoresponders\n- Spam rules, DKIM management\n- Mail queue, server logs\n\n\u003e When running alongside **Opterius Panel**, keep `MAIL_ADMIN=false`. The Panel manages server accounts through its own agent — two systems writing to the same config causes conflicts.\n\n---\n\n## Mail groups\n\nGroups let you apply different sending limits to different sets of users.\n\n1. Go to **Admin → Groups** → create a group (e.g. \"Standard\", \"Premium\")\n2. Set limits: emails per hour / day / week / month, max recipients per message\n3. Assign users: **Admin → Logs**, find the user's email, set their group in User Settings\n\nUsers with no group get the global defaults from **Admin → Settings**.\n\n---\n\n## Template system\n\nThe active template is set via `MAIL_UI_TEMPLATE` in `.env`:\n\n```env\nMAIL_UI_TEMPLATE=minimal\n```\n\nTemplates live in `resources/views/templates/{name}/`. Only `layouts/app.blade.php` is required; all other views fall back to the `default` template automatically.\n\nSee [_docs/template-system.md](resources/views/templates/default/) for the full template contract.\n\n---\n\n## Configuration reference\n\n| Variable | Default | Description |\n|---|---|---|\n| `IMAP_HOST` | `127.0.0.1` | IMAP server hostname |\n| `IMAP_PORT` | `993` | IMAP port |\n| `IMAP_ENCRYPTION` | `ssl` | `ssl`, `tls`, or `none` |\n| `IMAP_VALIDATE_CERT` | `false` | Validate TLS certificate |\n| `IMAP_TIMEOUT` | `15` | Connection timeout (seconds) |\n| `SMTP_HOST` | `127.0.0.1` | SMTP server hostname |\n| `SMTP_PORT` | `587` | SMTP port |\n| `SMTP_ENCRYPTION` | `tls` | `tls`, `ssl`, or `none` |\n| `SMTP_VALIDATE_CERT` | `false` | Validate TLS certificate |\n| `MAIL_ADMIN` | `false` | Enable admin panel panel-integrated mode |\n| `MAIL_UI_TEMPLATE` | `default` | Active UI template name |\n\n---\n\n## Upgrading\n\n```bash\ngit pull\ncomposer install --no-dev --optimize-autoloader\nphp artisan migrate --force\nphp artisan view:clear\nphp artisan config:clear\n```\n\n---\n\n## License\n\nOpterius Mail is open-source software licensed under the [GNU Affero General Public License v3.0](LICENSE).\n\nThe AGPL requires that if you run a modified version of Opterius Mail as a network service, you must make the source code of your modified version available to your users.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopterius%2Fmail","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopterius%2Fmail","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopterius%2Fmail/lists"}