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

gefragt vor 2 Jahren564 Aufrufe
1 Antwort
0
Akzeptierte Antwort

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
beantwortet vor 2 Jahren

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen