Skill: luigi08001/outlook-to-gmail (version 1.2.0)

--- name: outlook-to-gmail description: "Migrate email, contacts, and calendars from Microsoft Outlook (Office 365 / Exchange / PST) to Google Workspace (Gmail). Use when a user asks to migrate from Outlook to Gmail, transfer emails from Microsoft 365 to Google Workspace, import PST files to Gmail, switch from Exchange to Gmail, or plan an Office 365 to Google Workspace migration. Covers: single-user migrations, bulk/org-wide migrations, PST imports, calendar + contacts transfer, DNS/MX cutover, and post-migration validation." --- # Outlook to Gmail Migration ## Migration Paths Assess the source environment first: | Source | Best Method | Scope | |--------|------------|-------| | Office 365 / Exchange Online | Google Data Migration Service (Admin Console) | Org-wide, bulk | | On-prem Exchange | GWMMO tool or IMAP migration | Per-user or bulk | | PST files | GWMMO tool or Outlook IMAP bridge | Per-user | | Outlook.com (personal) | IMAP migration in Admin Console | Per-user | ## Pre-Migration Checklist Run through this with the client before touching anything: 1. **Inventory** — Number of users, total mailbox sizes, largest mailbox, shared mailboxes, distribution lists 2. **Google Workspace plan** — Confirm active subscription, verify admin access (Super Admin required) 3. **Source admin access** — Global Admin (O365) or Exchange Admin + app passwords 4. **DNS access** — Whoever manages MX records (registrar, Cloudflare, etc.) 5. **Data scope** — Email only? +Contacts? +Calendars? +Drive files? 6. **Cutover window** — When to switch MX records (weekend recommended) 7. **Client communication** — Draft email to users about the switch, new login instructions 8. **Retention** — Keep source mailboxes active 30 days post-migration as safety net ## Method 1: Google Data Migration Service (Recommended for O365) Best for org-wide migrations from Exchange Online / Office 365. ### Setup 1. Google Admin Console → **Data** → **Data import & export** → **Data Migration (New)** 2. Select **Microsoft Office 365** as source 3. Click **Connect** → sign in as Microsoft Global Admin → grant permissions 4. Select what to migrate: Email, Contacts, Calendars 5. Choose date range filter (optional — migrate only last N months to save time) ### Execution 1. Add users to migrate (CSV upload for bulk: `source_email,destination_email`) 2. Start migration — Google handles delta sync automatically 3. Monitor progress in Admin Console → shows per-user status 4. Migration runs in background — users can keep using Outlook during this phase ### CSV Format ```csv source_email,destination_email [REDACTED_SECRET],[REDACTED_SECRET] [REDACTED_SECRET],[REDACTED_SECRET] ``` See `references/csv-template.md` for full template with notes. ## Method 2: GWMMO Tool (PST / Outlook Profile) Best for individual users or PST file imports. 1. Download GWMMO: https://tools.google.com/dlpage/gsmmo/ 2. Install on machine with Outlook profile or PST access 3. Sign in with Google Workspace account 4. Select Outlook profile or browse to PST file 5. Choose data: Email, Contacts, Calendars, Junk 6. Start import — progress shown in tool **Limitations**: Runs per-user, requires desktop access, Windows only. ## Method 3: IMAP Bridge (Manual / Small Scale) For personal Outlook.com accounts or when other methods fail: 1. Enable IMAP in Gmail: Settings → Forwarding and POP/IMAP → Enable IMAP 2. In Outlook desktop, add Gmail as IMAP account 3. Drag-and-drop folders from Outlook mailbox to Gmail IMAP folders 4. Slow but works for any IMAP-capable source ## DNS / MX Cutover After migration data is transferred: 1. **Verify domain** in Google Admin Console (TXT record) 2. **Update MX records** to Google: ``` Priority Host 1 ASPMX.L.GOOGLE.COM 5 ALT1.ASPMX.L.GOOGLE.COM 5 ALT2.ASPMX.L.GOOGLE.COM 10 ALT3.ASPMX.L.GOOGLE.COM 10 ALT4.ASPMX.L.GOOGLE.COM ``` 3. **Set SPF**: `v=spf1 include:_spf.google.com ~all` 4. **Set DKIM**: Admin Console → Apps → Gmail → Authenticate email → Generate DKIM 5. **Set DMARC**: `v=DMARC1; p=none; rua=mailto:[REDACTED_SECRET]` (start with `p=none`, tighten later) 6. **TTL**: Lower TTL to 300 before cutover, restore to 3600 after 48h See `references/dns-records.md` for copy-paste DNS templates. ## Post-Migration Validation Run these checks for every user: - [ ] Email receiving on Gmail (send test from external) - [ ] Historical emails present (spot-check oldest + newest) - [ ] Folders/labels mapped correctly - [ ] Contacts imported (check count) - [ ] Calendar events present (check recurring events specifically) - [ ] Shared mailboxes / groups recreated as Google Groups - [ ] Signatures set up in Gmail - [ ] Mobile devices re-configured (Gmail app or IMAP) - [ ] Outlook desktop disconnected or reconfigured See `references/validation-checklist.md` for printable per-user checklist. ## Common Issues | Issue | Fix | |-------|-----| | Migration stuck at 0% | Re-authorize source admin credentials | | Missing folders | Google flattens deep nesting → becomes labels | | Calendar recurring events broken | Re-create manually (known Google limitation with complex recurrences) | | Contacts duplicated | Use Google Contacts merge duplicates tool | | Large attachments missing | Items >25MB not migrated — export separately | | Shared mailbox not migrating | Convert to Google Group or shared drive | | MX propagation slow | Check TTL, use `dig MX domain.com` to verify | ## Deliverables Template For client-facing migration projects, prepare: 1. **Migration Plan** — Timeline, phases, user batches, rollback plan 2. **User Communication** — Email template announcing the switch 3. **Admin Runbook** — Step-by-step for the migration operator 4. **Validation Report** — Per-user sign-off checklist See `references/client-templates.md` for ready-to-use templates.

