0

Thats a part of my Docker-Compose File. The problem is that the mails dont reach the users. Does someone knows why?

version: '3.6'
services:
  web:
    image: 'gitlab/gitlab-ee:latest'
    restart: always
    hostname: 'rainws02.tjema.local'
    environment:
      GITLAB_OMNIBUS_CONFIG: |
        external_url 'https://rainws02.rain.local'
        gitlab_rails['smtp_enable'] = true
        gitlab_rails['smtp_address'] = "rainex01.rain.local"
        gitlab_rails['smtp_port'] = 465
        gitlab_rails['smtp_user_name'] = "gitlab@rainlocal"
        gitlab_rails['smtp_password'] = "PASSWORD"
        gitlab_rails['smtp_domain'] = "rain.local"
        gitlab_rails['smtp_authentication'] = "login"
        gitlab_rails['smtp_enable_starttls_auto'] = true
        gitlab_rails['smtp_tls'] = false
        gitlab_rails['smtp_openssl_verify_mode'] = 'peer'
        gitlab_rails['gitlab_email_from'] = "gitlab@rain.local"
...
torek
  • 448,244
  • 59
  • 642
  • 775
Margo
  • 1
  • 2
  • do the mails reached the smtp server? – Bagus Tesa Apr 10 '22 at 13:25
  • I dont know. I tested if my Exchange Server is able to send mail - and he is. Where can I check if they reach the server? – Margo Apr 10 '22 at 13:34
  • have you checked exchange server logs? are the email receivers uses the same smtp server? you can test whether docker sends mail or not by setting up dummy server (e.g. FakeSMTP) somewhere reachable then see if it actually emitting smtp requests. there are many ways to lose mails.. – Bagus Tesa Apr 10 '22 at 13:42
  • The users are on the same SMPT-Server. Just checked the logs. I cant see any mail, from gitlab@rain.local. I wanted to ask if there is a mistake in my docker-compose? – Margo Apr 10 '22 at 13:57
  • i checked gitlab docs, it says [port should be 587](https://docs.gitlab.com/omnibus/settings/smtp.html#microsoft-exchange-with-authentication), not 465. it also match with [microsoft's docs](https://learn.microsoft.com/en-us/exchange/plan-and-deploy/deployment-ref/network-ports?view=exchserver-2019). – Bagus Tesa Apr 10 '22 at 14:04
  • It also says 25. Do u know the diffrence? – Margo Apr 10 '22 at 14:08
  • 25 for unauthenticated one – Bagus Tesa Apr 10 '22 at 14:10
  • I tested Port 587... sadly no diffrence. Apparently you can test it with the command: Notify.test_email('destination_email@address.com', 'Message Subject', 'Message Body').deliver_now But I get an error: bash: syntax error near unexpected token `'test@rain.local',' – Margo Apr 10 '22 at 14:29
  • I just tested it again in de rails console and the folowing error appeared: (SSL_connect returned=1 errno=0 state=error: certificate verify failed (self signed certificate)) – Margo Apr 10 '22 at 14:54
  • [25 = SMTP, 465 - SMTPS *or* rendezvous for SSM, and 587 = SMTP-MSA.](https://stackoverflow.com/q/15796530/1256452) – torek Apr 10 '22 at 20:22
  • (In any case, the "correct" setup depends on how you choose to set up your mail service. There may be some Git*Lab* standard for this, but *Git* doesn't pick one. I updated your tag.) – torek Apr 10 '22 at 20:25
  • 1
    You've specified `gitlab_rails['smtp_tls'] = false` but are using a port number typically reserved for connections with TLS enabled. I would recommend trying to either (1) enable TLS (or use `gitlab_rails['smtp_enable_starttls_auto'] = true`) or (2) use port 25 if you are sure you are not using SSL/TLS. – sytech Apr 10 '22 at 22:28

0 Answers0