Open silviubogan opened 4 years ago
Hello, Try run docker-compose logs -f ...smtp_relay_1 and see what was the reason. When it is not autorized you can find in his logs.
The parameter -f is for monitoring. So:
I tried your commands. This did not help me install the ping
command, as you can see below.
$ docker-compose logs -f ...smtp_relay_1
(I replaced ...
with the rest of the full name)
silviu@silviu-Inspiron-3537 /some/dir/path/here [1]> docker-compose logs -f ...smtp_relay_1
ERROR: No such service: ...smtp_relay_1
$ docker-compose logs -f smtp
silviu@silviu-Inspiron-3537 /some/dir/path/here [1]> docker-compose logs -f smtp
Attaching to ...smtp_relay_1
smtp_1 | + sed -ri '
smtp_1 | s/^#?(dc_local_interfaces)=.*/\1='\''[0.0.0.0]:25 ; [::0]:25'\''/;
smtp_1 | s/^#?(dc_other_hostnames)=.*/\1='\'''\''/;
smtp_1 | s/^#?(dc_relay_nets)=.*/\1='\''172.21.0.3\/16'\''/;
smtp_1 | s/^#?(dc_eximconfig_configtype)=.*/\1='\''internet'\''/;
smtp_1 | ' /etc/exim4/update-exim4.conf.conf
smtp_1 | + update-exim4.conf -v
smtp_1 | using non-split configuration scheme from /etc/exim4/exim4.conf.template
smtp_1 | 1 LOG: MAIN
smtp_1 | 1 exim 4.92 daemon started: pid=1, -q15m, listening for SMTP on port 25 (IPv6 and IPv4)
smtp_1 | + sed -ri '
smtp_1 | s/^#?(dc_local_interfaces)=.*/\1='\''[0.0.0.0]:25 ; [::0]:25'\''/;
smtp_1 | s/^#?(dc_other_hostnames)=.*/\1='\'''\''/;
smtp_1 | s/^#?(dc_relay_nets)=.*/\1='\''172.21.0.5\/16'\''/;
smtp_1 | s/^#?(dc_eximconfig_configtype)=.*/\1='\''internet'\''/;
smtp_1 | ' /etc/exim4/update-exim4.conf.conf
smtp_1 | + update-exim4.conf -v
smtp_1 | using non-split configuration scheme from /etc/exim4/exim4.conf.template
smtp_1 | 1 LOG: MAIN
smtp_1 | 1 exim 4.92 daemon started: pid=1, -q15m, listening for SMTP on port 25 (IPv6 and IPv4)
$ docker-compose exec wordpress bash
silviu@silviu-Inspiron-3537 /some/dir/path/here [1]> docker-compose exec wordpress bash
root@ee98931fa89e:/var/www/html# ping wordpress
bash: ping: command not found
root@ee98931fa89e:/var/www/html# ping localhost:25
bash: ping: command not found
root@ee98931fa89e:/var/www/html# apt-get install iputils-ping
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package iputils-ping
root@ee98931fa89e:/var/www/html# apt-get install ping
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package ping
root@ee98931fa89e:/var/www/html#
Thank you.
I tried your commands. This did not help me install the
ping
command, as you can see below.
$ docker-compose logs -f ...smtp_relay_1
(I replaced
...
with the rest of the full name)silviu@silviu-Inspiron-3537 /some/dir/path/here [1]> docker-compose logs -f ...smtp_relay_1 ERROR: No such service: ...smtp_relay_1
$ docker-compose logs -f smtp
silviu@silviu-Inspiron-3537 /some/dir/path/here [1]> docker-compose logs -f smtp Attaching to ...smtp_relay_1 smtp_1 | + sed -ri ' smtp_1 | s/^#?(dc_local_interfaces)=.*/\1='\''[0.0.0.0]:25 ; [::0]:25'\''/; smtp_1 | s/^#?(dc_other_hostnames)=.*/\1='\'''\''/; smtp_1 | s/^#?(dc_relay_nets)=.*/\1='\''172.21.0.3\/16'\''/; smtp_1 | s/^#?(dc_eximconfig_configtype)=.*/\1='\''internet'\''/; smtp_1 | ' /etc/exim4/update-exim4.conf.conf smtp_1 | + update-exim4.conf -v smtp_1 | using non-split configuration scheme from /etc/exim4/exim4.conf.template smtp_1 | 1 LOG: MAIN smtp_1 | 1 exim 4.92 daemon started: pid=1, -q15m, listening for SMTP on port 25 (IPv6 and IPv4) smtp_1 | + sed -ri ' smtp_1 | s/^#?(dc_local_interfaces)=.*/\1='\''[0.0.0.0]:25 ; [::0]:25'\''/; smtp_1 | s/^#?(dc_other_hostnames)=.*/\1='\'''\''/; smtp_1 | s/^#?(dc_relay_nets)=.*/\1='\''172.21.0.5\/16'\''/; smtp_1 | s/^#?(dc_eximconfig_configtype)=.*/\1='\''internet'\''/; smtp_1 | ' /etc/exim4/update-exim4.conf.conf smtp_1 | + update-exim4.conf -v smtp_1 | using non-split configuration scheme from /etc/exim4/exim4.conf.template smtp_1 | 1 LOG: MAIN smtp_1 | 1 exim 4.92 daemon started: pid=1, -q15m, listening for SMTP on port 25 (IPv6 and IPv4)
$ docker-compose exec wordpress bash
silviu@silviu-Inspiron-3537 /some/dir/path/here [1]> docker-compose exec wordpress bash root@ee98931fa89e:/var/www/html# ping wordpress bash: ping: command not found root@ee98931fa89e:/var/www/html# ping localhost:25 bash: ping: command not found root@ee98931fa89e:/var/www/html# apt-get install iputils-ping Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package iputils-ping root@ee98931fa89e:/var/www/html# apt-get install ping Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package ping root@ee98931fa89e:/var/www/html#
Thank you.
It seems that you haven't updated your apt repositore. So:
apt update && apt install -y iputils-ping , and then, ping your smtp container, acording to your log, it maybe ...smtp_relay_1.
Let's see if you can succes on ping your exim server.
I have this in my docker-compose.yml (replace
...
with anything valid):and this:
It seems that the SMTP is not accessible from the Contact Form 7 WordPress plugin which I use through the REST API. How can I test the smtp container in a fast and good way or how can I change the
docker-compose.yml
file to make it work?When I run
$ docker-compose up
I do not get errors.The JSON object I get in the browser is this:
The related forum question is here.
Thank you.