Edgewall Software

Ticket #4529 (closed defect: worksforme)

Opened 23 months ago

Last modified 12 months 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:

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 (0.6 KB) - added by anonymous 23 months ago.

Change History

Changed 23 months ago by anonymous

Changed 23 months 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.

Changed 23 months ago by anonymous

  • status changed from new to closed
  • resolution set to fixed

Thanks, you are right

I'm incorectly undestood "use_short_addr" option usage

Changed 23 months ago by eblot

  • status changed from closed to reopened
  • resolution fixed deleted

Changed 23 months ago by eblot

  • status changed from reopened to closed
  • resolution set to worksforme

('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.

Changed 17 months ago by Koen Werdler <werdlerk@…>

  • cc Koen, Werdler, <werdlerk@…> added
  • status changed from closed to reopened
  • resolution worksforme deleted

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

Changed 16 months ago by Koen Werdler <werdlerk@…>

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

Changed 12 months ago by sid

  • status changed from reopened to closed
  • resolution set to worksforme

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

Add/Change #4529 (Trac incorrectly process "use_short_addr" option in notification.py)

Author



Change Properties
<Author field>
Action
as closed
Next status will be 'reopened'
to The owner will change from jonas. Next status will be 'closed'
 
Note: See TracTickets for help on using tickets.