Trigger a resending of undelivered notification emails after email server comes back online

I am currently faced with the problem, that our Mail Server went down (i.e. GitLab had no connection to it)
In that time period, no E-Mail notification were sent.

I have fixed the issue since and the GitLab server can send emails again.

My question: Is there a way to trigger the re-sending of all the e-mails that were not delivered or are those E-mails lost to the ether forever?

Any pointers or tips are much apreciated.

Hi, how is your email configured? Are you configured using the settings in gitlab.rb? Your alternative, is like I have done - configure postfix on the same server as gitlab and let postfix then send the messages to your mail server. That way, if your main mail server is down, postfix will queue them until it comes back up. With that kind of setup, you don’t need anything configured in gitlab.rb.

Won’t solve the problem for the old messages, but will solve it for the future.

1 Like

@iwalker , yes the mail settings are configured in the gitlab.rb. Thank you for your input, it is certainly a nice little trick, to run an additional mail server, but it is not really what I want to do right now. But I will keep in mind.
So from your answer, I can gather, that GitLab does not have something like a mail queue and a mechanism to re-send mails that have not been delivered, is that correct?

It’s not really a mail server as such but just an SMTP daemon. As far as I know, no Gitlab doesn’t have a queuing mechanism. If the server is not accessible, then the mail won’t be queued or sent, it will probably show in the Gitlab logs this kind of situation. This is the same for other apps, eg Joomla, or anything that is configured to assume that a mail server is accessible. If it’s not, then it’s effectively not sent. Hence my solution takes that problem away from the application. Of course, if postfix failed on your Gitlab server, then it’s the same situation. But it at least gives you queuing possibilities for when your main mail server is down.

Maybe someone from the Gitlab team will read this and be able to confirm what I wrote, and even perhaps an issue can be raised on the Gitlab project to address this issue so that Gitlab itself would queue them to ensure that all mails would then be delivered. But then that would just do the same as what I suggested anyway.

@iwalker thank you for clarifying. I will look into deploying an SMTP daemon, for this kind of situation.