Getting Started with the Mail Server
Access and administer the DramWell Stalwart mail server — create domains, provision mailboxes, configure DNS, and manage distribution lists.
Getting Started with the Mail Server
The DramWell mail server runs Stalwart Mail Server on a self-hosted VPS behind nginx with automatic TLS via ACME. It powers all transactional and operational email for every DramWell vertical — from booking confirmations to invoice delivery to internal staff communication. This guide is for DramWell infrastructure staff who need to administer domains, mailboxes, and distribution lists.
End users with a @dramwell.ai mailbox can access their email at mail.dramwell.ai using any IMAP client or the built-in webmail interface.
Prerequisites
- Infrastructure team membership with admin credentials for the mail server
- SSH access to the VPS (see the hosting reference for connection details)
- Basic familiarity with DNS records (MX, SPF, DKIM, DMARC)
- Stalwart admin password from the team password manager
What You Can Do
- JMAP, SMTP, and IMAP — full standards-compliant mail server supporting modern clients and legacy protocols
- Admin panel — web-based management for domains, accounts, and policies at
mail.dramwell.ai/admin - Domain management — add hosted domains with automated DKIM key generation
- Mailbox provisioning — create individual mailboxes with quota controls and alias support
- Distribution lists — manage mailing lists and group addresses for teams and verticals
- Spam protection — per-domain spam filtering, blocklist management, and quarantine review
- TLS and ACME — automatic certificate renewal via Let's Encrypt; no manual cert management required
Infrastructure Overview
| Layer | Detail |
|---|---|
| Mail server | Stalwart v0.15 |
| Container | Docker, managed via Compose |
| Reverse proxy | nginx with ACME TLS termination |
| Persistence | Mounted volume at /opt/stalwart |
| Protocols | JMAP (8080), SMTP (25/587/465), IMAP (143/993) |
| Admin API | REST at /api/principal — Basic auth |
First Steps
1. Access the Admin Panel
Navigate to mail.dramwell.ai/admin and log in with your Stalwart admin credentials. The admin panel gives you a GUI for most common tasks. For bulk operations or automation, use the Stalwart REST API directly (see below).
2. Verify Server Health
On the admin panel home, confirm:
- All services (SMTP, IMAP, JMAP) show green status
- TLS certificates are valid and not within 14 days of expiry
- The message queue length is near zero (a growing queue indicates a delivery issue)
If you need to check the underlying container, SSH into the VPS and run:
docker compose -f /opt/dramwell/docker-compose.yml ps
docker compose -f /opt/dramwell/docker-compose.yml logs stalwart --tail=50
3. Add a New Domain
Go to Domains > Add Domain in the admin panel and enter the domain name (e.g., yourdomain.dramwell.ai). Stalwart will:
- Generate a DKIM keypair automatically
- Display the DNS records you need to add (MX, SPF, DKIM, DMARC)
Add those records at your DNS provider before proceeding. Use Domains > Verify DNS to confirm propagation. Do not create mailboxes until DNS is verified — delivery will fail.
Alternatively, via the REST API:
curl -X POST https://mail.dramwell.ai/api/principal \
-H "Authorization: Basic <base64-admin-creds>" \
-H "Content-Type: application/json" \
-d '{"type":"domain","name":"yourdomain.example.com"}'
4. Create a Mailbox
Go to Accounts > New Account and fill in:
- Username (the local part, e.g.,
firstname.lastname) - Domain (select from your verified domains)
- Display name
- Initial password (user can change on first login)
- Quota in MB (0 for unlimited)
To create via the API:
curl -X POST https://mail.dramwell.ai/api/principal \
-H "Authorization: Basic <base64-admin-creds>" \
-H "Content-Type: application/json" \
-d '{"type":"individual","name":"firstname.lastname@yourdomain.example.com","secrets":["initialpassword"],"quota":5120}'
5. Create a Distribution List
Go to Lists > New List and enter:
- List address (e.g.,
team@dramwell.ai) - Member addresses (individual mailboxes or external addresses)
- Posting permissions (anyone, members only, or admin only)
Distribution lists use the same /api/principal endpoint with "type":"list". To add or remove members after creation, use a PATCH request with the array format:
curl -X PATCH https://mail.dramwell.ai/api/principal/team@dramwell.ai \
-H "Authorization: Basic <base64-admin-creds>" \
-H "Content-Type: application/json" \
-d '[{"action":"addItem","field":"members","value":"newperson@dramwell.ai"}]'
6. Configure DNS for a New Domain
For each new domain, add these DNS records at your registrar or Cloudflare:
| Type | Name | Value |
|---|---|---|
| MX | @ |
mail.dramwell.ai (priority 10) |
| TXT | @ |
v=spf1 mx ~all |
| TXT | dkim._domainkey |
DKIM public key from Stalwart |
| TXT | _dmarc |
v=DMARC1; p=quarantine; rua=mailto:dmarc@dramwell.ai |
After adding records, return to Domains > Verify DNS to confirm all checks pass.
7. Test Mail Flow
Send a test message from the new mailbox to an external address (e.g., a Gmail account) and reply back. Confirm:
- Outbound delivery succeeds (check the message queue — it should clear within seconds)
- DKIM signature is valid (Gmail shows a green lock)
- SPF passes (visible in the email headers)
- Inbound delivery arrives in the correct mailbox
Use mail-tester.com to get a full deliverability score for the domain.
Next Steps
Was this article helpful?