Trying to use gmail relay but does not work #3731
-
|
I have tried to configure DMS as a null mailer ( The username and password are correct, because I'm using another container with another image and is sending the mail. Checked also the docs here:
services:
mailserver:
image: ghcr.io/docker-mailserver/docker-mailserver:latest
container_name: mailserver
# Provide the FQDN of your mail server here (Your DNS MX record should point to this value)
hostname: smtp-relay.gmail.com
ports:
- "25:25"
- "587:587"
- "465:465"
volumes:
- ./docker-data/dms/mail-data/:/var/mail/
- ./docker-data/dms/mail-state/:/var/mail-state/
- ./docker-data/dms/mail-logs/:/var/log/mail/
- ./docker-data/dms/config/:/tmp/docker-mailserver/
- /etc/localtime:/etc/localtime:ro
environment:
- PERMIT_DOCKER=network
- ENABLE_SPAMASSASSIN=0
- SMTP_ONLY=1
- ENABLE_FETCHMAIL=0
- ENABLE_POP3=
- ENABLE_CLAMAV=0
- RELAY_HOST=smtp-relay.gmail.com
- RELAY_PORT=587
- RELAY_USER=myuse@gmail.com
- RELAY_PASSWORD=myAPPpassw
cap_add:
- NET_ADMIN # For Fail2Ban to work
restart: always |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 4 replies
-
You are not Gmail, do not pretend to be. This is the FQDN for your DMS instance to be reached (via those published ports). It's not related to your email accounts that you'll send mail as, but it is what DMS will greet other mail servers as, such as when connecting to Gmail. You could try just using
You are relaying from DMS back into itself, due to the your |
Beta Was this translation helpful? Give feedback.
-
tried on a Rocky linux running docker and it worked... |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.


I think your problem is related to the operating system, Windows is not supported. You could try running DMS on a linux VM (I recommend Debian) and check if the problem is gone.