Edgewall Software
Modify

Opened 18 years ago

Closed 18 years ago

#3180 closed defect (worksforme)

Failure sending notification

Reported by: mdaymond@… Owned by: Jonas Borgström
Priority: high Milestone:
Component: general Version: 0.9.4
Severity: normal Keywords:
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

Problem

  • I cannot receive any type of notification messages from trac.

Notes:

  • Trac is installed on Linux with Postgres DB and Apache for CGI
  • I have tried sending a smtp message direct from Python and it works successfully

Trac.ini

[notification]
always_notify_owner = true
smtp_always_cc = test@mycompany.com
smtp_password = xxxxxx
smtp_enabled = true
smtp_replyto = test@mycompany.com
smtp_port = 25
always_notify_reporter = true
always_notify_owner = true
smtp_server = mail.mycompany.com
smtp_from = test@mycompany.com
smtp_user = test@mycompany.com

Error Message

Traceback (most recent call last):
  File "/usr/lib/python2.4/site-packages/trac/ticket/web_ui.py", line 352, in _do_save
    tn.notify(ticket, newticket=False, modtime=now)
  File "/usr/lib/python2.4/site-packages/trac/Notify.py", line 211, in notify
    NotifyEmail.notify(self, ticket.id, subject)
  File "/usr/lib/python2.4/site-packages/trac/Notify.py", line 108, in notify
    Notify.notify(self, resid)
  File "/usr/lib/python2.4/site-packages/trac/Notify.py", line 45, in notify
    self.begin_send()
  File "/usr/lib/python2.4/site-packages/trac/Notify.py", line 116, in begin_send
    self.server = smtplib.SMTP(self.smtp_server, self.smtp_port)
  File "/usr/lib/python2.4/smtplib.py", line 241, in __init__
    (code, msg) = self.connect(host, port)
  File "/usr/lib/python2.4/smtplib.py", line 303, in connect
    raise socket.error, msg
error: (13, 'Permission denied')

Attachments (0)

Change History (1)

comment:1 by Emmanuel Blot, 18 years ago

Resolution: worksforme
Status: newclosed

This issue has been raised several times.

It usually comes from the security manager of your server, which prevents the Apache process from connecting to a priviledged port (SMTP=25 < 1024). You need to tweak your server configuration so that Postfix can receive requests from the Apache server.

You can try to send an email from Python using the Apache "user" (sudo -u www-data python …) to cross check.

Have a look at the similar ticket and the mailing list archive. You might want to search for "Fedora" which is a good candidate for such kind of troubles ;-)

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Jonas Borgström.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Jonas Borgström to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.