Bug 83487 - kmail does not allow domain-literals in email-adresses
Summary: kmail does not allow domain-literals in email-adresses
Status: RESOLVED UNMAINTAINED
Alias: None
Product: kmail
Classification: Applications
Component: general (show other bugs)
Version: 1.9.6
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-06-16 13:37 UTC by sf
Modified: 2015-04-12 10:12 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description sf 2004-06-16 13:37:08 UTC
Version:           1.6 (using KDE 3.2.0,  (3.0))
Compiler:          gcc version 2.95.4 20011002 (Debian prerelease)
OS:                Linux (i686) release 2.4.25-grsec-l-1

by RFC822, email addresses can contain domain-literals, e.g.
user@[10.1.2.3]

Kmail removes the [] brackets when delivering a mail with such a (valid) address to the smtp-server, and the mail is rejected.

Even if such domain-literals are used only very rarely, kmail should adhere to RFC822.
Comment 1 David Faure 2004-06-16 13:49:27 UTC
On Wednesday 16 June 2004 13:37, sfritsch@ph.tum.de wrote:
> Even if such domain-literals are used only very rarely, kmail should adhere to RFC822.

RFC2822 obsoletes RFC822, and it explicitely forbids such brackets in email-addresses,
as far as I can see.
Check 3.4.1,  Addr-spec specification

dtext           =       NO-WS-CTL /     ; Non white space controls
                        %d33-90 /       ; The rest of the US-ASCII
                        %d94-126        ;  characters not including "[",
                                        ;  "]", or "\"

Comment 2 David Faure 2004-06-16 13:54:02 UTC
On Wednesday 16 June 2004 13:49, David Faure wrote:
> Check 3.4.1,  Addr-spec specification

I misread it. The "local" part is a "dot-atom", which contains text defined by

atext           =       ALPHA / DIGIT / ; Any character except controls,
                        "!" / "#" /     ;  SP, and specials.
                        "$" / "%" /     ;  Used for atoms
                        "&" / "'" /
                        "*" / "+" /
                        "-" / "/" /
                        "=" / "?" /
                        "^" / "_" /
                        "`" / "{" /
                        "|" / "}" /
                        "~"

This excludes "specials" (which '[' is part of), so this is a better reason why '[' should be disallowed.

That RFC also mentions "obsolete addressing", where the local part
can be any "word", but "word" is modelled with the above atext, still without '['.

(Just an observation from someone who happens to be reading that RFC
just now, this isn't an official answer from the kmail team, I didn't implement
the email-address checking in kmail)

Comment 3 sf 2004-06-16 14:52:37 UTC
Domain-literals are also in RFC2822 (I didn't search further after I found it in RFC822). It is the "domain" part off "addr-spec" that is important here, not the "local-part":

addr-spec       =       local-part "@" domain
domain          =       dot-atom / domain-literal / obs-domain
domain-literal  =       [CFWS] "[" *([FWS] dcontent) [FWS] "]" [CFWS]


Cheers,
Stefan
Comment 4 Matt Douhan 2005-05-28 16:39:57 UTC
the email address checking i,e the validation of valid email addresses does allow for domain literals in the domain part, the issue is that something at a lower level removes the [ ]
Comment 5 mi+kde 2005-06-14 05:30:28 UTC
Whatever KMail's opinion is about the validity of the user-entered address, the user should have an option to force it.

KMail is not -- and should not be -- smarter about these things, than the MTAs.
Comment 6 Matt Douhan 2005-06-14 10:50:13 UTC
Re #5 you are missing the point here, it is a bug in the underlying code, not in the validator, and wrt to the user force option this will be discussed with Ingo as I said before.

Comment 7 Christian Weickhmann 2006-09-06 20:12:25 UTC
Look at GMX.de. They define mailing lists as <listname>%<mailname>@gmx.de .
It doesn't work with KMail.
Comment 8 Matt Douhan 2006-11-04 19:44:43 UTC
addresses with % in them are supported since some time in KMail, I hacked that full atext support at the dutch hackfest last year and the validator tests seems to confirm that
testemail: isValidEmailAddress matt%matt@fruitsalad.org errorCode  : checking 'AddressOk' against expected value 'AddressOk'... ok

the above is from the testsystem for the validator, can you please explain how I can reproduce your problem with gmx ?
Comment 9 Josef Spillner 2007-05-18 16:12:59 UTC
I've upped the version number to 1.9.6 because this issue is still present.
Its appearance is different however: Instead of simply cutting it off, the composer will disallow any email addresses of the form foo@[1.2.3.4].
That addressing scheme is a bit unfortunate, but still needed with some systems (it's indeed the "domain-literal mode" as pointed out above). KMail should support it.
Comment 10 Daniel Hahler 2007-05-25 19:48:13 UTC
I can confirm this for KDE 3.5.7 / KMail 1.9.7.

It displays:

Invalid Email Address
=====================
foo@[x.x.x.x]
The email address you have entered is not valid because it contains an invalid displayname.
Comment 11 Maciej Pilichowski 2007-11-01 10:11:38 UTC
Btw. related issue -- mi+kde comment as separate wish report:
http://bugs.kde.org/show_bug.cgi?id=151679
Comment 12 Laurent Montel 2012-07-03 12:17:09 UTC
Still valid in 4.9 ?
Comment 13 Laurent Montel 2015-04-12 10:12:00 UTC
Thank you for taking the time to file a bug report.

KMail2 was released in 2011, and the entire code base went through significant changes. We are currently in the process of porting to Qt5 and KF5. It is unlikely that these bugs are still valid in KMail2.

We welcome you to try out KMail 2 with the KDE 4.14 release and give your feedback.