Your mail from the gitlab instance has been accepted by your postfix

Mar  6 10:58:32 ubuntu postfix/qmgr[12506]: 5BEE724E74: from=<gitlab@ubuntu>, size=630, nrcpt=1 (queue active)

But delivery to the destination does not work here:

Mar  6 10:59:02 ubuntu postfix/smtp[19746]: 5BEE724E74: to=<[email protected]>, relay=none, delay=30, delays=0.16/0.1/30/0, dsn=4.4.1, status=deferred (connect to example.com[2606:2800:220:1:248:1893:25c8:1946]:25: Network is unreachable)

Your server tries to use IPv6, but can't connect. It seems you have to disable IPv6 manually, using this in your main.cf:

inet_protocols = ipv4

But relaying (sending) to yahoo, results in an error:

Mar  6 11:00:51 ubuntu postfix/smtp[19925]: 07BF424E7A: to=<[email protected]>, relay=mta6.am0.yahoodns.net[66.196.118.33]:25, delay=1.1, delays=0.02/0.01/0.86/0.18, dsn=5.7.1, status=bounced (host mta6.am0.yahoodns.net[66.196.118.33] said: 553 5.7.1 [BL21] Connections will not be accepted from 109.65.131.14, because the ip is in Spamhaus's list; see http://postmaster.yahoo.com/550-bl23.html (in reply to MAIL FROM command))

It gets rejected, because your dynamic IP 109.65.131.14 is on a mailinglist. It seems you have this instance at home, using a dynamic IP. But these are often on spamlists when one of the previous users of this IP tried to send spam. To probably need either a static IP (at home or at another place) or use a relay server. And use a proper FQDN, set a proper Reverse DNS Record (PTR) for the IP et cetera, see many other questions on how not to get classified as spam.

As the sending process failed, a non-delivery notification gets sent to the sender

Mar  6 11:00:51 ubuntu postfix/bounce[19929]: 07BF424E7A: sender non-delivery notification: 1A85F24E7C
Mar  6 11:00:51 ubuntu postfix/qmgr[12506]: 07BF424E7A: removed

You should probably read your mails that get back to the user gitlab or configure it as an alias for an admin account.


I found the problem. As you can see in the log:

Mar  6 11:00:51 ubuntu postfix/smtp[19925]: 07BF424E7A: to=<[email protected]>, relay=mta6.am0.yahoodns.net[66.196.118.33]:25, delay=1.1, delays=0.02/0.01/0.86/0.18, dsn=5.7.1, status=bounced (host mta6.am0.yahoodns.net[66.196.118.33] said: 553 5.7.1 [BL21] Connections will not be accepted from 109.65.131.14, because the ip is in Spamhaus's list; see http://postmaster.yahoo.com/550-bl23.html (in reply to MAIL FROM command))

It says the error was raised as a reply to MAIL FROM command. And as you can see in this log line:

Mar  6 11:00:50 ubuntu postfix/pickup[12505]: 07BF424E7A: uid=999 from=<gitlab@ubuntu>

My domain was @ubunto and it's a bad domain name!

I was needed to change my domain name by setting the "external_url" variable in GitLab's configuration file from "http://ubuntu" to a FQDN. (/etc/gitlab/gitlab.rb)