path: references/client-templates.md
content: # Client-Facing Templates

## Migration Plan (Email to Client)

```
Subject: Email Migration Plan — Outlook → Google Workspace

Hi [Client],

Here's the migration plan for moving your team from Outlook/Office 365 to Google Workspace.

**Timeline:**
- Phase 1 (Day 1-2): Account setup + data migration start
- Phase 2 (Day 3-5): Migration running (users keep using Outlook)
- Phase 3 (Day 6): MX cutover + DNS changes (weekend)
- Phase 4 (Day 7-10): Validation + user support

**What users need to do:**
- Nothing during Phase 1-2 (migration runs in background)
- Phase 3: Switch to Gmail (we'll send instructions)
- Report any missing emails within 5 business days

**What we handle:**
- All technical migration + DNS changes
- Per-user validation
- Support for first 2 weeks post-migration

**Risks & mitigations:**
- Old emails: We keep Outlook active for 30 days as backup
- Large attachments (>25MB): Migrated separately to Drive
- Calendar recurring events: Manual verification for complex patterns

Let me know if you'd like to adjust the timeline.

Best,
[Name]
```

## User Announcement Template

```
Subject: We're moving to Gmail — Here's what you need to know

Hi team,

Starting [DATE], we're switching from Outlook to Gmail (Google Workspace).

**What's happening:**
- Your emails, contacts, and calendar are being migrated automatically
- On [CUTOVER DATE], new emails will arrive in Gmail instead of Outlook

**What you need to do:**
1. Go to https://mail.google.com and sign in with your work email
2. Your password is: [temporary password / SSO instructions]
3. Check that your emails and calendar look correct
4. Set up the Gmail app on your phone (instructions attached)

**Your Outlook will still work** for reading old emails for 30 days. But please start using Gmail for all new emails from [CUTOVER DATE].

**Need help?** Reply to this email or contact [support contact].

Thanks,
[Admin name]
```

## Migration Report Template

