Postfix: Can't connect [SOLVED]
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
8 Replies
@Stever:
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?
> ****
** 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)
Is postfix running?
# netstat -ltpn
Should have a line like this:
tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN 6705/master
@Stever:
OK, I misunderstood the original post.
Is postfix running?
$ netstat -ltn
> 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?
inet_interfaces = all
Not sure what you would do in webmin…
@Stever:
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
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.
@Stever:
http://www.postfix.org/postconf.5.html#inet_interfaces
Thank you.