#!/usr/bin/env python3 """Email the recovery bundle to g@germainebrown.com.""" import smtplib from email.mime.multipart import MIMEMultipart from email.mime.text import MIMEText from email.mime.application import MIMEApplication pw = open("/root/.config/himalaya/g-germainebrown.pass").read().strip() file_path = "/root/.hermes/recovery-bundle-2026-07-05.md" import os file_size = os.path.getsize(file_path) msg = MIMEMultipart() msg["From"] = "g@germainebrown.com" msg["To"] = "g@germainebrown.com" msg["Subject"] = "Hermes Recovery Bundle — Jul 5, 2026" body = MIMEText( f"Hermes recovery bundle attached ({file_size/1024:.0f} KB).\n\n" f"Contents:\n" f"- Today's full conversation history (2 sessions)\n" f"- Full config.yaml, .env, SOUL.md\n" f"- All 8 cron job definitions\n" f"- All scripts (IMAP triage, backup, watchdog, VPN, etc.)\n" f"- SSH keys (WISP)\n" f"- S3 credentials (Wasabi), Hetzner token, netcup key\n" f"- SMTP/IMAP password\n" f"- systemd service file\n\n" f"If the server dies, use this file to rebuild Shatter.\n" ) msg.attach(body) with open(file_path, "rb") as f: att = MIMEApplication(f.read(), _subtype="markdown") att.add_header("Content-Disposition", "attachment", filename="hermes-recovery-bundle-2026-07-05.md") msg.attach(att) with smtplib.SMTP("mail.germainebrown.com", 2525) as s: s.starttls() s.login("g@germainebrown.com", pw) s.send_message(msg) print("Email sent successfully")