Ubuntu – Postfix can receive but can’t send emails

emailmailpostfixserver

Can someone please help, I setup Postfix and can receive, but can't send email from my server, when I use Gmail smtp i can send emails as Gmail user but that is not what I want.

Here is my Mail Queue:

enter image description here

Checked if port is open by some website:

enter image description here

Telnet from my local network on port 25 say:

gam.gamblershome.info EMTP Postfix (Ubuntu)

I am not an expert, if someone can help me I will be more than grateful.

Best Answer

Your own port 25 being open has nothing to do with outgoing email.

If you're getting connection timeouts to big email providers like Google and Hotmail I would suggest one of three things is happening:

  • Your ISP blocks outbound port 25. This is increasingly popular on home ISPs to stop spam. They will force you to use their central mailserver.
  • You are inadvertently blocking outbound port 25. This would be something you've actively done. Check your ufw/iptables rules for spurious deny rules.
  • The remote services are blocking you.

But double check the real log with sudo less /var/log/mail.log and make sure you're not missing any obvious issues your pretty logs above aren't showing.

You can also debug more simple network issues with simple tools:

ping mx1.hotmail.com

If ping fails, there's a serious network-level issue. You managed to look it up in the first place so DNS should be fine but if you can't ping it that might suggest you're being blocked completely.

telnet mx1.hotmail.com 25

That should open up a raw connection to the remote mailserver. If that doesn't work, you know it's not postfix that's tripping over.

Related Question