/v1/send/message always used implicit TLS and /v1/send/pdf always STARTTLS on the same SMTP_RELAY_PORT, so one of them failed whatever the port. Now one connection path with SMTP_RELAY_SECURITY (ssl / starttls / none, default by port). A failed STARTTLS is an error instead of a plain-text login.
Login only when username and password are both set, so a trusted relay works without credentials.
SMTP_FROM and SMTP_REPLY_TO; every mail gets Date and Message-ID.
/health answers 503 when the SMTP server refuses. In production it reported smtp_responding: false for 30 days while Docker showed healthy.
The old tests never ran (missing import, invalid test-client call); 8 new tests run in python:3.13.1-alpine3.20, and CI gets a test job.
For https://git.librete.ch/libretech/mp/issues/71 (order mail).
- `/v1/send/message` always used implicit TLS and `/v1/send/pdf` always STARTTLS on the same `SMTP_RELAY_PORT`, so one of them failed whatever the port. Now one connection path with `SMTP_RELAY_SECURITY` (`ssl` / `starttls` / `none`, default by port). A failed STARTTLS is an error instead of a plain-text login.
- Login only when username and password are both set, so a trusted relay works without credentials.
- `SMTP_FROM` and `SMTP_REPLY_TO`; every mail gets `Date` and `Message-ID`.
- `/health` answers 503 when the SMTP server refuses. In production it reported `smtp_responding: false` for 30 days while Docker showed healthy.
- The old tests never ran (missing import, invalid test-client call); 8 new tests run in `python:3.13.1-alpine3.20`, and CI gets a test job.
Local: `PYTHONPATH=src python -m unittest discover -s src/tests`: 8 tests OK.
The message endpoint used implicit TLS and the PDF endpoint STARTTLS on
the same port, so one of them always failed. Both now share one
connection path with an explicit SMTP_RELAY_SECURITY, log in only with
credentials, and take SMTP_FROM and SMTP_REPLY_TO. /health answers 503
when the SMTP server refuses, so the container turns unhealthy instead
of looking fine. The old tests never ran; eight new ones do, in CI too.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
For libretech/mp#71 (order mail).
/v1/send/messagealways used implicit TLS and/v1/send/pdfalways STARTTLS on the sameSMTP_RELAY_PORT, so one of them failed whatever the port. Now one connection path withSMTP_RELAY_SECURITY(ssl/starttls/none, default by port). A failed STARTTLS is an error instead of a plain-text login.SMTP_FROMandSMTP_REPLY_TO; every mail getsDateandMessage-ID./healthanswers 503 when the SMTP server refuses. In production it reportedsmtp_responding: falsefor 30 days while Docker showed healthy.python:3.13.1-alpine3.20, and CI gets a test job.Local:
PYTHONPATH=src python -m unittest discover -s src/tests: 8 tests OK.