#!/usr/bin/env python3 """Send DR plan v3 — consolidated with expert review responses.""" import smtplib, random, importlib.util from email.mime.text import MIMEText from email.mime.multipart import MIMEMultipart from email.mime.base import MIMEBase from email import encoders SMTP = "mail.germainebrown.com" PORT = 2525 PASS = "Catches.bullets1985" FROM = "shonuff@germainebrown.com" TO = "g@germainebrown.com" def load_list(path, attr): spec = importlib.util.spec_from_file_location("mod", path) mod = importlib.util.module_from_spec(spec) spec.loader.exec_module(mod) return getattr(mod, attr, []) CLOSINGS = load_list("/root/.hermes/references/shonuff-closings.py", "SHONUFF_CLOSINGS") TITLES = load_list("/root/.hermes/references/shonuff-titles.py", "SHONUFF_TITLES") msg = MIMEMultipart("mixed") msg["From"] = FROM msg["To"] = TO msg["Bcc"] = TO msg["Subject"] = "DR Plan v3 — Consolidated with Expert Review Responses" body_html = """
Two DR experts reviewed our documentation. Their findings have been consolidated into a single v3 plan that addresses every point raised. Here's what changed:
| Issue | Old | New |
|---|---|---|
| Failover check interval | Every 5 minutes | Every 30 seconds |
| S3 is single point of failure | One region, admin creds | Two-region, write-only IAM user planned |
| Backup compliance | Standard says daily — not happening | Gap closure plan with P0/P1/P2 priorities |
| Restore runbooks | Generic steps only | Per-server with exact commands |
| Failback protocol | Not documented | 10-step protocol — auto-failback forbidden |
| Tony's Hermes | No documentation | Flagged as P1 — needs DR docs |
Four files in this email:
Also uploaded to S3:
s3://hermes-vps-backups/live/config/server-dr-plans-v3.md
{body_html.replace(chr(10), '
')}
{closing}
{sig}" html_part = MIMEText(html_full, "html") text_alt.attach(text_part) text_alt.attach(html_part) msg.attach(text_alt) # Redacted version redacted = MIMEText("""# DR Plan v3 — REDACTED # Per 3rd-party reviewer request: IPs removed, credentials stripped, # internal topology generalized. # # Full version: /root/.hermes/references/server-dr-plans-v3.md # ## Key Changes from Prior Review # - Failover interval corrected: 30s not 5min # - S2 backup target added (Wasabi us-west-2 planned) # - Restore runbooks per server with exact commands # - Backup security: Object Lock + write-only IAM planned # - Quarterly DR testing scheduled # - Tony's Hermes flagged for documentation """, "plain") redacted.add_header("Content-Disposition", "attachment; filename=server-dr-plans-v3-redacted.md") msg.attach(redacted) files = [ ("/root/.hermes/references/server-dr-plans-v3.md", "server-dr-plans-v3.md"), ("/root/.hermes/references/server-provisioning-standard-v1.md", "server-provisioning-standard-v1.md"), ("/root/.hermes/references/memory-consolidation-proposal.md", "memory-consolidation-proposal.md"), ] for fpath, fname in files: with open(fpath, "rb") as f: part = MIMEBase("application", "octet-stream") part.set_payload(f.read()) encoders.encode_base64(part) part.add_header("Content-Disposition", f"attachment; filename={fname}") msg.attach(part) with smtplib.SMTP(SMTP, PORT) as s: s.starttls() s.login(FROM, PASS) s.send_message(msg) print(f"Sent DR plan v3 to {TO}")