Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'd like to mention that im really new to this so please bear with me. I'm trying to setup a forum software to send emails via postfix but I think my server has the port 25 blocked. I tried running these:



don't work:

telnet 25
telnet 25

tried flushing iptables and then using these rules but didn't work either:

sudo iptables --flush

sudo iptables -P INPUT ACCEPT
sudo iptables -P OUTPUT ACCEPT
sudo iptables -P FORWARD ACCEPT
sudo iptables -F
sudo iptables -X

doing a telnet on 25 port to localhost url works but nothing when telnet'ing in none local urls.


Oct 17 01:20:24 webhost postfix/smtp[3642]: connect to[2607:f8b0:400e:c03::1a]:25: Connection timed out

Oct 17 01:20:24 webhost postfix/smtp[3643]: connect to[2607:f8b0:400e:c03::1a]:25: Connection timed out

Oct 17 01:20:24 webhost postfix/smtp[3642]: 4744380032: to=<>, relay=none, delay=2892, delays=2741/0.03/150/0, dsn=4.4.1, status=deferred (connect to[2607:f$
share|improve this question

Could be your ISP or hosting provider filtering outbound connections to port 25 to prevent botnet spam. Use

traceroute -n


tcptraceroute -n 25

to check which hop is blocking the connection.

share|improve this answer
1st: 2nd: – Adonis K. Oct 16 '12 at 23:20
Both outputs appear to be from traceroute. Were you running the command on different hosts? – Ansgar Wiechers Oct 16 '12 at 23:34
i think the software automatically used traceroute instead of tcptraceroute cause i didnt have tcptraceroute installed. The outcome is exactly the same though. I just installed and tested it again – Adonis K. Oct 17 '12 at 8:39
I also tried 587 port but didn't reach the destination: – Adonis K. Oct 17 '12 at 8:46
If the output of tcptraceroute is the same as the output of the second trace in your first comment, then it does look to me like your provider is filtering outbound connections (at least to port 25). nmap shows port 587 on that host as "filtered". For submission you have to use a different host. – Ansgar Wiechers Oct 18 '12 at 8:37

Gmail recommends connecting to on port 587 for TLS/STARTTLS or 465 for SSL.

share|improve this answer
tried 587, didn't reach the destination: – Adonis K. Oct 17 '12 at 8:46
You're looking at the wrong host. You're tracing the route to one of GMail's MXs when you should be tracing the route to one of their submission hosts. Compare the output of host -t MX and host -t A – Ansgar Wiechers Oct 18 '12 at 8:41

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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