0

Am trying send email to my server to gmail account with postfix with mail command

echo "check" | mail -s "check" aryan.kingrockzz@gmail.com

and email not comming and error is

 Sep  1 05:05:24 ns1 postfix/pickup[23268]: 5EC10A2494: uid=0 from=<root@ns1.sloc.in>
    Sep  1 05:05:24 ns1 postfix/cleanup[23345]: 5EC10A2494: message-id=<20160901120524.5EC10A2494@sloc.in>
    Sep  1 05:05:24 ns1 postfix/qmgr[23269]: 5EC10A2494: from=<root@ns1.sloc.in>, size=326, nrcpt=1 (queue active)
    Sep  1 05:05:24 ns1 postfix/error[23338]: 5EC10A2494: to=<aryan.kingrockzz@gmail.com>, relay=none, delay=0.01, delays=0.01/0/0/0, dsn=4.4.1, status=deferred (delivery temporarily suspended: connect to alt2.gmail-smtp-in.l.google.com[173.194.219.26]:25: No route to host)

2 Answers 2

2

Outgoing traffic on Port 25 might be blocked by your ISP. Quite commonplace.

As the error message says: Your machine cannot reach the target system on port 25. Try manually:

telnet alt2.gmail-smtp-in.l.google.com 25
2
  • 1
    I have a similar issue on my Linode server when I do telnet as you asked. It stays on "Trying..." and never gets past that, but when I use my computer it connects fine.
    – ArchNoob
    Jul 2, 2020 at 14:15
  • Your suggestion made me notice that Linode is blocking the traffic, which they now do Thanks!
    – ArchNoob
    Jul 2, 2020 at 14:33
1

You need to check your internet connection first. Then find out the interface that internet connection is on. lets assume its eth0

ip route list

if you don't have a default route on that interface, you need to add one.

sudo ip route add default dev eth0

and then postqueue -f to retry the deferred email or try sending a new one.

if you are using a vpn connection to connect your server to the internet your interface probably is ppp0 , you can check that via ip a command.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.