```
# Migration Report — [Client Name]

**Date:** [date]
**Migrated by:** [name]
**Method:** Google Data Migration Service / GWMMO / IMAP

## Summary
- Users migrated: X / Y total
- Data migrated: Email ✅ | Contacts ✅ | Calendar ✅
- Total data volume: ~X GB
- Migration duration: X days
- MX cutover completed: [date + time]

## Per-User Status
| User | Email | Contacts | Calendar | Validated |
|------|-------|----------|----------|-----------|
| [REDACTED_SECRET] | ✅ | ✅ | ✅ | ✅ |
| [REDACTED_SECRET] | ✅ | ✅ | ⚠️ recurring | ✅ |

## Issues Encountered
1. [Issue + resolution]

## Post-Migration Tasks
- [ ] Monitor MX propagation (48h)
- [ ] Tighten DMARC policy (2 weeks)
- [ ] Decommission Outlook accounts (30 days)
- [ ] Final sign-off from client
```


path: references/csv-template.md
content: # CSV Template — Bulk User Migration

## Format for Google Data Migration Service

```csv
source_email,destination_email
[REDACTED_SECRET],[REDACTED_SECRET]
[REDACTED_SECRET],[REDACTED_SECRET]
```

## Notes

- Source email = Microsoft 365 UPN (usually `[REDACTED_SECRET]` or `[REDACTED_SECRET]`)
- Destination email = Google Workspace email
- No headers required but recommended for clarity
- Max 100 users per batch (Google recommendation for monitoring)
- Shared mailboxes: migrate to a Google Group or dedicated GW account

## Generating the CSV

From Microsoft 365 Admin Center:
1. Users → Active users → Export
2. Edit CSV to keep only `User principal name` column
3. Add `destination_email` column with Google Workspace addresses

From PowerShell:
```powershell
Get-Mailbox -ResultSize Unlimited | Select-Object UserPrincipalName | Export-Csv users.csv -NoTypeInformation
```

From Google Admin (to verify destination accounts exist):
```
Admin Console → Directory → Users → Download users
```


path: references/dns-records.md
content: # DNS Records — Google Workspace

Copy-paste templates for MX cutover.

## MX Records

Remove ALL existing MX records, then add:

| Type | Host | Value | Priority | TTL |
|------|------|-------|----------|-----|
| MX | @ | ASPMX.L.GOOGLE.COM | 1 | 3600 |
| MX | @ | ALT1.ASPMX.L.GOOGLE.COM | 5 | 3600 |
| MX | @ | ALT2.ASPMX.L.GOOGLE.COM | 5 | 3600 |
| MX | @ | ALT3.ASPMX.L.GOOGLE.COM | 10 | 3600 |
| MX | @ | ALT4.ASPMX.L.GOOGLE.COM | 10 | 3600 |

## SPF Record

```
Type: TXT
Host: @
Value: v=spf1 include:_spf.google.com ~all
TTL: 3600
```

If client also sends from other services (HubSpot, Mailchimp, etc.), combine:
```
v=spf1 include:_spf.google.com include:mail.hubspot.net include:servers.mcsv.net ~all
```

## DKIM Record

Generated in Admin Console → Apps → Gmail → Authenticate email.
Typically a TXT record at `google._domainkey.domain.com`.

## DMARC Record

Start permissive, tighten over 2-4 weeks:

```
# Phase 1: Monitor only
Type: TXT
Host: _dmarc
Value: v=DMARC1; p=none; rua=mailto:[REDACTED_SECRET]

# Phase 2: Quarantine (after 2 weeks)
Value: v=DMARC1; p=quarantine; pct=25; rua=mailto:[REDACTED_SECRET]

# Phase 3: Reject (after 4 weeks)
Value: v=DMARC1; p=reject; rua=mailto:[REDACTED_SECRET]
```

## Autodiscover / Autoconfig (Optional)

To help Outlook clients auto-configure:
```
Type: CNAME
Host: autodiscover
Value: autodiscover.outlook.com
TTL: 3600
```

Remove this after migration if no longer using Exchange.

## Verification Commands

```bash
# Check MX
dig MX domain.com +short

# Check SPF
dig TXT domain.com +short | grep spf

# Check DKIM
dig TXT google._domainkey.domain.com +short

# Check DMARC
dig TXT _dmarc.domain.com +short

# Check propagation worldwide
# https://dnschecker.org
```


