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

已提问 2 年前564 查看次数
1 回答
0
已接受的回答

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
已回答 2 年前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则