Edgewall Software
Modify

Ticket #4529 (closed defect: worksforme)

Opened 5 years ago

Last modified 4 years ago

Trac incorrectly process "use_short_addr" option in notification.py

Reported by: swl181@… Owned by: jonas
Priority: normal Milestone:
Component: ticket system Version: 0.10.3
Severity: normal Keywords: notification
Cc:
Release Notes:
API 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

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

Download all attachments as: .zip

Change History

Changed 5 years ago by anonymous

comment:1 Changed 5 years ago by eblot

  • Keywords notification added
  • Milestone 0.10.4 deleted

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 Changed 5 years ago by anonymous

  • Resolution set to fixed
  • Status changed from new to closed

Thanks, you are right

I'm incorectly undestood "use_short_addr" option usage

comment:3 Changed 5 years ago by eblot

  • Resolution fixed deleted
  • Status changed from closed to reopened

comment:4 Changed 5 years ago by eblot

  • Resolution set to worksforme
  • Status changed from reopened to closed

('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 Changed 5 years ago by Koen Werdler <werdlerk@…>

  • Cc Koen, Werdler, <werdlerk@…> added
  • Resolution worksforme deleted
  • Status changed from closed to reopened

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 Changed 5 years ago by Koen Werdler <werdlerk@…>

  • Cc Koen, Werdler, <werdlerk@…> removed

comment:9 Changed 4 years ago by sid

  • Resolution set to worksforme
  • Status changed from reopened to closed

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_\.\-]+')
View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
to The owner will be changed from jonas. Next status will be 'closed'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.