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.