PostFix can receive but can not send emails

I spent all day trying to configure a system properly but still have some problems with Postfix configuration, at least I think so since I can not recive emails. My objective is to setup a virtual server under Virtualmin where the domain name is hosted by dyndns.org.

The website hosting is working fine so I move to the next step: configure Postfix.

Configure hostname in dyndns

Configure MX records in dyndns

configure port forwarding on my router

enabled SMTP port 587 in Postfix (Port 25 is blocked)

I can receive internal and external emails but I can only send emails internally. Whenever I send emails to an external address I get a connection timeout message (see log sample below).

System Info:

Ubuntu 8.04 TLS

Webmin 1.480

Virtualmin 3.73 GPL

By the way, can anyone tell me how a sending mail server know which port to send emails to? Like in my case I am using port 587 and hotmail seems to know what to use but as you can see from the mail.log below my system is sending to port 25 all the time and at least in my other server (cjsdfw.com) I am using port 587 as well and not 25.

Hi there,
from your logs, my first guess would be a slow internet connection might be causing the trouble.
have you tried to check the servers Internet speed? for example try to ping external addresses like yahoo or hotmail and observer the RTT.
In your case i think your server tries to connect to the external servers receiving mail, but due to the slow connection, its timed out and the foreign server breaks the connection.
Also your delay in the logs is really magnificent, i think you should check the internet speeds of that server first.

I have the same problem. I do received mail from internal and external. But i cannot send external. I have 25Mbits fiber, so speed is not problem. I have also checked for blacklist .. but not in the list. I have an linux mail server that works fine. Change to ubuntu got that problem

Most email servers will not accept email coming from a server on a dynamic ip. They consider that as spam (well, I have configured my servers the same). So the only option I see is that you have to relay the outgoing email trhough your isp.

Edit: I didn't see that you have a static IP. However, if you still can't figure it out, you may give relaying a try anyway