path: references/validation-checklist.md
content: # Post-Migration Validation Checklist

Per-user checklist. Copy for each migrated user.

## User: _______________  |  Date: _______________

### Email
- [ ] Can receive new emails on Gmail (test from external address)
- [ ] Can send emails from Gmail (check From: address is correct)
- [ ] Historical emails present — spot check:
  - [ ] Oldest email visible
  - [ ] Email from 6 months ago visible
  - [ ] Recent email (last week) visible
- [ ] Folder structure → Labels mapping correct
- [ ] Attachments accessible on migrated emails
- [ ] No items >25MB missing (check source for large items)

### Contacts
- [ ] Contacts imported to Google Contacts
- [ ] Contact count matches source (±5% acceptable)
- [ ] Contact groups / distribution lists recreated
- [ ] No duplicate contacts (run Google merge if needed)

### Calendar
- [ ] Past events visible
- [ ] Future events present
- [ ] Recurring events intact (check weekly + monthly patterns)
- [ ] Shared calendars re-shared
- [ ] Meeting room bookings transferred (if applicable)

### Configuration
- [ ] Email signature set up
- [ ] Vacation responder configured (if needed)
- [ ] Filters / rules recreated (manual — no auto migration)
- [ ] Delegate access re-configured

### Devices
- [ ] Desktop: Gmail web or Outlook reconfigured
- [ ] Mobile: Gmail app or mail app reconfigured
- [ ] Tablet (if applicable)

### Sign-off
- [ ] User confirms migration complete
- [ ] User trained on Gmail basics (if needed)

**Notes:**
_________________________________________
_________________________________________


path: scripts/pre-migration-audit.sh
content: #!/usr/bin/env bash
# Pre-migration audit — Check DNS, MX, SPF, DKIM, DMARC for a domain
# Usage: pre-migration-audit.sh <domain>

set -euo pipefail

DOMAIN="${1:?Usage: pre-migration-audit.sh <domain>}"

echo "=========================================="
echo "Pre-Migration DNS Audit: $DOMAIN"
echo "=========================================="
echo ""

echo "--- Current MX Records ---"
dig MX "$DOMAIN" +short 2>/dev/null || echo "(dig not available, try: nslookup -type=MX $DOMAIN)"
echo ""

echo "--- Current SPF ---"
dig TXT "$DOMAIN" +short 2>/dev/null | grep -i "spf" || echo "No SPF record found"
echo ""

echo "--- Current DMARC ---"
dig TXT "_dmarc.$DOMAIN" +short 2>/dev/null || echo "No DMARC record found"
echo ""

echo "--- Current DKIM (common selectors) ---"
for sel in google default selector1 selector2 s1 s2; do
  result=$(dig TXT "${sel}._domainkey.$DOMAIN" +short 2>/dev/null)
  if [ -n "$result" ]; then
    echo "  $sel._domainkey: $result"
  fi
done
echo ""

echo "--- Autodiscover ---"
dig CNAME "autodiscover.$DOMAIN" +short 2>/dev/null || echo "No autodiscover CNAME"
echo ""

echo "--- Assessment ---"
MX=$(dig MX "$DOMAIN" +short 2>/dev/null)
if echo "$MX" | grep -qi "google\|gmail\|aspmx"; then
  echo "✅ MX already points to Google"
elif echo "$MX" | grep -qi "outlook\|microsoft\|protection.outlook"; then
  echo "⚠️  MX points to Microsoft — needs cutover"
else
  echo "ℹ️  MX points to: $(echo "$MX" | head -1)"
fi

SPF=$(dig TXT "$DOMAIN" +short 2>/dev/null | grep -i "spf" || true)
if echo "$SPF" | grep -qi "google"; then
  echo "✅ SPF includes Google"
else
  echo "⚠️  SPF does not include Google — needs update"
fi

echo ""
echo "Done. Review output and plan DNS changes accordingly."


Security scan verdicts — ClawScan: clean | static analysis:  | VirusTotal: suspicious | SkillSpector: suspicious (MEDIUM)