[GH-ISSUE #34] Bug: Certificate error on SMTP connection #5860

Closed
opened 2026-04-20 16:15:06 -05:00 by GiteaMirror · 8 comments
Owner

Originally created by @mtettke123 on GitHub (Jul 11, 2022).
Original GitHub issue: https://github.com/go-vikunja/vikunja/issues/34

Hi out there,

I'm trying to get Vikunja to talk to my SMTP server. My server has a certificate with a public name, but I connect via a private connection (VM to VM), not via public net.

Although I've set I
VIKUNJA_MAILER_SKIPTLSVERIFY: "true"
get the error message:
mail/func1 1d3 Error during connect to smtp server: %s x509: certificate is valid for <external DNS name>, not <internal DNS name>

It doesn't matter if I use the internal DNS name or the IP address of the server, with the latter one I get:
mail/func1 1da Error during connect to smtp server: %s x509: cannot validate certificate for 10.100.0.21 because it doesn't contain any IP SANs

This seems to be a bug or am I missing something?

Originally created by @mtettke123 on GitHub (Jul 11, 2022). Original GitHub issue: https://github.com/go-vikunja/vikunja/issues/34 Hi out there, I'm trying to get Vikunja to talk to my SMTP server. My server has a certificate with a public name, but I connect via a private connection (VM to VM), not via public net. Although I've set I `VIKUNJA_MAILER_SKIPTLSVERIFY: "true"` get the error message: `mail/func1 1d3 Error during connect to smtp server: %s x509: certificate is valid for <external DNS name>, not <internal DNS name>` It doesn't matter if I use the internal DNS name or the IP address of the server, with the latter one I get: `mail/func1 1da Error during connect to smtp server: %s x509: cannot validate certificate for 10.100.0.21 because it doesn't contain any IP SANs` This seems to be a bug or am I missing something?
GiteaMirror added the bug label 2026-04-20 16:15:07 -05:00
Author
Owner

@kolaente commented on GitHub (Jul 11, 2022):

Should be fixed in 5743a4afe5 - please try in ~30 min with the next unstable build.

<!-- gh-comment-id:1180461008 --> @kolaente commented on GitHub (Jul 11, 2022): Should be fixed in 5743a4afe51de221beeeabe66552ae4d92eed1a6 - please try in ~30 min with the next unstable build.
Author
Owner

@mtettke123 commented on GitHub (Jul 11, 2022):

Can confirm SKIPTLSVERIFY is working now. Thank you!
Buuuut:
How can I send Emails without auth? Now I get
mail/func1 1d2 Error during connect to smtp server: %s SMTP AUTH failed: 535 Incorrect authentication data
although I don't need auth.

Setting VIKUNJA_MAILER_USERNAME to "" does not help. How can I set up mailing WITHOUT auth?

<!-- gh-comment-id:1180853565 --> @mtettke123 commented on GitHub (Jul 11, 2022): Can confirm SKIPTLSVERIFY is working now. Thank you! Buuuut: How can I send Emails without auth? Now I get `mail/func1 1d2 Error during connect to smtp server: %s SMTP AUTH failed: 535 Incorrect authentication data` although I don't need auth. Setting VIKUNJA_MAILER_USERNAME to "" does not help. How can I set up mailing WITHOUT auth?
Author
Owner

@kolaente commented on GitHub (Jul 12, 2022):

So it looks like the default username Vikunja used to connect to a mail server was user. I don't know why I set it to that. Changed in 4bb77b5539 so that it should accept an empty user by default or when explicitly configured. Can you try again with the next unstable build?

<!-- gh-comment-id:1181557216 --> @kolaente commented on GitHub (Jul 12, 2022): So it looks like the default username Vikunja used to connect to a mail server was `user`. I don't know why I set it to that. Changed in 4bb77b5539ccf9e035ef2b58bfa93d0eb5feb37e so that it should accept an empty user by default or when explicitly configured. Can you try again with the next unstable build?
Author
Owner

@mtettke123 commented on GitHub (Jul 12, 2022):

Still doesnt't work, same error. It tries to authenticate. Doesn't matter if I set VIKUNJA_MAILER_USERNAME: "" or not.

Mailserver says:
2022-07-12 13:06:09 fixed_plain authenticator failed for (f93e466b6eb2) [10.100.0.145]: 535 Incorrect authentication data

<!-- gh-comment-id:1181627930 --> @mtettke123 commented on GitHub (Jul 12, 2022): Still doesnt't work, same error. It tries to authenticate. Doesn't matter if I set VIKUNJA_MAILER_USERNAME: "" or not. Mailserver says: `2022-07-12 13:06:09 fixed_plain authenticator failed for (f93e466b6eb2) [10.100.0.145]: 535 Incorrect authentication data`
Author
Owner

@kolaente commented on GitHub (Jul 12, 2022):

New attempt to fix in c906fc2b07 - please try again with the next unstable build in ~30 min.

(Biggest problem is I can't really test this)

<!-- gh-comment-id:1181783415 --> @kolaente commented on GitHub (Jul 12, 2022): New attempt to fix in https://github.com/go-vikunja/api/commit/c906fc2b07624747af1d7819e0fc270fc7b4c070 - please try again with the next unstable build in ~30 min. (Biggest problem is I can't really test this)
Author
Owner

@mtettke123 commented on GitHub (Jul 12, 2022):

still the same :-(

would it help you if I would create a VM for you to test?

<!-- gh-comment-id:1181924969 --> @mtettke123 commented on GitHub (Jul 12, 2022): still the same :-( would it help you if I would create a VM for you to test?
Author
Owner

@kolaente commented on GitHub (Jul 12, 2022):

Sure.

<!-- gh-comment-id:1181942272 --> @kolaente commented on GitHub (Jul 12, 2022): Sure.
Author
Owner

@mtettke123 commented on GitHub (Jul 12, 2022):

You've got mail.

<!-- gh-comment-id:1182006891 --> @mtettke123 commented on GitHub (Jul 12, 2022): You've got mail.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/vikunja#5860