// SPDX-License-Identifier: CC-BY-SA-4.0
// SPDX-FileCopyrightText: 2025 Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk>

= Email Setup for axel-protocol.org
:toc: left
:toclevels: 3
:icons: font

This guide explains how to set up professional email addresses for AXEL Protocol without running your own mail server.

== Required Email Addresses

For professional standards organization, you need:

* `info@axel-protocol.org` - General inquiries
* `security@axel-protocol.org` - Security vulnerability reports
* `conduct@axel-protocol.org` - Code of Conduct violations
* `membership@axel-protocol.org` - Membership/sponsorship inquiries
* `tsc@axel-protocol.org` - Technical Steering Committee (private)

== Option 1: Cloudflare Email Routing (Recommended - FREE)

*Best for*: Forwarding to personal email, no cost, minimal setup

=== Step 1: Enable Email Routing

[source,bash]
----
# 1. Go to Cloudflare Dashboard > Email > Email Routing
# 2. Click "Get started"
# 3. Add destination address (your personal email)
# 4. Verify destination (Cloudflare sends verification email)
----

=== Step 2: Add DNS Records (Auto-configured)

Cloudflare automatically adds:

[source,dns]
----
axel-protocol.org.  MX  10  isaac.mx.cloudflare.net.
axel-protocol.org.  MX  20  linda.mx.cloudflare.net.
axel-protocol.org.  MX  50  amir.mx.cloudflare.net.
axel-protocol.org.  TXT  "v=spf1 include:_spf.mx.cloudflare.net ~all"
----

=== Step 3: Create Forwarding Rules

[source,bash]
----
# In Cloudflare Email Routing dashboard:

# Rule 1: info@axel-protocol.org → j.d.a.jewell@open.ac.uk
# Rule 2: security@axel-protocol.org → j.d.a.jewell@open.ac.uk
# Rule 3: conduct@axel-protocol.org → j.d.a.jewell@open.ac.uk
# Rule 4: membership@axel-protocol.org → j.d.a.jewell@open.ac.uk
# Rule 5: tsc@axel-protocol.org → j.d.a.jewell@open.ac.uk

# Later, change to dedicated inboxes or mailing lists
----

*Catch-all* (optional): Forward all other addresses to `info@`

=== Step 4: Test

[source,bash]
----
# Send test email
echo "Test email" | mail -s "Testing AXEL email" info@axel-protocol.org

# Check your personal inbox (should arrive in ~1 minute)
----

=== Pros/Cons

*Pros*:
* ✅ Free forever
* ✅ Unlimited forwarding
* ✅ No server maintenance
* ✅ DKIM/SPF/DMARC configured automatically

*Cons*:
* ❌ Can't send FROM `@axel-protocol.org` (only receive)
* ❌ No shared inbox (everything goes to your personal email)

---

== Option 2: Google Workspace (Professional)

*Best for*: Sending emails from `@axel-protocol.org`, shared inboxes, professional appearance

*Cost*: $6/user/month (~$72/year for one account)

=== Step 1: Sign Up

[source,bash]
----
# 1. Go to https://workspace.google.com
# 2. Start free trial (14 days)
# 3. Enter domain: axel-protocol.org
# 4. Verify domain ownership (via DNS TXT record)
----

=== Step 2: Add DNS Records

Google provides MX records:

[source,dns]
----
axel-protocol.org.  MX  1   aspmx.l.google.com.
axel-protocol.org.  MX  5   alt1.aspmx.l.google.com.
axel-protocol.org.  MX  5   alt2.aspmx.l.google.com.
axel-protocol.org.  MX  10  alt3.aspmx.l.google.com.
axel-protocol.org.  MX  10  alt4.aspmx.l.google.com.

# SPF record
axel-protocol.org.  TXT  "v=spf1 include:_spf.google.com ~all"

# DKIM record (Google provides specific value)
google._domainkey.axel-protocol.org.  TXT  "v=DKIM1; k=rsa; p=..."
----

=== Step 3: Create Email Accounts

[source,bash]
----
# In Google Workspace Admin:

# Primary account (you):
info@axel-protocol.org (alias → your main account)

# Aliases (free, unlimited):
security@axel-protocol.org → info@
conduct@axel-protocol.org → info@
membership@axel-protocol.org → info@

# Separate account (later, $6/month each):
tsc@axel-protocol.org (shared inbox for TSC)
----

=== Step 4: Configure Sending

In Gmail:

1. Settings > Accounts > Send mail as
2. Add `info@axel-protocol.org`
3. Verify ownership (Google sends confirmation email)
4. Now you can send FROM `info@axel-protocol.org`

=== Pros/Cons

