The SMTP server configured in sendmail is restricted by the company's intranet firewall. When GitLab sends an email to Gmail or another Internet mailbox via SendMail, the following error occurs: [plain] Jul 14 06:48:14 gitlab sm-mta [12379]: r6C7HnCZ024915: to = <mmm@pku.edu.cn>, delay = 1 + 15: 30: 25, xdelay = 00:00:00, mailer = esmtp, pri = 21452479, relay = mx1.pku.edu.cn ., dsn = \ 4.0.0, stat = Deferred: Connection timed out with mx1.pku.edu.cn. the solution is to configure SendMail so that it can use the company's internal SMTP server to send an email. The configuration is very simple, in/etc/mail/sendmail. add a line at the end of the mc file: [plain] define ('smart _ host', 'smtp .mycompany.com ') and perform a test To create a text file: [plain] To: csfreebird@gmail.com Subject: test sendmail in esri From: gitlab@mycompany.com test gmail Run Command: [plain] root @ gitlab:/opt # sendmail-vt </opt/mail.txt check mailbox, sent successfully. Now GitLab can send emails to all mailboxes without interruption.