semaphore
semaphore copied to clipboard
Email Alerts doesn't work
Hey, I'm trying to setup email alerts, tried various ports and nothing works for me. Currently I'm on last version (v2.8.90). For email host I'm using Microsoft Exchange. I don't have any logs too , seems like it doesn't try to connect either. How can I fix this issue
Seems like Semaphore should log any errors while sending mail-alerts. Example: services/tasks/alert.go#L67
Please provide any errors that are logged. If none appear - it might be a configuration error.
here is my conf file { "mysql": { "host": "127.0.0.1:3306", "user": "semaphore", "pass": "", "name": "semaphore", "options": null }, "bolt": { "host": "", "user": "", "pass": "", "name": "", "options": null }, "postgres": { "host": "", "user": "", "pass": "", "name": "", "options": null }, "dialect": "mysql", "port": "", "interface": "", "tmp_path": "/tmp/semaphore", "cookie_hash": "", "cookie_encryption": "", "access_key_encryption": "", "email_sender": "some_sender", "email_host": "some_ip", "email_port": "587", "email_username": "", "email_password": "", "web_host": "some_host", "ldap_binddn": "", "ldap_bindpassword": "", "ldap_server": ":389", "ldap_searchdn": "", "ldap_searchfilter":"*", "ldap_mappings": { "dn": "distinguishedName", "mail": "userPrincipalName", "uid": "sAMAccountName", "cn": "cn" }, "telegram_chat": "", "telegram_token": "", "slack_url": "", "max_parallel_tasks": 10, "email_alert": true, "email_secure": false, "telegram_alert": false, "slack_alert": false, "ldap_enable": true, "ldap_needtls": false, "ssh_config_path": "", "demo_mode": false, "use_external_git": false }
Hi, i've the same problem my config.json smtp part :
version : 2.8.89
"email_sender": "[email protected]",
"email_host": "smtp.xx.xx",
"email_port": "587",
"email_username": "[email protected]",
"email_password": "MYPASSWORD",
[...]
"email_alert": true,
"email_secure": true,
in logs i don't have any smtp error same as @MoonApache
@MoonApache did you solved this issue ?
anyone can help ?
Kélian
Nope ,still waiting
Hi everyone,
Anyone can help about this issue ?
Kélian
Hi @MoonApache, i've tried the pre-release v2.8.91, and mail notifications works fine when a task failed, so we have to wait a release.
At least now we know)
I am seeing this issue as well with version v2.9.39-beta.
On my side, I am using the following email configuration
"email_alert": true,
"email_sender": "[email protected]",
"email_host": "localhost",
"email_port": "25",
"email_username": "",
"email_password": "",
"email_secure": false,
Nothing ever hits the maillog. I changed it to a random port that was unused and setup netcat on that port to see if semaphore was even trying to send an email and I saw no activity at all when I ran my task. This test was ran with a task that failed and another that succeeded. I don't know what is going on exactly but it seems as though semaphore is not attempting to send emails at all regardless of configuration which is why there is no logging of it.
Edit: Checked and my user does have an email address associated with it, so between that and the configuration having email setup, I would expect it to at least try to send them out. Maybe a flag is missing in the configuration?
Same here
After merging My PR https://github.com/ansible-semaphore/semaphore/pull/1788 have been merged which fixes this issue. the mail notification is working fine if the config.json includes all mentioned options and after enabling alerts for your user.
same issue :