I am using Google Cloud Engine and the port 25, the default port used by postfix, is blocked.
I tried changing the port in master.cf but that is unfortunately not working.
I also tried using Gmail as a postfix relay but that also didn’t work.
I used docker inspect
to view the postfix container and found the ports are defined there. So I assume an changes I make in .cf file regarding ports will be overridden by the docker configuration.
Is there any way I can change them?
Any help would be much appreciated.
update: I’ve managed to change the exposed port to 587 but still unable to send emails
Steps I followed:
- Find the docker ID, name and port of the relevant container
docker ps --format "table {{.Names}}\t{{.ID}}\t{{.Ports}}"
- Note the container ID(ex: 7c79d07c0c6b) and name (ex: examplecom_postfix_1) of the postfix container corresponding to your site
- Stop the container
docker stop examplecom_postfix_1
- Find the full container ID by listing files
ls /var/lib/docker/containers/
- You’ll be presented with a list of long directory names. You have to select the one that starts with the container ID you noted down earlier and edit config.v2.json
nano /var/lib/docker/containers/7c79d07c0c6b......./config.v2.json
- Change the exposed port and save the file
- Restart docker
systemctl restart docker
- Start the docker container
docker start examplecom_postfix_1
- Verify the port has indeed been changed
docker ps --format "table {{.Names}}\t{{.ID}}\t{{.Ports}}"
This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.