Opened 17 years ago
Closed 16 years ago
#7385 closed enhancement (fixed)
Error with local email addresses
Reported by: | 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 , 17 years ago
Resolution: | → worksforme |
---|---|
Status: | new → closed |
comment:2 by , 17 years ago
Resolution: | worksforme |
---|---|
Status: | closed → reopened |
Version: | → 0.11-stable |
OK, thought admit_domains was a bool and not a string
comment:3 by , 17 years ago
Type: | defect → enhancement |
---|
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 , 16 years ago
Actually, the code also doesn't work for <a href="http://www.museum/">.museum</a> addresses.
comment:5 by , 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 , 16 years ago
Keywords: | domain added |
---|---|
Milestone: | → 0.11.1 |
Owner: | changed from | to
Status: | reopened → new |
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).
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 oftrac.ini
to tell Trac to accept the "xx.local" domain.