stefanprodan / mgob

MongoDB dockerized backup agent. Runs schedule backups with retention, S3 & SFTP upload, notifications, instrumentation with Prometheus and more.
MIT License
769 stars 152 forks source link

Unable to send email via SMTP remote server #160

Closed dmytro-pashynskyi closed 1 year ago

dmytro-pashynskyi commented 2 years ago

Dear maintainers,

There is an issue with sending emails by the mgob application in my k8s cluster in Azure. It always returns: level=error msg="Notifier failed for on demand backup sending email notification failed: x509: certificate signed by unknown authority" I have manually installed the required certificates to /usr/local/share/ca-certificates and did updated-ca-certificates. Also I have created the global environment variable SSL_CERT_DIR (I suppose that this is necessary for application written in golang)

I'm sure that my credentials for SMTP server are correct cause I was able to connect to it from my mgob pod and sent an email.

Despite all of my actions the same error is shown each time. Please, advice any suggestion how to fix it.

Regards, Dmytro

maxisam commented 2 years ago

I had a similar issue. checkout my fork https://github.com/maxisam/mgob

I fixed that issue with another email library at https://github.com/stefanprodan/mgob/commit/4ff3a137a4f974381e2873d5cfa49d2b20c9d185

At some point I will make a PR back to this but I want to finish some features first