mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-06 10:59:59 +00:00
Under SSO the role tried to let applications relay without SMTP AUTH by widening the relay rule to the private networks. The rule compared the peer address to the text of a CIDR, which never matches, so an application could reach local mailboxes but got "550 5.1.2 Relay not allowed" for every external recipient. Repairing the comparison would have opened a relay, because published ports, Tor and the swarm mesh all hand outside clients an address inside those networks. Stalwart checks app passwords before it asks the external directory, so a bot can authenticate while the directory is OIDC. With SSO enabled the role now creates one app password per bot, acting for that account as the recovery admin, and stores it in the token store the SMTP password is already read from. A bot gets a new one when its entry is deleted in Stalwart or its token is removed. The relay rule is back to authenticated sessions only. The lookup loses its SSO relay branch and the role its submission_via_relay flag, so an SSO deployment submits on 465 with AUTH like every other one. The role's CLI test now fails when an unauthenticated session is given an external recipient, or when the bot credential is refused one. Closes #793 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
26 lines
1.0 KiB
Bash
26 lines
1.0 KiB
Bash
ADMIN_EMAIL={{ lookup('users', 'administrator').email | quote }}
|
|
|
|
ADMIN_IMAP_PASSWORD={{ lookup('users', 'administrator').password | quote }}
|
|
|
|
BIBER_EMAIL={{ lookup('users', 'biber').email | quote }}
|
|
|
|
BIBER_IMAP_PASSWORD={{ lookup('users', 'biber').password | quote }}
|
|
|
|
MAILU_MAILDIR_VOLUME={{ lookup('volume', 'web-app-mailu', 'dovecot_mail').name | quote }}
|
|
|
|
MAILU_SMTP_CONTAINER={{ lookup('config', 'web-app-mailu', 'services.smtp.name') | quote }}
|
|
|
|
MAIL_DOMAIN={{ STALWART_DOMAIN | quote }}
|
|
|
|
MAIL_HOST={{ lookup('email').host | quote }}
|
|
|
|
MIGRATION_SCRIPT={{ lookup('path_absolute', 'roles', application_id, 'files/python/migrate_from_mailu.py') | quote }}
|
|
|
|
NO_REPLY_EMAIL={{ lookup('users', 'no-reply').email | quote }}
|
|
|
|
NO_REPLY_SMTP_PASSWORD={{ lookup('email').password | quote }}
|
|
|
|
PYTHON_BIN={{ (lookup('env', 'PYTHON') or '/opt/venvs/infinito/bin/python') | quote }}
|
|
|
|
STALWART_MIGRATION_E2E={{ ((application_id in PRIMARY_APPS) and ('web-app-mailu' in group_names) and DEPLOYMENT_MODE == 'compose' and IS_STACK_HOST | bool) | string | lower }}
|