#2921: Failure sending notification
-------------------------------+--------------------------------------------
 Reporter:  [EMAIL PROTECTED]  |        Owner:  jonas
     Type:  defect             |       Status:  new  
 Priority:  normal             |    Milestone:       
Component:  general            |      Version:  0.9.4
 Severity:  major              |   Resolution:       
 Keywords:                     |  
-------------------------------+--------------------------------------------
Old description:

> 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 = [EMAIL PROTECTED]
> smtp_password = ctvdev05
> smtp_enabled = true
> smtp_replyto = [EMAIL PROTECTED]
> smtp_port = 25
> always_notify_reporter = true
> always_notify_owner = true
> smtp_server = mail.communi.tv
> smtp_from = [EMAIL PROTECTED]
> smtp_user = [EMAIL PROTECTED]
>
> 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.

New description:

 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 = [EMAIL PROTECTED]
 smtp_password = ctvdev05
 smtp_enabled = true
 smtp_replyto = [EMAIL PROTECTED]
 smtp_port = 25
 always_notify_reporter = true
 always_notify_owner = true
 smtp_server = mail.communi.tv
 smtp_from = [EMAIL PROTECTED]
 smtp_user = [EMAIL PROTECTED]
 }}}

 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.

Comment (by eblot):

 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('[EMAIL PROTECTED]', 'ctvdev05')
 s.sendmail('[EMAIL PROTECTED]', ['[EMAIL PROTECTED]'], "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:
 {{{
 telnet mail.communi.tv 25
 Trying 217.116.16.4...
 Connected to mail.communi.tv.
 Escape character is '^]'.
 220 bandalatina.com ESMTP
 EHLO free.fr
 250-bandalatina.com
 250-PIPELINING
 250-8BITMIME
 250 SIZE 15000000
 }}}

 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:
 {{{
 250-AUTH PLAIN
 }}}
 for example.

-- 
Ticket URL: <http://projects.edgewall.com/trac/ticket/2921>
The Trac Project <http://trac.edgewall.com/>
_______________________________________________
Trac-Tickets mailing list
[email protected]
http://lists.edgewall.com/mailman/listinfo/trac-tickets

Reply via email to