Re: [Zope] Traceback Lines for Send Mail Error
Asad Habib wrote at 2005-7-25 15:19 -0400: > ... >socket.gethostname() is not >returning the full canonical name of the machine. "gethostname" is not required to return the FQDN (Fully Qualified Domain Name). This is not your problem. But "gethostbyname(gethostname())" should be able to resolve whatever "gethostname()" returns into an IP address. If you already told us the platform you are using, then I missed this information (or forgot it). If you work under *nix, you may add an entry to "/etc/hosts" that assigns an IP address to the value "gethostname()" returns. I cannot help you much when you work under some variety of Windows. But, I know, Windows knows a "hosts" file as well. Maybe, the same approach works there, too. -- Dieter ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Traceback Lines for Send Mail Error
Thanks Dieter. You hit the nail on the head. socket.gethostname() is not returning the full canonical name of the machine. But how do I correct this? Any idea? - Asad On Mon, 25 Jul 2005, Dieter Maurer wrote: > Asad Habib wrote at 2005-7-25 09:24 -0400: > >Well, nothing has changed in the mail server setup so I don't know why > >this error is being thrown. > > I have been wrong. The message does not originate from your > mail server. > > >Where can I access smtplib (I cannot locate > >this Python library in my Zope hierarchy)? > > "smtplib" is part of the Python runtime library. > > >Someone else also reported > >receiving this error as I discovered on Google but the issue was not > >resolved. Any help would be appreciated. > > Looking at the "smtplib" source and your traceback reveals: > > "smtplib.SMTP.__init__" is trying to determine the > local hostname. The code looks like this: > > if local_hostname is not None: > self.local_hostname = local_hostname > else: > # RFC 2821 says we should use the fqdn in the EHLO/HELO verb, and > # if that can't be calculated, that we should use a domain literal > # instead (essentially an encoded IP address like [A.B.C.D]). > fqdn = socket.getfqdn() > if '.' in fqdn: > self.local_hostname = fqdn > else: > # We can't find an fqdn hostname, so use a domain literal > addr = socket.gethostbyname(socket.gethostname()) > # your exception is raised in the line above > self.local_hostname = '[%s]' % addr > > > This means that you local system is in a strange state. > Probably, it is unable to determine its hostname. > > Try (in an interactive Python interpreter): > > import socket > socket.gethostname() > socket.gethostbyname(socket.gethostname()) > > > -- > Dieter > ___ > Zope maillist - Zope@zope.org > http://mail.zope.org/mailman/listinfo/zope > ** No cross posts or HTML encoding! ** > (Related lists - > http://mail.zope.org/mailman/listinfo/zope-announce > http://mail.zope.org/mailman/listinfo/zope-dev ) > ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Traceback Lines for Send Mail Error
Asad Habib wrote at 2005-7-25 09:24 -0400: >Well, nothing has changed in the mail server setup so I don't know why >this error is being thrown. I have been wrong. The message does not originate from your mail server. >Where can I access smtplib (I cannot locate >this Python library in my Zope hierarchy)? "smtplib" is part of the Python runtime library. >Someone else also reported >receiving this error as I discovered on Google but the issue was not >resolved. Any help would be appreciated. Looking at the "smtplib" source and your traceback reveals: "smtplib.SMTP.__init__" is trying to determine the local hostname. The code looks like this: if local_hostname is not None: self.local_hostname = local_hostname else: # RFC 2821 says we should use the fqdn in the EHLO/HELO verb, and # if that can't be calculated, that we should use a domain literal # instead (essentially an encoded IP address like [A.B.C.D]). fqdn = socket.getfqdn() if '.' in fqdn: self.local_hostname = fqdn else: # We can't find an fqdn hostname, so use a domain literal addr = socket.gethostbyname(socket.gethostname()) # your exception is raised in the line above self.local_hostname = '[%s]' % addr This means that you local system is in a strange state. Probably, it is unable to determine its hostname. Try (in an interactive Python interpreter): import socket socket.gethostname() socket.gethostbyname(socket.gethostname()) -- Dieter ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Traceback Lines for Send Mail Error
Please stay on the list. I meant a real tcp trace, like ethereal. On 25 Jul 2005, at 16:22, Asad Habib wrote: Hello. I used traceroute and it did not return any errors. - Asad On Mon, 25 Jul 2005, Florent Guillaume wrote: Asad Habib <[EMAIL PROTECTED]> wrote: Maurer, I am certain that this is a Zope issue that has not been figured out as yet. I was even able to connect to my SMTP server via the Terminal application on a Mac. Do I have any other options? You should do a network trace to see what makes the SMTP server puke. Florent -- Florent Guillaume, Nuxeo (Paris, France) CTO, Director of R&D +33 1 40 33 71 59 http://nuxeo.com [EMAIL PROTECTED] ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Traceback Lines for Send Mail Error
Asad Habib <[EMAIL PROTECTED]> wrote: > Maurer, I am certain that this is a Zope issue that has not been figured > out as yet. I was even able to connect to my SMTP server via the Terminal > application on a Mac. Do I have any other options? You should do a network trace to see what makes the SMTP server puke. Florent -- Florent Guillaume, Nuxeo (Paris, France) CTO, Director of R&D +33 1 40 33 71 59 http://nuxeo.com [EMAIL PROTECTED] ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Traceback Lines for Send Mail Error
Maurer, I am certain that this is a Zope issue that has not been figured out as yet. I was even able to connect to my SMTP server via the Terminal application on a Mac. Do I have any other options? - Asad ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Traceback Lines for Send Mail Error
Well, nothing has changed in the mail server setup so I don't know why this error is being thrown. Where can I access smtplib (I cannot locate this Python library in my Zope hierarchy)? Someone else also reported receiving this error as I discovered on Google but the issue was not resolved. Any help would be appreciated. Thanks. - Asad On Sun, 24 Jul 2005, Dieter Maurer wrote: > Asad Habib wrote at 2005-7-22 09:19 -0400: > >If it helps, the last lines in the traceback are as follows: > > > >Module DocumentTemplate.DT_String, line 474, in __call__ > >Module Products.MailHost.SendMailTag, line 116, in render > >Module Products.MailHost.MailHost, line 125, in send > >Module Products.MailHost.MailHost, line 144, in _send > >Module smtplib, line 254, in __init__ > >gaierror: (7, 'No address associated with nodename') > > This error comes from your mail server. > Checks its (the mail server's) documentation to make sense of it. > > > -- > Dieter > ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Traceback Lines for Send Mail Error
Asad Habib wrote at 2005-7-22 09:19 -0400: >If it helps, the last lines in the traceback are as follows: > >Module DocumentTemplate.DT_String, line 474, in __call__ >Module Products.MailHost.SendMailTag, line 116, in render >Module Products.MailHost.MailHost, line 125, in send >Module Products.MailHost.MailHost, line 144, in _send >Module smtplib, line 254, in __init__ >gaierror: (7, 'No address associated with nodename') This error comes from your mail server. Checks its (the mail server's) documentation to make sense of it. -- Dieter ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Traceback Lines for Send Mail Error
If it helps, the last lines in the traceback are as follows: Module DocumentTemplate.DT_String, line 474, in __call__ Module Products.MailHost.SendMailTag, line 116, in render Module Products.MailHost.MailHost, line 125, in send Module Products.MailHost.MailHost, line 144, in _send Module smtplib, line 254, in __init__ gaierror: (7, 'No address associated with nodename') Thanks. - Asad ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )