Bug 257755 - Invitation Replies can't be sent
Summary: Invitation Replies can't be sent
Status: RESOLVED FIXED
Alias: None
Product: kmail2
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: Sergio Martins
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-24 06:06 UTC by Michi
Modified: 2011-12-27 16:08 UTC (History)
9 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Error message when trying to send an invitation (65.29 KB, image/png)
2011-05-29 20:29 UTC, Christian (Fuchs)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michi 2010-11-24 06:06:02 UTC
Version:           unspecified (using Devel) 
OS:                Linux

An invitation reply is not accepted by the mail server and thus gets stuck in the outbox. The response from the server says "Failed to transport message. Message sending failed since the following recipients were rejected by the server ... The server responded: "5.5.4 RCPT command parameter unrecognized: <CName of Receiver>""
I assume RCPT means recipient, so the christian name is not an email address, obviously.

Reproducible: Always
Comment 1 Christian (Fuchs) 2011-04-19 22:05:54 UTC
Fully reproducible here, KDEPIM 4.6 Beta 5 on Gentoo Linux. 

The same error message, and the mail stays in the outbox folder. 

Workaround: open the mail in the outbox with the editor (double click) and then click on send, it should then be sent. 

Kind regards, 

Christian
Comment 2 Allen Winter 2011-04-21 23:43:59 UTC
I think this one is showstopper worthy
Comment 3 Christian (Fuchs) 2011-05-15 17:31:04 UTC
Still present in 4.6RC1, together with bug 270290 this renders invitations completely unusable in kmail2, since they can't be sent or received. 

Thanks in advance for fixing this, kind regards

Christian
Comment 4 Sergio Martins 2011-05-29 17:59:45 UTC
Can you attach the e-mail here?

Can you try with git master, or rc2 which is going to be released soon.

I can't reproduce the bug here.
Comment 5 Christian (Fuchs) 2011-05-29 20:28:38 UTC
It is present in git from yesterday. 

The E-Mail would be: 

----

Content-Transfer-Encoding: quoted-printable
User-Agent: KOrganizer/4.7 pre (Linux/2.6.39-gentoo; KDE/4.6.80; x86_64; )
From: Christian Loosli <mail@fnt.ch>
To: spam@fnt.ch
Date: Sun, 29 May 2011 20:26:04 +0200
Subject: Test
Content-Type: text/calendar; charset="utf-8"; method="request"; name="cal.ics"
Content-Disposition: inline
MIME-Version: 1.0

BEGIN:VCALENDAR
PRODID:-//K Desktop Environment//NONSGML libkcal 4.3//EN
VERSION:2.0
METHOD:REQUEST
BEGIN:VEVENT
CREATED:20110529T182604Z
ORGANIZER;CN=3D"Christian Loosli":MAILTO:mail@fuchsnet.ch
ATTENDEE;RSVP=3DTRUE;PARTSTAT=3DNEEDS-ACTION;ROLE=3DREQ-PARTICIPANT;
 X-UID=3D80731400:mailto:spam@fuchsnet.ch
DTSTAMP:20110529T182554Z
UID:1d17e301-1d0b-4f60-bb11-08bc7c34965f
LAST-MODIFIED:20110529T182554Z
SUMMARY:Test
DTSTART:20110510T130000Z
DTEND:20110510T150000Z
TRANSP:OPAQUE
END:VEVENT
END:VCALENDAR

---

(domain slightly modified due to crawlers)

As already stated, the mail is sent if I re-open it in the editor it will be sent, otherwhise it fails with the error message I will post in a screenshot. I think the sender address gets malformed there. 

Kind regards

Christian
Comment 6 Christian (Fuchs) 2011-05-29 20:29:58 UTC
Created attachment 60443 [details]
Error message when trying to send an invitation

See comment above
Comment 7 Martin Kampas 2011-08-17 08:10:45 UTC
I met this problem after update to KMail 4.7.0 (Gentoo). The problem is when talking to the SMTP server, email addresses are passed in the form "Name Surname <name.surname@domain.com>" while it only accepts the plain form "name.surname@domain.com".

kio_smtp(10392) SMTPProtocol::sendCommandLine: C: >> MAIL FROM:<jane.roe@domain.com> SIZE=1458
RCPT TO:<John Doe <john.doe@domain.com>>
DATA <<
kio_smtp(10392) SMTPProtocol::getResponse: S: >> 250 2.1.0 jane.roe@domain.com....Sender OK <<
kio_smtp(10392) SMTPProtocol::getResponse: S: >> 501 5.5.4 Invalid Address <<
kio_smtp(10392) SMTPProtocol::getResponse: S: >> 554 5.5.2 No valid recipients <<
kio_smtp(10392) SMTPProtocol::sendCommandLine: C: >> RSET <<

