Edgewall Software
Modify

Opened 17 years ago

Closed 16 years ago

#4529 closed defect (worksforme)

Trac incorrectly process "use_short_addr" option in notification.py

Reported by: swl181@… Owned by: Jonas Borgström
Priority: normal Milestone:
Component: ticket system Version: 0.10.3
Severity: normal Keywords: notification
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

if option "use_short_addr" set to true, then TRAC does not append "smtp_default_domain" to short address.

I correct this invalid behaviour by attached patch

Attachments (1)

shrtadd.patch (645 bytes ) - added by anonymous 17 years ago.

Download all attachments as: .zip

Change History (8)

by anonymous, 17 years ago

Attachment: shrtadd.patch added

comment:1 by Emmanuel Blot, 17 years ago

Keywords: notification added
Milestone: 0.10.4

Yes, this was the expected behaviour.

From TracIni#notification-section:

"Permit email address without a host/domain (i.e. username only). The SMTP server should accept those addresses, and either append a FQDN or use local delivery"

Maybe this behaviour should be changed, but we need to check first whether the proposed patch could bring some regression.

comment:2 by anonymous, 17 years ago

Resolution: fixed
Status: newclosed

Thanks, you are right

I'm incorectly undestood "use_short_addr" option usage

comment:3 by Emmanuel Blot, 17 years ago

Resolution: fixed
Status: closedreopened

comment:4 by Emmanuel Blot, 17 years ago

Resolution: worksforme
Status: reopenedclosed

('closed' is reserved for tickets that have led to code change).

Feel free to re-open if you believe that the proposed feature would have been useful.

comment:5 by Koen Werdler <werdlerk@…>, 17 years ago

Cc: Koen Werdler <werdlerk@…> added
Resolution: worksforme
Status: closedreopened

This bug still exists if you have users with an e-mail address like "firstname.surname" which is a correct e-mail address for local delivery.

However this is seen by Trac as an invalid e-mail address and is ignored. (Even with the use_short_addr property set to true.)

This is the output when I tried resetting my password (which I used as a testcase for notification):

2007-07-20 14:49:28,500 Trac[notification] INFO: Invalid email address: koen.werdler
2007-07-20 14:49:28,500 Trac[notification] INFO: no recipient for a ticket notification

comment:8 by Koen Werdler <werdlerk@…>, 17 years ago

Cc: Koen Werdler <werdlerk@…> removed

comment:9 by sid, 16 years ago

Resolution: worksforme
Status: reopenedclosed

Koen, Check your version of Trac and if it isn't 0.10.4, please upgrade. The current trunk regular expression for shorter emails addresses should handle periods, underscores, dashes, and alphanumeric characters just fine:

class NotifyEmail(Notify):
    """Baseclass for notification by email."""
...
    nodomaddr_re = re.compile(r'[\w\d_\.\-]+')

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.