Opened 20 years ago
Closed 20 years ago
#2921 closed defect (invalid)
Failure sending notification
| Reported by: | Owned by: | Jonas Borgström | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | general | Version: | 0.9.4 |
| Severity: | normal | Keywords: | |
| Cc: | Branch: | ||
| Release Notes: | |||
| API Changes: | |||
| Internal Changes: | |||
Description (last modified by )
I'm getting the following error when adding a new ticket or changing an existing one. I'm running 0.9.4 an my trac.ini [notification] section looks like:
[notification] always_notify_owner = true smtp_always_cc = xbeumala@communi.tv smtp_password = XXXXXXXX smtp_enabled = true smtp_replyto = xbeumala@comuni.tv smtp_port = 25 always_notify_reporter = true always_notify_owner = true smtp_server = mail.communi.tv smtp_from = dev@communi.tv smtp_user = dev@communi.tv
Here's the error.
21:59:03 Trac[web_ui] ERROR: Failure sending notification on change to ticket #6: (-2, 'Name or service not known')
Traceback (most recent call last):
File "/usr/lib/python2.3/site-packages/trac/ticket/web_ui.py", line 352, in _do_save
tn.notify(ticket, newticket=False, modtime=now)
File "/usr/lib/python2.3/site-packages/trac/Notify.py", line 211, in notify
NotifyEmail.notify(self, ticket.id, subject)
File "/usr/lib/python2.3/site-packages/trac/Notify.py", line 108, in notify
Notify.notify(self, resid)
File "/usr/lib/python2.3/site-packages/trac/Notify.py", line 45, in notify
self.begin_send()
File "/usr/lib/python2.3/site-packages/trac/Notify.py", line 116, in begin_send
self.server = smtplib.SMTP(self.smtp_server, self.smtp_port)
File "/usr/lib/python2.3/smtplib.py", line 254, in __init__
addr = socket.gethostbyname(socket.gethostname())
gaierror: (-2, 'Name or service not known')
I've been looking into another similar tickets, but doesn't seems to work for me.
Thanks a lot for your great work!
X.
Attachments (0)
Change History (6)
comment:1 by , 20 years ago
| Description: | modified (diff) |
|---|
comment:2 by , 20 years ago
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |
Well the script didn't work for me and I was receiving againa getHostName() error. I've been digging and have found the error was due to a bad configuration of resolf.conf
Read more http://www.python.org/cgi-bin/faqw-mm.py?req=edit&file=faq06.014.htp
P.D: When I posted the bug I forgot to change the data of the smpt server. Could the admins please remove at least the password? Thanks so much
comment:4 by , 20 years ago
(well, kind of, because the Trac Ticket mailing list is a public one, so the password is still visible in the archives, in the mails corresponding to the ticket creation and to the above change, so you'd better change your password anyway)
comment:5 by , 20 years ago
| Resolution: | fixed |
|---|---|
| Status: | closed → reopened |
comment:6 by , 20 years ago
| Resolution: | → invalid |
|---|---|
| Severity: | major → normal |
| Status: | reopened → closed |
not a bug



Which OS are you using ?
Can you try to run a SMTP test from a simple Python script, such as:
import smtplib s = smtplib.SMTP('mail.communi.tv', 25) s.login('dev@communi.tv', 'ctvdev05') s.sendmail('dev@communi.tv', ['dev@communi.tv'], "TEST") s.close()Do not forgot to run your test with the same user as your web server. Some Linux systems do not accept SMTP outgoing connection from the web 'user', for example…
Anyway, there's something wrong with this setup:
Your email server does not report support for authentication (AUTH), whereas you are explicitly authenticating on the server (
smtp_user,smtp_password). It should report something as:for example.