Problem: SMTP STARTTLS Authentication Fails in Semaphore UI, but Works via curl in Container
Issue
SMTP email alerts fail when configured in Semaphore UI with STARTTLS authentication to Exchange Server. External tools (curl, openssl s_client) confirm TLS and connectivity work correctly, but Semaphore raises authentication errors.
Impact
Configuration
Installation method
Docker
Database
SQLite
Browser
Chrome
Semaphore Version
v2.18.4^0-7ca373d-1779131288
Ansible Version
ansible [core 2.20.5]
config file = /etc/ansible/ansible.cfg
configured module search path = ['/home/semaphore/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /opt/semaphore/apps/ansible/13.5.0/venv/lib/python3.12/site-packages/ansible
ansible collection location = /home/semaphore/.ansible/collections:/usr/share/ansible/collections
executable location = /opt/semaphore/apps/ansible/13.5.0/venv/bin/ansible
python version = 3.12.14 (main, Aug 13 2026, 19:38:13) [GCC 14.2.0] (/opt/semaphore/apps/ansible/13.5.0/venv/bin/python3)
jinja version = 3.1.6
pyyaml version = 6.0.3 (with libyaml v0.2.5)Logs & errors
Semaphore | time="2026-09-09T14:19:02Z" level=info msg="Task added to queue" task_id=295 task_name="Abruf Switch Infos TEST" Semaphore | time="2026-09-09T14:19:02Z" level=info msg="Set resource locker" context=task_pool task_id=295 task_name="Abruf Switch Infos TEST" Semaphore | time="2026-09-09T14:19:02Z" level=info msg="Task started" context=task_pool task_id=295 task_name="Abruf Switch Infos TEST" Semaphore | time="2026-09-09T14:19:03Z" level=info msg="Task status updated" context=task_logger status=starting task_id=295 Semaphore | time="2026-09-09T14:19:03Z" level=info msg="Task status updated" context=task_logger status=running task_id=295 Semaphore | time="2026-09-09T14:19:07Z" level=warning msg="Failed to run task" context=task_runner error="exit status 4" task_id=295 task_status=running Semaphore | time="2026-09-09T14:19:12Z" level=error msg="530 5.7.57 SMTP; Client was not authenticated to send anonymous mail during MAIL FROM" fields.level=Error Semaphore | time="2026-09-09T14:19:12Z" level=info msg="Task status updated" context=task_logger status=error task_id=295 Semaphore | time="2026-09-09T14:19:12Z" level=info msg="Stopped running task Abruf Switch Infos TEST" task_id=295 ^C
Manual installation - system information
No response
Configuration
{ "sqlite": { "host": "/var/lib/semaphore/database.sqlite" }, "dialect": "sqlite", "tmp_path": "/tmp/semaphore", "cookie_hash": "khash", "cookie_encryption": "cookie_encryption+mbeIvw4c=", "access_key_encryption": "access_key_encryption=", "oidc_providers": { "keycloak": { "display_name": "Magische Anmeldung", "provider_url": "https://sso.stadt.local/realms/stadt", "client_id": "semaphore", "client_secret": "client_secret", "redirect_url": "https://srvsemaphore.stadt.local/api/auth/oidc/keycloak/redirect", "scopes": ["openid", "profile", "email"] } }, "email_alert": true, "email_sender": "[email protected]", "email_host": "mail.stadt.local", "email_port": "587", "email_secure": false, "email_username": "[email protected]", "email_password": "t7+!?5?g!vJ?!!email_password!ug8Q", "email_tls": true, "email_tls_min_version": "1.2" }
Additional information
TLS verification: OK (valid certificate chain)
No client certificate CA names sent Peer signing digest: SHA256 Peer signature type: RSA-PSS Server Temp Key: ECDH, secp384r1, 384 bits
SSL handshake has read 4906 bytes and written 510 bytes Verification: OK
Network connectivity confirmed (no firewall issues)
Source: semaphoreui/semaphore