Edgewall Software
Modify

Opened 16 years ago

Closed 16 years ago

#7385 closed enhancement (fixed)

Error with local email addresses

Reported by: koch@… Owned by: Christian Boos
Priority: normal Milestone: 0.11.1
Component: notification Version: 0.11-stable
Severity: normal Keywords: domain
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

When the email address for user yy is taken from the email_map and result in

yy@xx.local

notification will not work. Because

File notification.py
EMAIL_LOOKALIKE_PATTERN = (r"[a-zA-Z0-9.'=+_-]+" '@'
                            '(?:[a-zA-Z0-9_-]+\.)+[a-zA-Z]{2,4}')

refuse this email address to be a valid email address.

Better would be {2,5}

EMAIL_LOOKALIKE_PATTERN = (r"[a-zA-Z0-9.'=+_-]+" '@'
                            '(?:[a-zA-Z0-9_-]+\.)+[a-zA-Z]{2,5}')

Attachments (0)

Change History (7)

comment:1 by Emmanuel Blot, 16 years ago

Resolution: worksforme
Status: newclosed

You have not specified a Trac version, so I assume you're using the last one (0.11)

Use admit_domains in the [notification] section of trac.ini to tell Trac to accept the "xx.local" domain.

comment:2 by anonymous, 16 years ago

Resolution: worksforme
Status: closedreopened
Version: 0.11-stable

OK, thought admit_domains was a bool and not a string

comment:3 by anonymous, 16 years ago

Type: defectenhancement

The trouble came up while upgrading from Trac 0.10.4 to 0.11. I was expecting that trac will work in the same manner as before (with yy.local for notifications). When notifactions did not work it take me about an hour to isolate the problem was the yy.local domain.

May be a small remark during setup or in the upgrade hints would be helpfull.

comment:4 by novalis@…, 16 years ago

Actually, the code also doesn't work for <a href="http://www.museum/">.museum</a> addresses.

in reply to:  description comment:5 by info@…, 16 years ago

I had the very same problem today when I upgraded our trac installation from 0.10.4 to 0.11. It took me about an hour including trying different mail servers to find out, what the real problem was. What made it worse was the lack of messages in the browser window.

No notifications is a bad situation, but trac-0.11 requires verified mail addresses to work. So users with a .local address could not use trac until this problem was fixed. That's worse. Not to mention an unusable webadmin plugin.

comment:6 by Christian Boos, 16 years ago

Keywords: domain added
Milestone: 0.11.1
Owner: changed from Emmanuel Blot to Christian Boos
Status: reopenednew

Ok, the limit to 4 characters for the toplevel domain name (TLD) is plain wrong, see for example rfc:3696#section-2.

I've come up with a more correct regexp for the TLD part: [a-zA-Z](?:[-a-zA-Z\d]*[a-zA-Z\d])? (this matches a label according to rfc:1035#section-2.3.1).

I think we should nevertheless keep the more lax regexp for the host name, as having '_' in the name is probably a common error in intranets.

The above is in the context of ascii TLDs. An even more interesting refinement would be to support internationalized e-mail addresses, and it looks like Python has all what's needed to handle that conveniently (encodings.idna).

comment:7 by Christian Boos, 16 years ago

Resolution: fixed
Status: newclosed

New regexp added in [7400].

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Christian Boos.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Christian Boos 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.