Closed paris-ci closed 4 years ago
I can otherwise send mail normally
Have you given ruby the privilege to run on system ports?
sudo setcap 'cap_net_bind_service=+ep' /usr/bin/ruby2.3
If you have, can you please postal start
and then send us the output of postal status
@willpower232 Yeah, I did that, forgot to mention, sorry.
Started Procodile supervisor with PID 2889
Procodile Version 1.0.17
Application Root /opt/postal/app
Supervisor PID 2889
Started 2017-08-11 13:30:01 +0000
|| web
|| Quantity 1
|| Command bundle exec puma -C config/puma.rb
|| Respawning 5 every 3600 seconds
|| Restart mode usr1
|| Log path none specified
|| Address/Port none
|| => web.1 Running 13:30 pid:2895 respawns:0 port:- tag:-
|| worker
|| Quantity 1
|| Command bundle exec ruby script/worker.rb
|| Respawning 5 every 3600 seconds
|| Restart mode start-term
|| Log path none specified
|| Address/Port none
|| => worker.1 Running 13:30 pid:2897 respawns:0 port:- tag:-
|| cron
|| Quantity 1
|| Command bundle exec rake postal:cron
|| Respawning 5 every 3600 seconds
|| Restart mode term-start
|| Log path none specified
|| Address/Port none
|| => cron.1 Running 13:30 pid:2899 respawns:0 port:- tag:-
|| smtp
|| Quantity 1
|| Command bundle exec rake postal:smtp_server
|| Respawning 5 every 3600 seconds
|| Restart mode usr1
|| Log path none specified
|| Address/Port none
|| => smtp.1 Running 13:30 pid:2901 respawns:0 port:- tag:-
|| requeuer
|| Quantity 1
|| Command bundle exec rake postal:requeuer
|| Respawning 5 every 3600 seconds
|| Restart mode term-start
|| Log path none specified
|| Address/Port none
|| => requeuer.1 Running 13:30 pid:2906 respawns:0 port:- tag:-
sorry I managed to not see it in your netstat -lnp
but its there!
It must be that something is blocking smtp connection to your server, either your ISP or your server company.
You can try using iptables to use port 2525 instead, see https://github.com/atech/postal/issues/306#issuecomment-321571866
@willpower232 No luck starting the server on port 2525 and redirecting with IPTables... So I tried
\2) > helo \1) < helo
So it's not a connexion problem between me and the mail server... It looks like postal is not listening to 0.0.0.0
Postal is supposed to be running on port 25, thats its intended behaviour.
Those iptables rules allow you to access postal port 25 using port 2525, a small sacrifice to get around connection issues.
I know, but I set the IPTables rules so that the port 25 will be redirected to port 2525, and setup postal to listen on 2525, but it's still not working. However, if I use netcat to open the port 25, I can telnet into it, so it isn't a connexion problem
I just tried this and it appears Postfix is listening on this host:
charlie@charlie-pc ~ $ telnet 5.196.41.99 25
Trying 5.196.41.99...
Connected to 5.196.41.99.
Escape character is '^]'.
220-mail.api-d.com ESMTP Postfix
With regard to your original question, if you can connect to SMTP locally but not externally, this is most likely a firewall issue. I see you have no INPUT rules in iptables, so maybe an external firewall?
Your screenshots actually show a completely different error unable to resolve mx.mail.api-d.com
. I can resolve that name from here. Are you still having trouble with this?
@catphish Hey \o Thanks for getting back to me, I reinstalled postfix and everything on another container so I could still receive mail.
I changed nothing on the external firewall, and the two containers have an empty iptables/ufw set of rules.
There seems to be nothing listening on external interfaces for port 25, here is some debug info, hope you can help
postal run
postal test-app-smtp MYGMAILADDRESS@gmail.com
netstat -lnp
telnet mail.api-d.com 25 [my mail server, from my local computer]
telnet mail.api-d.com 25 [from the mail server itself]
iptables -L
iptables -vL -t nat
ufw status verbose
postal config
Screenshot of a sendmail to my server from my server