mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-29 06:17:25 +00:00
email_account.py hard-coded use_tls = 1 and no_smtp_authentication = 0. In Frappe, use_tls means STARTTLS, but Stalwart serves implicit TLS on smtps 465, so every ERPNext send hung until Stalwart's TLS timeout closed the socket (smtplib.SMTPServerDisconnected, 'Invalid Outgoing Mail Server or Port'); Stage 2.0 proved it in fork run 44617574811 ERPNext#1 (login POST 499 after 59.989 s). A relay without login (port 25, auth false) also got SMTP AUTH forced on it. The script now derives use_ssl_for_outgoing (tls and not start_tls), use_tls (tls and start_tls) and no_smtp_authentication (not auth) from the email lookup's tls, start_tls and auth, which the task passes as SMTP_TLS, SMTP_START_TLS and SMTP_AUTH. Adapted from Stage 2.0's IAM patch erpnext1-smtp-implicit-tls-r2 to main's env-passed SMTP_PASS. test_email_account.py covers implicit TLS, STARTTLS, plain, both auth cases, convergence of an account left on STARTTLS, and the commit; against main's script 5 of its 7 tests fail (negative control). The new test is the mirrored unit test of email_account.py, so its nocheck: mirrored-unit-test exemption goes; _fake_frappe gains is_new, db_insert and db_update. 🎯 Fix: 90 % 💥 Break: 4 % 💸 Tokens: – ⏱️ Velocity: – 🛡️ Security: 100 % 🏆 Score: 86 🚦 Gate: ✅ 90/5, tokens and velocity <= 100, security 100 % Created-with: https://s.veen.world/skills Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>