cant run an smtp docker container on linux AMI

0

Hi, i'm trying to run postfix/dovcot containers using docker-compose on a new Linux AMI based vm i just created. docker daemon issues an error: "Error response from daemon: driver failed programming external connectivity on endpoint <XXXXXX Container name XXXXX> (582c7551d1c87e6131cb153b1dee9f9c1d0bd5ea1eaedfe070d7952276547569): Error starting userland proxy: listen tcp4 0.0.0.0:25: bind: address already in use"

indeed ,running

sudo lsof -i:25 |grep LISTEN

shows that the port is used. this is the output :

master  3038 root   13u  IPv4  17945      0t0  TCP localhost:smtp (LISTEN)

What am i missing here ? why is that port taken ? i read some comments on the net saying that Amazon prevent using port 25 by default - is that the case here ? Thanks in advance Sivan

asked 2 years ago544 views
1 Answer
0
Accepted Answer

So i found out that this AMI comes with postfix installed and enabled , i did not know postfix is installed by default. i simply had to disable and stop the service. I found this by mistake while running some ps aux commands ,grepping for pids. what i did was:

sudo systemctl stop postfix
sudo systemctl disable postfix # so that postfix wont reload when my vm restarts
answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions