Did you try to run the same test *with* the same user as your web
server (i.e. the "user" of the web server process) ?
Sometimes, default security rules on servers prevent the web server
process to create outgoing connection to the SMTP port, among
others...
HTH,
Manu
On Thu, Mar 27, 2008 at 11:20 AM, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> I'm running Trac 0.11dev-r6658 with Python: 2.5.2, mod_python: 3.3.1)
> and I've got some difficulties in making the notification work.
>
> My Trac.ini notification section looks like:
>
> [notification]
> always_notify_owner = true
> always_notify_reporter = true
> smtp_always_bcc = [EMAIL PROTECTED]
> smtp_enabled = true
> smtp_from = [EMAIL PROTECTED]
> smtp_port = 25
> smtp_replyto = [EMAIL PROTECTED]
> smtp_server = smtp.mydomain.com
>
> When I activate the trac logging feature (DEBUG level), I can see the
> following:
>
> 2008-03-27 10:54:14,239 Trac[notification] INFO: self.smtp_server:
> smtp.mydomain.com
> 2008-03-27 10:54:14,239 Trac[notification] INFO: self.smtp_port: 25
> 2008-03-27 10:54:14,255 Trac[web_ui] ERROR: Failure sending
> notification on creation of ticket #4: (10061, 'Connection refused')
> Traceback (most recent call last):
> File "c:\python25\lib\site-packages\Trac-0.11dev_r6658-py2.5.egg\trac
> \ticket\web_ui.py", line 921, in _do_create
> tn.notify(ticket, newticket=True)
> File "c:\python25\lib\site-packages\Trac-0.11dev_r6658-py2.5.egg\trac
> \ticket\notification.py", line 149, in notify
> NotifyEmail.notify(self, ticket.id, subject)
> File "C:\Python25\lib\site-packages\trac-0.11dev_r6658-py2.5.egg\trac
> \notification.py", line 239, in notify
> Notify.notify(self, resid)
> File "C:\Python25\lib\site-packages\trac-0.11dev_r6658-py2.5.egg\trac
> \notification.py", line 128, in notify
> self.begin_send()
> File "C:\Python25\lib\site-packages\trac-0.11dev_r6658-py2.5.egg\trac
> \notification.py", line 313, in begin_send
> self.server = smtplib.SMTP(self.smtp_server, self.smtp_port)
> File "C:\Python25\Lib\smtplib.py", line 244, in __init__
> (code, msg) = self.connect(host, port)
> File "C:\Python25\Lib\smtplib.py", line 310, in connect
> raise socket.error, msg
> error: (10061, 'Connection refused')
>
> Please note that I added the two "Trac[notification] INFO" logs in my
> notification.py to be sure that the host and the port passed to
> constructor smtplib.SMTP(...) were correct.
>
> Ok seems that I cannot reach my smtp.mydomain.com...
>
> The problem is that if I do (from python shell):
> >>> import smtplib
> >>> server=smtplib.SMTP('smtp.mydomain.com', 25)
> >>> server.sendmail('[EMAIL PROTECTED]', '[EMAIL PROTECTED]', 'test message')
>
> ...everything is ok!!!!!???? the mail is sent...etc...
>
> Any help would be appreciated as I am a python beginner !
>
> Thanks a lot
>
> Pierre
> >
>
--
Manu
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Trac
Users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/trac-users?hl=en
-~----------~----~----~----~------~----~------~--~---