Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using gmail as relay does not work, (Cannot start TLS: handshake failure) #221

Open
malicz opened this issue Dec 30, 2024 · 1 comment
Open

Comments

@malicz
Copy link

malicz commented Dec 30, 2024

Hi and thank you for providing this well maintained docker image!

I have been using it with email service of a hosting provider, but I need to change to gmail.
This docker container is running on a server that runs many services which forward reports to this container to be send out.

error message:

2024-12-30T12:16:31.914376+01:00 INFO    postfix/smtpd[1200]: connect from docker-postfix-gw.local[172.16.43.1]
2024-12-30T12:16:31.928309+01:00 INFO    postfix/smtpd[1200]: E292446A73E: client=docker-postfix-gw.local[172.16.43.1]
2024-12-30T12:16:31.929390+01:00 INFO    postfix/cleanup[1203]: E292446A73E: message-id=<20241230111631.D7C3246A73D@dionysos>
2024-12-30T12:16:31.935274+01:00 INFO    postfix/smtpd[1200]: disconnect from docker-postfix-gw.local[172.16.43.1] ehlo=1 mail=1 rcpt=1 data=1 quit=1 commands=5
2024-12-30T12:16:31.935334+01:00 INFO    postfix/qmgr[1199]: E292446A73E: from=<xxx>, size=459, nrcpt=1 (queue active)
2024-12-30T12:16:32.052659+01:00 INFO    postfix/smtp[1204]: SSL_connect error to smtp.gmail.com[142.250.110.108]:587: -1
2024-12-30T12:16:32.052694+01:00 WARNING postfix/smtp[1204]: warning: TLS library problem: error:0A00010B:SSL routines::wrong version number:../ssl/record/ssl3_record.c:354:
2024-12-30T12:16:32.064246+01:00 INFO    postfix/smtp[1204]: E292446A73E: to=<xxxx>, relay=smtp.gmail.com[142.250.110.108]:587, delay=0.13, delays=0.01/0.05/0.07/0, dsn=4.7.5, status=deferred (Cannot start TLS: handshake failure)

Do you have any idea what this could be?

docker-compose.yml:

services:
  postfix:
    image: boky/postfix:v4.3.0-debian
    #image: boky/postfix:v4.3.0-alpine
    container_name: postfix
    dns:
      - 192.168.xxx.xxxx
    hostname: xxxx
    environment:
      - TZ=Europe/Brussels
      - HOSTNAME=xxxx
      - POSTFIX_myhostname=xxxx
      - RELAYHOST=[smtp.gmail.com]:587
      - [email protected]
      - POSTFIX_smtp_tls_security_level=encrypt
      - XOAUTH2_CLIENT_ID=xxxx
      - XOAUTH2_SECRET=xxxx
      - XOAUTH2_INITIAL_ACCESS_TOKEN=xxxx
      - XOAUTH2_INITIAL_REFRESH_TOKEN=xxxx
      - ALLOW_EMPTY_SENDER_DOMAINS=true
      - XOAUTH2_SYSLOG_ON_FAILURE=yes
    ports:
      - 1587:587
    restart: unless-stopped
    healthcheck:
      disable: true
@malicz
Copy link
Author

malicz commented Dec 30, 2024

Ok, I am not sure why. But doing a full re-setup:
docker compose down
docker compose up -d
Fixed the issue?!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant