From dd6445547b68b8c4b9a3bd91a9911d4aa8b44904 Mon Sep 17 00:00:00 2001 From: Tero Date: Sat, 29 Aug 2026 20:29:13 +0300 Subject: [PATCH] Add script for sending test message --- README.md | 6 +- TODO.md | 2 +- .../__pycache__/check-smtp.cpython-314.pyc | Bin 3772 -> 3772 bytes .../send-test-email.cpython-314.pyc | Bin 0 -> 4769 bytes scripts/send-test-email.py | 68 ++++++++++++++++++ 5 files changed, 72 insertions(+), 4 deletions(-) create mode 100644 scripts/__pycache__/send-test-email.cpython-314.pyc create mode 100644 scripts/send-test-email.py diff --git a/README.md b/README.md index d40414a..93ce30d 100644 --- a/README.md +++ b/README.md @@ -62,11 +62,11 @@ The command prints `SMTP_CONNECTION_OK` only after the SMTP server accepts the S 6. Send a delivery test to an inbox you control: -```powershell -.\scripts\test-smtp.ps1 -To you@example.com +```sh +python ./scripts/send-test-email.py --to you@example.com ``` -The command prints `SMTP_TEST_SENT_TO=
` only after the SMTP server accepts the message. Confirm the message arrives, then use **Forgot your password?** in the application to verify a real reset email and link. +The command works on Windows, Linux, and macOS. It prints `SMTP_TEST_SENT_TO=
` only after the SMTP server accepts the message. Confirm the message arrives, then use **Forgot your password?** in the application to verify a real reset email and link. The existing PowerShell alternative remains available as `./scripts/test-smtp.ps1 -To you@example.com`. ## Production notes diff --git a/TODO.md b/TODO.md index d13ede4..a3ac9e1 100644 --- a/TODO.md +++ b/TODO.md @@ -4,7 +4,7 @@ - [x] Local accounts, administrator approval, and TOTP MFA. - [x] QR-based MFA enrollment for iPhone and Android authenticators. - [x] Email addresses, member password changes, and expiring password-reset links. -- [ ] Configure production SMTP credentials and verify outgoing email delivery. Run `python ./scripts/check-smtp.py`, then complete after the delivery test in [README.md](README.md) is received. +- [ ] Configure production SMTP credentials and verify outgoing email delivery. Run `python ./scripts/check-smtp.py`, then `python ./scripts/send-test-email.py --to you@example.com`; complete after the delivery test in [README.md](README.md) is received. - [ ] Run `./scripts/rotate-admin.ps1` on Windows or `sh ./scripts/rotate-admin.sh` on Linux/macOS, then sign in as `admin` and scan the new MFA QR code to complete authenticator enrollment. - [x] Add CSRF protection to all state-changing forms. - [ ] Add automated database backups and test restoration. diff --git a/scripts/__pycache__/check-smtp.cpython-314.pyc b/scripts/__pycache__/check-smtp.cpython-314.pyc index 402e4764586864e682850d9ec9ddff1e86bb0c7e..edc70952156d4334bbbacaeda8dec21a5558c998 100644 GIT binary patch delta 19 ZcmdlZyGNEwn~#@^0SLszHgav^0{|#f1GE4D delta 19 ZcmdlZyGNEwn~#@^0SJDIZsgj;2LLUg1eO2* diff --git a/scripts/__pycache__/send-test-email.cpython-314.pyc b/scripts/__pycache__/send-test-email.cpython-314.pyc new file mode 100644 index 0000000000000000000000000000000000000000..51577f4b89ad2d4ccba064d65748d54f9a2e60f0 GIT binary patch literal 4769 zcmai1|4$p|8Gp}r=dWk;#f0w(mq3#k0;G_PGyzgl3~>n9Jv*dbOgzUv;F$4wcjpk? zZKXdQkIw?ep6sk>Xs!5wVMM|ShN>g=R+n?+jYI04KP3<4Rnn>N+U-rCbAEt;U zFZkZ)ec$JK-{*Pn`SQ6Ihuw;xy;J%2)I$qGU*mz^j0NJ+IuLV+Lkc>NIKo3Hgw`7r zgVvJ@sr8gXX+5pb&>K9)lSajO(xjLgupH?zpR_0zjix--lQzZHfHxv;3t*Oo#{y z>mLsI*eD+pF7nbWtMIbI^3!1<#wKMUKEcMsNI1r}@$rkS%qt2^$!#MpgKCb36=t9r!@{0t%MzDeZJUp1ZU_f?Cis5ZfW}Mm!g4>5lRrFgb#dWYty;#x~@yK8tVf5 zwyoRyDj`v2n8MbNxo8@ zD)v5Sk=CgvpD;>2>HO{1I9j)B+f}2!dT7IYhdx2bf_5R!)QDW>RR6FbYYvEAuZ?{{ zOw4Lt*v4N9PbXqLtB85841+`SafO#yWs=W(^M<3Q=%g~LgJ4*J zv*?TASdy2q7w=`Esr79^IRfV>a!`hNZN)*^ss&|RVpg@qL{Kd%DsYli4?_4A%YTB$ z99pxLEOsw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