*Pros*:
* ✅ Can send FROM `@axel-protocol.org`
* ✅ Shared inboxes (tsc@, conduct@)
* ✅ Professional appearance
* ✅ 30GB storage per account

*Cons*:
* ❌ Costs $72/year minimum
* ❌ Google has access to emails (privacy concern)

---

== Option 3: Migadu (Privacy-Focused Alternative)

*Best for*: Privacy-focused email hosting, affordable, EU-based

*Cost*: $19/year (Micro plan) or $49/year (Mini plan)

=== Setup

[source,bash]
----
# 1. Go to https://migadu.com
# 2. Sign up for Micro plan ($19/year)
# 3. Add domain: axel-protocol.org
# 4. Configure DNS (Migadu provides records)
# 5. Create mailboxes:
#    - info@axel-protocol.org
#    - security@axel-protocol.org (alias)
#    - conduct@axel-protocol.org (alias)
----

=== DNS Records

[source,dns]
----
axel-protocol.org.  MX  10  aspmx1.migadu.com.
axel-protocol.org.  MX  20  aspmx2.migadu.com.
axel-protocol.org.  TXT  "v=spf1 include:spf.migadu.com ~all"

# DKIM (Migadu provides)
key1._domainkey.axel-protocol.org.  CNAME  key1.axel-protocol.org._domainkey.migadu.com.
----

=== Pros/Cons

*Pros*:
* ✅ Privacy-focused (Swiss company, GDPR-compliant)
* ✅ Can send and receive
* ✅ Cheap ($19/year)
* ✅ Unlimited aliases

*Cons*:
* ❌ Limited storage (Micro: 1GB, Mini: 5GB)
* ❌ Less integration than Google Workspace

---

== Option 4: Forwarding via DNS (ImprovMX - FREE)

*Best for*: Temporary solution before deciding on paid service

[source,bash]
----
# 1. Go to https://improvmx.com
# 2. Add domain: axel-protocol.org
# 3. Add MX records (ImprovMX provides)
# 4. Create aliases:
#    info@axel-protocol.org → j.d.a.jewell@open.ac.uk
----

*Pros*: Free, simple
*Cons*: Can't send FROM `@axel-protocol.org`, limited features

---

== Recommended Setup (Phased)

=== Phase 1 (Now): Cloudflare Email Routing

* Cost: *FREE*
* Setup time: 10 minutes
* Forwards to your personal email
* Good enough until you have founding members

[source,bash]
----
info@axel-protocol.org → j.d.a.jewell@open.ac.uk
security@axel-protocol.org → j.d.a.jewell@open.ac.uk
conduct@axel-protocol.org → j.d.a.jewell@open.ac.uk
membership@axel-protocol.org → j.d.a.jewell@open.ac.uk
----

*Limitation*: You can't SEND from `@axel-protocol.org` (but you can receive)

*Workaround*: Reply from `j.d.a.jewell@open.ac.uk` with signature:
----
Jonathan D.A. Jewell
AXEL Protocol (ASPEC, forming)
axel-protocol.org
----

=== Phase 2 (6 months): Upgrade to Google Workspace or Migadu

Once ASPEC has founding members:

* Upgrade to Google Workspace ($72/year) OR Migadu ($19/year)
* Create proper `info@axel-protocol.org` account
* Set up `tsc@axel-protocol.org` as shared inbox
* Now you can SEND from `@axel-protocol.org` addresses

== Email Signature Template

When replying to inquiries, use this signature:

----
Jonathan D.A. Jewell
Founder, AXEL Protocol
ASPEC (AXEL Standards and Protocol Enforcement Consortium)
https://axel-protocol.org
GitHub: @hyperpolymath
----

Or, if you want more distance:

----
Jonathan D.A. Jewell
ReScript Core Team
AXEL Protocol contributor
https://axel-protocol.org
----

== Mailing Lists (Future)

Once you have founding members, set up mailing lists:

=== Google Groups (Free)

* `announce@axel-protocol.org` - Low-volume announcements
* `discuss@axel-protocol.org` - Technical discussions
* `tsc@axel-protocol.org` - TSC-only (private)

=== Mailman 3 (Self-Hosted)

If you prefer self-hosting:

[source,bash]
----
# Deploy Mailman 3 container
ct run -p 8000:8000 maxking/mailman-web:latest

# Configure lists via web UI
----

*Pros*: Full control, privacy
*Cons*: Maintenance overhead

== Summary

*Immediate action*: Set up Cloudflare Email Routing (free, 10 minutes)
*Later* (when ASPEC formalizes): Upgrade to Google Workspace or Migadu

You'll have professional email addresses from day one, with minimal cost/effort.
