Linode Forum
https://forum.linode.com/

Postfix: Can't connect [SOLVED]
https://forum.linode.com/viewtopic.php?f=11&t=6778
Page 1 of 1

Author:  yakatz [ Tue Mar 01, 2011 6:53 pm ]
Post subject:  Postfix: Can't connect [SOLVED]

I am not sure if I am having a firewall (iptables) issue or a Postfix issue.
When I try to send email to my linode, it get "No connection could be made because the target machine actively refused it __IP__:25"

If I use telnet on the server itself, everything works fine.

The reason I do not think that it is iptables' fault is because I ran a port scan:
Ports blocked by iptables drop traffic, while this one, which is not blocked actually rejects traffic.

(iptables rule: ACCEPT tcp -- anywhere anywhere multiport dports smtp )

I do not have a lot of experience with postfix, but I was following a guide on the linode library to set it up.

System: Ubuntu 10.04 LTS i686

Author:  Stever [ Tue Mar 01, 2011 6:56 pm ]
Post subject: 

Many ISPs block outgoing port 25 to prevent abuse - it is usually best to set up postfix to use smtps and/or submission ports for originating mail from external clients.

Author:  yakatz [ Tue Mar 01, 2011 6:59 pm ]
Post subject: 

Stever wrote:
Many ISPs block outgoing port 25 to prevent abuse - it is usually best to set up postfix to use smtps and/or submission for originating mail from external clients.


I am trying to set up a real mail server (so I can pipe mail to a php script, if it matters).
And, I can connect to other servers on port 25 with no trouble.

Is a bounce message better?
Quote:
**********************************************
** THIS IS A WARNING MESSAGE ONLY **
** YOU DO NOT NEED TO RESEND YOUR MESSAGE **
**********************************************

The original message was received at Mon, 28 Feb 2011 16:34:43 -0500 (EST)
from po4.mail.umd.edu [128.8.165.133]

----- The following addresses had transient delivery errors -----
<yakatz@ym-linode-01.10815.net>


Final-Recipient: RFC822; yakatz@ym-linode-01.10815.net
Action: delayed
Status: 4.4.1
Remote-MTA: DNS; ym-linode-01.10815.net
Last-Attempt-Date: Mon, 28 Feb 2011 20:40:46 -0500 (EST)
Will-Retry-Until: Tue, 1 Mar 2011 16:34:43 -0500 (EST)

Author:  Stever [ Tue Mar 01, 2011 7:03 pm ]
Post subject: 

OK, I misunderstood the original post.

Is postfix running?

Code:
# netstat -ltpn

Should have a line like this:
Code:
tcp        0      0 0.0.0.0:25              0.0.0.0:*               LISTEN      6705/master

Author:  yakatz [ Tue Mar 01, 2011 7:08 pm ]
Post subject: 

Stever wrote:
OK, I misunderstood the original post.

Is postfix running?

Code:
$ netstat -ltn



Quote:
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN
tcp6 0 0 :::80 :::* LISTEN
tcp6 0 0 :::22 :::* LISTEN
tcp6 0 0 :::443 :::* LISTEN

It appears to be running, but not bound to the main IP.
Since I am not familiar with Postfix (my usual mail program is Microsoft SMTP/Exchange), I planned on using Webmin to manage postfix.
How do I change the listening port?

Author:  Stever [ Tue Mar 01, 2011 7:11 pm ]
Post subject: 

It looks like you are only binding to localhost. You can set which interface postfix will bind to with "inet_interfaces" in main.cf. Normally you would use
Code:
inet_interfaces = all


Not sure what you would do in webmin...

Author:  yakatz [ Tue Mar 01, 2011 7:16 pm ]
Post subject: 

Stever wrote:
It looks like you are only binding to localhost. You can set which interface postfix will bind to with "inet_interfaces" in main.cf. Normally you would use
Code:
inet_interfaces = all


Not sure what you would do in webmin...


Does it only bind to interfaces or can I use IP bindings like Apache?

Thanks so much.

Author:  Stever [ Tue Mar 01, 2011 7:28 pm ]
Post subject: 

http://www.postfix.org/postconf.5.html#inet_interfaces

Author:  yakatz [ Tue Mar 01, 2011 7:28 pm ]
Post subject: 

Stever wrote:
http://www.postfix.org/postconf.5.html#inet_interfaces


Thank you.

Page 1 of 1 All times are UTC-04:00
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/