For me a quickfix was to edit SMTPProtocol::put() from kdepimlibs-4.7.0/kioslave/smtp/smtp.cpp like this:

230c230,232
<     queueCommand( new RcptToCommand( m_sessionIface, (*it).toLatin1() ) );
---
>     queueCommand( new RcptToCommand( m_sessionIface, 
>           QString(*it).replace(QRegExp(QLatin1String("^(.*<)?([^<>]+)(>.*)?$")), 
>             QLatin1String("\\2")).toLatin1() ) );
Comment 8 Adam 2011-11-07 08:33:15 UTC
This is STILL a problem in 4.7.2. The issue seems to be simply that an additional pair of "<>" is added around the RCPT TO: e-mail address. i.e. instead of
RCPT TO: Fred Bloggs <fred@bloggs.com>

it sends

RCPT TO: <Fred Bloggs <fred@blogs.com>>

Any chance that it could be fixed.... pretty please?
Comment 9 Mark Petersen 2011-11-15 20:38:35 UTC
I am not able to reply to invitations either.

Kontact 4.7.3 from KDE:/Release/4.7/
Opensuse 11.4

I am getting the following error message:

E-mail sending failed: Failed to transport message. Message sending failed since the following recipients were rejected by the server:
"lastname, firstname" (The server responded: "5.5.2 RCPT TO syntax error")

When looking at the header of the outgoing message this is what I see:

Subject: Answer: AMSSC Meeting - 10:30-12:00, 30Nov11, Harbor View Room, Menominee, MI
To: lastname, firstname <firstname.lastname@example.com>
From: Mark Petersen <mpetersen@mydomain.com>
Content-Type: text/calendar; charset="utf-8"; method="reply"
Content-Transfer-Encoding: quoted-printable
X-KMail-Identity: 1778606309
MIME-Version: 1.0

If I double click on the reply message in the outbox, the body of the email gets wiped (ends up blank). I can then send this empty message! If I just close the composer window, the reply message is gone - not to be found in outbox, drafts or trash.

Additionally, as soon as I click on the accept button in the invitation, the invitation goes from my inbox to the trash.


Thanks
Mark
Comment 10 Laurent Montel 2011-12-21 08:50:03 UTC
Fixed in 4.8
Comment 11 Michi 2011-12-22 11:34:08 UTC
(In reply to comment #10)
> Fixed in 4.8

I can't confirm with a version from 20th Dec that has the patch included. I still get this:

E-mail sending failed: Failed to transport message. Message sending failed since the following recipients were rejected by the server:
Michi (The server responded: "5.5.4 RCPT command parameter unrecognized: ">"")

The only difference now seems that the message does not stay in the outbox and rather disappears. But this might be another issue not directly related to this bug report.
Comment 12 Laurent Montel 2011-12-22 11:47:22 UTC
Do you have :
 qjob->addressAttribute().setFrom( KPIMUtils::extractEmailAddress( KPIMUtils::normalizeAddressesAndEncodeIdn( from ) ) ); in calendarsupport/mailclient.cpp ?

What is your "from" value ?
Comment 13 Michi 2011-12-22 14:21:27 UTC
(In reply to comment #12)
> Do you have :
>  qjob->addressAttribute().setFrom( KPIMUtils::extractEmailAddress(
> KPIMUtils::normalizeAddressesAndEncodeIdn( from ) ) ); in
> calendarsupport/mailclient.cpp ?
yes
> What is your "from" value ?

I guess it complains about the organizer name part, because "Michi" in the case of the previous error message was in fact the confirmation message receiver
Comment 14 Laurent Montel 2011-12-23 09:01:53 UTC
Adresse mail is just 'Michi' ? not @... ?

I fixed it when name was:
" foo <foo@foo1.org>" for example.
Comment 15 Michi 2011-12-23 10:36:44 UTC
(In reply to comment #14)
> Adresse mail is just 'Michi' ? not @... ?
no, of course it's a proper email address. I was just citing the error message from comment #11
> 
> I fixed it when name was:
> " foo <foo@foo1.org>" for example.

The important information was that the server must have been complaining about the message receiver and not the sender!
Comment 16 Mark Petersen 2011-12-27 16:08:45 UTC
In what version is this fixed?

I'm running opensuse 12.1 with kde unstable. Kontact/Kmail/Korganizer all show 4.8 rc1.

Replying to an invitation got me the following error:

E-mail sending failed: Failed to transport message. Message sending failed since the following recipients were rejected by the server:
Mark Petersen (The server responded: "5.5.2 Syntax error. q52sm40152966yhh.3")

It seems that the name is being used as the recipients email address instead of the actual address.

Mark