Bug 120890 - KMail fails when @ is used in recipient's name
Summary: KMail fails when @ is used in recipient's name
Status: RESOLVED FIXED
Alias: None
Product: kmail
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
: 124572 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-01-27 23:44 UTC by Diego Elio Pettenò
Modified: 2009-12-24 23:23 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Proposed patch (6.93 KB, patch)
2006-01-30 01:25 UTC, Diego Elio Pettenò
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Diego Elio Pettenò 2006-01-27 23:44:31 UTC
Version:            (using KDE KDE 3.5.1)
Installed from:    Gentoo Packages
OS:                Linux

KMail disallow sending mails when the recipient's name contains an "@" character, thinking that is the address that contains two "@".

It's easy to reproduce, just try to send a mail setting the To field to "flameeyes\@gentoo.org" <flameeyes@gentoo.org> .

While it's rare to be done in actual mail's but it's unfortunately common for an italian webmail to set the default from value to the above example (with the real address of the sender, obviously), thus blocking on reply.
Comment 1 Diego Elio Pettenò 2006-01-30 01:25:14 UTC
Created attachment 14449 [details]
Proposed patch

Okay tonight I found some time and I wrote the attached patch, it's a rewrite
of the KPIM::isValidEmailAddress() function, replacing the stateful parser with
some regexps.
It doesn't seem to decrease performance noticeably, and it does not fail in the
situation it was failing before, and mails are sent fine.
Comment 2 Haris Kouzinopoulos 2006-03-30 21:51:22 UTC
*** Bug 124572 has been marked as a duplicate of this bug. ***
Comment 3 Haris Kouzinopoulos 2006-03-30 21:52:36 UTC
Hi, can someone please review this patch?
Comment 4 Ingo Klöcker 2006-04-01 00:49:34 UTC
Sorry, but your patch is not acceptable. If you want to know how a regular expression for checking the validity of RFC822 addresses looks like take a look at http://www.ex-parrot.com/~pdw/Mail-RFC822-Address.html. And no, we don't want to have this regular expression in KMail. Please try to fix the parser instead of trying to replace it by something else.
Comment 5 Björn Ruberg 2009-12-24 23:23:20 UTC
I checked with KDE 4.3. I can send a mail with "flameeyes@gentoo.org" <adress> , so I consider the main problem solved. I cannot send an mail like "flameeyes\@gentoo.org" <adress> , but that's a problem with the backslash.