Hey, I just experienced that `Kratos` crashes as s...
# talk-kratos
b
Hey, I just experienced that
Kratos
crashes as soon as the configured mailserver is not reachable. Following message was logged ``level=fatal msg=Failed to run courier worker. audience=application error=map[messagegomail could not send email 1: 550 Requested action not taken: mailbox unavailabl invalid DNS MX or A/AAAA resource record stack_trace:` Even if the error is related to the mailserver not being reachable, shouldn't
Kratos
still keep running? Is there some way to avoid shutting down
Kratos
completely and handle such errors without crashing?
n
You may consider handling this by using the Mailslurper Docker Image and pointing Kratos to that.
b
But I want to send out mails to my customers. Mailslurper would just be a solution for development.
n
Oh, okay...well I use either Sendgrid or Mailgun, and configure the SMTP settings. That works great.
The process of setting up Mailgun creates the entries you need in your MX records to enable the calls to work.
b
The problem that I have is that Kratos shuts down if the mailserver is not reachable. That means that my whole application which uses Kratos to authenticate users can't work. My question is if that is a bug in the code of Kratos or a misconfiguration by myself. For me an application like Kratos shouldn't just crash just because a mailserver is not reachable. Even if the mailserver is not available the authentication system could still work.
n
I understand what you mean and wondered about that myself. However, I can see where without an SMTP service of ANY kind, there is no real way to absolutely ensure security in Kratos...
b
Why is that? I mean in my use case I disabled registration, so there is currently no need to send out verification mails. The only mails that should be sent by Kratos are if a user forgets his password.
n
@magnificent-energy-493 may be able to get an answer to that.