semaphore
semaphore copied to clipboard
Sending mail gives me "Can't send email!" (504 5.7.4)
I try to setup Exchange-Online SMTP for sending mail through it. Therefor i've set following settings in config.json:
- email_sender: [email protected]
- email_host: smtp.office365.com
- email_port: 587
- email_username: [email protected]
- email_password: xxxx
- email_secure: true
When an email is sent, following error is shown in semaphore:
When i run semaphore with "semaphore server --config /etc/semaphore/config.json" i get following output: ERRO[0039] 504 5.7.4 Unrecognized authentication type [VI1PR0902CA0058.eurprd09.prod.outlook.com] PANI[0039] 504 5.7.4 Unrecognized authentication type [VI1PR0902CA0058.eurprd09.prod.outlook.com] error="Can't send email!" INFO[0039] Stopped running TaskRunner 131 INFO[0039] Release resource locker with TaskRunner 131 panic: (*logrus.Entry) 0xc000adccd0
goroutine 48 [running]: github.com/Sirupsen/logrus.Entry.log(0xc0000ba180, 0xc001e080f0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x7fa400000000, ...) /go/src/github.com/ansible-semaphore/semaphore/vendor/github.com/Sirupsen/logrus/entry.go:128 +0x6c5 github.com/Sirupsen/logrus.(*Entry).Panic(0xc000adcc80, 0xc00094f4e8, 0x1, 0x1) /go/src/github.com/ansible-semaphore/semaphore/vendor/github.com/Sirupsen/logrus/entry.go:173 +0xfa github.com/ansible-semaphore/semaphore/util.LogPanicWithFields(0x18aee00, 0xc001a54e88, 0xc00094f538) /go/src/github.com/ansible-semaphore/semaphore/util/errorLogging.go:39 +0xcd github.com/ansible-semaphore/semaphore/services/tasks.(*TaskRunner).panicOnError(0xc0003d2b00, 0x18aee00, 0xc001a54e88, 0xa72239, 0x11) /go/src/github.com/ansible-semaphore/semaphore/services/tasks/logging.go:78 +0x16e github.com/ansible-semaphore/semaphore/services/tasks.(*TaskRunner).sendMailAlert(0xc0003d2b00) /go/src/github.com/ansible-semaphore/semaphore/services/tasks/alert.go:66 +0x485 github.com/ansible-semaphore/semaphore/services/tasks.(*TaskRunner).setStatus(0xc0003d2b00, 0xa67fd6, 0x5) /go/src/github.com/ansible-semaphore/semaphore/services/tasks/runner.go:80 +0x136 github.com/ansible-semaphore/semaphore/services/tasks.(*TaskRunner).fail(...) /go/src/github.com/ansible-semaphore/semaphore/services/tasks/runner.go:112 github.com/ansible-semaphore/semaphore/services/tasks.(*TaskRunner).run(0xc0003d2b00) /go/src/github.com/ansible-semaphore/semaphore/services/tasks/runner.go:281 +0x7fa created by github.com/ansible-semaphore/semaphore/services/tasks.(*TaskPool).Run /go/src/github.com/ansible-semaphore/semaphore/services/tasks/pool.go:150 +0x557
Maybe there is a problem with starttls?
I have the same behavior. Did you manage to find a workaround?
I have the same behavior. Did you manage to find a workaround?
i haven't heard anything until now from the developer. i'm using this tool just for test-cases but because of this problem/missing mailfeature i'm searching for another alternative solution.
Hi @RhoAndB, @lucmot
Working on it, will be fixed soon. Stay with us ;)
Any news here? This is a showstopper for me too..
For me, the error message is:
PANI[0021] 451 5.7.3 STARTTLS is required to send mail [ZR0P278CA0062.CHEP278.PROD.OUTLOOK.COM] error="Can't send email!"
@tovoro it doesn't work for me too, but you can handle it at the playbook level with a task
- name: sending detailed report to [email protected] mail: host: "smtp" port: 587 username: "" password: "" from: "" to: "" subject: "" body: "" secure: starttls
Yeah, thats a workaround but not really a good one. I now use our smtp relay with port 25 and no starttls which works but not a long term solution. I checked and it seems that theres a fix in the latest tag, but no release for it? I have no idea how to compile the latest tag to a binary to use this one and check if it works... whats going on with the releases?
Fixed in v2.8.57: https://github.com/ansible-semaphore/semaphore/releases/tag/v2.8.67