smtp error - [Errno 111] Connection refused - when trying to install MM 3.0

Hello everyone!
This is the continuation of the topic started on the mailman-users mailing list.
Here is the original post: http://mail.python.org/pipermail/mailman-users/2012-June/073632.html And this is the post at which the conversation stopped: http://mail.python.org/pipermail/mailman-users/2012-June/073636.html
Basically, what I am trying to do is to set up a running version of Mailman on my local machine, by using the 5 minute guide (http://bazaar.launchpad.net/~mailman-coders/mailman/3.0/view/head:/src/mailm...).
After doing what Mark Sapiro suggested in the last post, I got this:
Jun 27 20:01:09 2012 (5011) [SMTPServer] listening: localhost:9025 Jun 27 20:01:09 2012 (5011) starting the SMTP server thread Jun 27 20:01:09 2012 (5011) connecting to localhost:9025 Jun 27 20:01:09 2012 (5011) [SMTPServer] starting asyncore loop Traceback (most recent call last): File "<console>", line 1, in <module> File "/usr/local/mm3/mailman/src/mailman/testing/layers.py", line 254, in setUp cls.smtpd.start() File "/usr/local/mm3/mailman/src/mailman/testing/mta.py", line 197, in start QueueController.start(self) File "/usr/local/mm3/mailman/eggs/lazr.smtptest-1.3-py2.6.egg/lazr/smtptest/controller.py", line 69, in start smtpd = self._connect() File "/usr/local/mm3/mailman/eggs/lazr.smtptest-1.3-py2.6.egg/lazr/smtptest/controller.py", line 60, in _connect smtpd.connect(self._server.host, self._server.port) File "/usr/lib/python2.6/smtplib.py", line 295, in connect self.sock = self._get_socket(host, port, self.timeout) File "/usr/lib/python2.6/smtplib.py", line 273, in _get_socket return socket.create_connection((port, host), timeout) File "/usr/lib/python2.6/socket.py", line 514, in create_connection raise error, msg error: [Errno 111] Connection refused
Also, there is one more thing that could be related to this problem. I also have installed Mailman 2.1.10 and after setting it up for the proper domain, when a user tries to subscribe to one of the lists, although the subscription is recorded, the confirmation email is never sent back. The message that appears in the smtp-failure log is this:
Jun 04 20:55:57 2012 (10427) Low level smtp error: (111, 'Connection refused'), msgid: <mailman.0.1338832556.10889.systers-admin@manu.pensiunealdyna.ro> Jun 04 20:55:57 2012 (10427) delivery to esdanci@acm.ro failed with code -1: (111, 'Connection refused')
Thanks, Emanuel

On Jun 27, 2012, at 11:07 AM, Danci Emanuel wrote:
This is the continuation of the topic started on the mailman-users mailing list.
Thanks for moving the discussion here.
So, in Mark's suggestion, this exception occurs after you've called
x.setUp()? Or does that call succeed? If it does succeed, don't call
x.tearDown(), but instead go to a different shell on the same machine and try
to telnet localhost 9025
. What happens then?
You could try changing the port that the testing framework uses to list for SMTP (and other) connections. That is set in the file src/mailman/testing/testing.cfg. Does it help if you change the smtp_port value?
Do you have any kind of local firewall set up? What OS are you using?
Cheers, -Barry

On 6/27/2012 11:07 AM, Danci Emanuel wrote:
Barry has responded to the MM 3 part of this. With respect to the above, there is no MTA listening on SMTPHOST/SMTPPORT (default licalhost/25) or connection is blocked by a firewall.
See the FAQ at <http://wiki.list.org/x/-IA9>.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan

How can I make sure that the MTA is properly listening on SMTPHOST/SMTPPORT (they have the default values, SMTPHOST = 'localhost', SMTPPORT = 0)? I installed Postfix by using the official directions( http://www.gnu.org/software/mailman/mailman-install/postfix-integration.html )
Also, in regard to the firewall I added a preconfigured rule for the smtp service (port 25), so I think this should be fine.
Furthermore, netstat -na | grep ":25"
produces the following result:
tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN
I am just guessing, but could this also be to the /etc/hosts
folder permissions? This is what
ls -ld /etc/hosts
produces:
-rw-r--r-- 1 root root 281 2012-06-29 03:08 /etc/hosts
Thanks, Emanuel DANCI
From: Mark Sapiro <mark@msapiro.net> To: Danci Emanuel <danci_emanuel@yahoo.com> Cc: "mailman-developers@python.org" <mailman-developers@python.org> Sent: Thursday, June 28, 2012 1:17 AM Subject: Re: [Mailman-Developers] smtp error - [Errno 111] Connection refused - when trying to install MM 3.0
On 6/27/2012 11:07 AM, Danci Emanuel wrote:
Barry has responded to the MM 3 part of this. With respect to the above, there is no MTA listening on SMTPHOST/SMTPPORT (default licalhost/25) or connection is blocked by a firewall.
See the FAQ at <http://wiki.list.org/x/-IA9>.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan

On 6/28/2012 5:29 PM, Danci Emanuel wrote:
Furthermore,
netstat -na | grep ":25"
produces the following result: tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN
What happens if you do
telnet localhost 25
So anything can read it, so that shouldn't be an issue.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan

Exactly what happens with the 9025 one:
Trying ::1... telnet: Unable to connect to remote host: Connection refused
- executed as root. Emanuel
From: Mark Sapiro <mark@msapiro.net> To: Danci Emanuel <danci_emanuel@yahoo.com> Cc: "mailman-developers@python.org" <mailman-developers@python.org> Sent: Friday, June 29, 2012 3:40 AM Subject: Re: [Mailman-Developers] smtp error - [Errno 111] Connection refused - when trying to install MM 3.0
On 6/28/2012 5:29 PM, Danci Emanuel wrote:
Furthermore,
netstat -na | grep ":25"
produces the following result: tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN
What happens if you do
telnet localhost 25
So anything can read it, so that shouldn't be an issue.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan

On 6/28/2012 5:47 PM, Danci Emanuel wrote:
So it has nothing to do with Mailman.
It looks like what's in /etc /hosts is an IPv6 address for localhost
You should have something similar to
127.0.0.1 localhost.localdomain localhost ::1 localhost6.localdomain6 localhost6
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan

Hi Mark!
Thank you very much for the solution! Indeed, that was the cause generating the error. I have commented out some lines from /etc/hosts and now everything is working smoothly.
Thanks again! Emanuel
From: Mark Sapiro <mark@msapiro.net> To: Danci Emanuel <danci_emanuel@yahoo.com> Cc: "mailman-developers@python.org" <mailman-developers@python.org> Sent: Friday, June 29, 2012 4:05 AM Subject: Re: [Mailman-Developers] smtp error - [Errno 111] Connection refused - when trying to install MM 3.0
On 6/28/2012 5:47 PM, Danci Emanuel wrote:
So it has nothing to do with Mailman.
It looks like what's in /etc /hosts is an IPv6 address for localhost
You should have something similar to
127.0.0.1 localhost.localdomain localhost ::1 localhost6.localdomain6 localhost6
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan

On Jun 27, 2012, at 11:07 AM, Danci Emanuel wrote:
This is the continuation of the topic started on the mailman-users mailing list.
Thanks for moving the discussion here.
So, in Mark's suggestion, this exception occurs after you've called
x.setUp()? Or does that call succeed? If it does succeed, don't call
x.tearDown(), but instead go to a different shell on the same machine and try
to telnet localhost 9025
. What happens then?
You could try changing the port that the testing framework uses to list for SMTP (and other) connections. That is set in the file src/mailman/testing/testing.cfg. Does it help if you change the smtp_port value?
Do you have any kind of local firewall set up? What OS are you using?
Cheers, -Barry

On 6/27/2012 11:07 AM, Danci Emanuel wrote:
Barry has responded to the MM 3 part of this. With respect to the above, there is no MTA listening on SMTPHOST/SMTPPORT (default licalhost/25) or connection is blocked by a firewall.
See the FAQ at <http://wiki.list.org/x/-IA9>.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan

How can I make sure that the MTA is properly listening on SMTPHOST/SMTPPORT (they have the default values, SMTPHOST = 'localhost', SMTPPORT = 0)? I installed Postfix by using the official directions( http://www.gnu.org/software/mailman/mailman-install/postfix-integration.html )
Also, in regard to the firewall I added a preconfigured rule for the smtp service (port 25), so I think this should be fine.
Furthermore, netstat -na | grep ":25"
produces the following result:
tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN
I am just guessing, but could this also be to the /etc/hosts
folder permissions? This is what
ls -ld /etc/hosts
produces:
-rw-r--r-- 1 root root 281 2012-06-29 03:08 /etc/hosts
Thanks, Emanuel DANCI
From: Mark Sapiro <mark@msapiro.net> To: Danci Emanuel <danci_emanuel@yahoo.com> Cc: "mailman-developers@python.org" <mailman-developers@python.org> Sent: Thursday, June 28, 2012 1:17 AM Subject: Re: [Mailman-Developers] smtp error - [Errno 111] Connection refused - when trying to install MM 3.0
On 6/27/2012 11:07 AM, Danci Emanuel wrote:
Barry has responded to the MM 3 part of this. With respect to the above, there is no MTA listening on SMTPHOST/SMTPPORT (default licalhost/25) or connection is blocked by a firewall.
See the FAQ at <http://wiki.list.org/x/-IA9>.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan

On 6/28/2012 5:29 PM, Danci Emanuel wrote:
Furthermore,
netstat -na | grep ":25"
produces the following result: tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN
What happens if you do
telnet localhost 25
So anything can read it, so that shouldn't be an issue.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan

Exactly what happens with the 9025 one:
Trying ::1... telnet: Unable to connect to remote host: Connection refused
- executed as root. Emanuel
From: Mark Sapiro <mark@msapiro.net> To: Danci Emanuel <danci_emanuel@yahoo.com> Cc: "mailman-developers@python.org" <mailman-developers@python.org> Sent: Friday, June 29, 2012 3:40 AM Subject: Re: [Mailman-Developers] smtp error - [Errno 111] Connection refused - when trying to install MM 3.0
On 6/28/2012 5:29 PM, Danci Emanuel wrote:
Furthermore,
netstat -na | grep ":25"
produces the following result: tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN
What happens if you do
telnet localhost 25
So anything can read it, so that shouldn't be an issue.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan

On 6/28/2012 5:47 PM, Danci Emanuel wrote:
So it has nothing to do with Mailman.
It looks like what's in /etc /hosts is an IPv6 address for localhost
You should have something similar to
127.0.0.1 localhost.localdomain localhost ::1 localhost6.localdomain6 localhost6
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan

Hi Mark!
Thank you very much for the solution! Indeed, that was the cause generating the error. I have commented out some lines from /etc/hosts and now everything is working smoothly.
Thanks again! Emanuel
From: Mark Sapiro <mark@msapiro.net> To: Danci Emanuel <danci_emanuel@yahoo.com> Cc: "mailman-developers@python.org" <mailman-developers@python.org> Sent: Friday, June 29, 2012 4:05 AM Subject: Re: [Mailman-Developers] smtp error - [Errno 111] Connection refused - when trying to install MM 3.0
On 6/28/2012 5:47 PM, Danci Emanuel wrote:
So it has nothing to do with Mailman.
It looks like what's in /etc /hosts is an IPv6 address for localhost
You should have something similar to
127.0.0.1 localhost.localdomain localhost ::1 localhost6.localdomain6 localhost6
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
participants (3)
-
Barry Warsaw
-
Danci Emanuel
-
Mark Sapiro