Commit Graph
2 Commits
Author SHA1 Message Date
Riël NotermansandGitHub e63e635aac fix(backend): exempt inbound MTA endpoints from SSL redirect (#388)
The SECURE_REDIRECT_EXEMPT setting was missing the inbound MTA router
endpoints, causing internal HTTP calls from the MTA-in service to be
redirected to HTTPS with a 301 response.

This caused the milter to timeout when checking recipients and
delivering mail, resulting in "451 4.7.1 Service unavailable" errors.

The MTA-in service calls:
- /api/v1.0/inbound/mta/check/ (for recipient validation)
- /api/v1.0/inbound/mta/deliver/ (for mail delivery)

These internal endpoints must accept HTTP requests and should not
be redirected to HTTPS.

Changed:
- Added "^api/v1\.0/inbound/mta/" to SECURE_REDIRECT_EXEMPT

This follows the existing pattern for the alias endpoints at
/api/v1.0/mta/* which were already exempted.

Fixes: MTA milter timeout and mail delivery failures
2025-11-01 10:58:33 +01:00
Riël NotermansandGitHub 669c873629 🔧(backend) prevent SSL redirect for internal MTA URLs (#160)
Added SECURE_REDIRECT_EXEMPT pattern for api/v1.0/mta/ endpoints to prevent Django from forcing HTTPS redirects on internal cluster communication.

Signed-off-by: Riël Notermans <riel@zzapps.nl>
2025-06-19 01:41:42 +02:00