Bug 197496 - bad sender address when sending email using a kmail identity
Summary: bad sender address when sending email using a kmail identity
Status: CLOSED FIXED
Alias: None
Product: kalarm
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Debian testing Linux
: NOR normal
Target Milestone: ---
Assignee: David Jarvie
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-06-22 13:32 UTC by Andrew Schulman
Modified: 2010-09-02 11:09 UTC (History)
1 user (show)

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


Attachments
email configuration in kalarm (62.15 KB, image/png)
2009-06-22 14:58 UTC, Andrew Schulman
Details
identities configuration in kmail (33.21 KB, image/png)
2009-06-22 14:59 UTC, Andrew Schulman
Details
email error dialog from kalarm (38.42 KB, image/png)
2009-06-22 15:02 UTC, Andrew Schulman
Details
wireshark log (5.26 KB, text/plain)
2009-08-06 22:38 UTC, Andrew Schulman
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Schulman 2009-06-22 13:32:42 UTC
Version:            (using KDE 4.2.4)
OS:                Linux
Installed from:    Debian testing/unstable Packages

When I try to carry out an alarm that sends an email from a kmail identity, I get an error dialog that says e.g.:

Error sending email:

The server did not accept the sender address "Carey Fitzmaurice <xxx.xxx@xxx.xxx>".
The server responded: "<Carey Fitzmaurice <xxx.xxx@xxx.xxx>>: "@" or "." expected after "Carey""

Thanks,
Andrew.
Comment 1 David Jarvie 2009-06-22 14:12:03 UTC
I can't reproduce this bug.

Have you configured KAlarm to send emails via kmail, or by sendmail? (This is set up in the Configuration dialog, Email tab.)

In your KMail configuration dialog, can you please check the configuration for the kmail identity which you used, and verify whether there are any quotes round your name.
Comment 2 Andrew Schulman 2009-06-22 14:57:08 UTC
Thanks for your quick reply.

> Have you configured KAlarm to send emails via kmail, or by sendmail?
> (This is set up in the Configuration dialog, Email tab.)

By kmail, using kmail identities.  Please see the first screenshot.  I've 
had this configuration for a long time, and it worked fine in KDE 3.5.10.  
Only just broke on upgrade to 4.2.4.

> In your KMail configuration dialog, can you please check the
> configuration for the kmail identity which you used, and verify whether
> there are any quotes round your name.

No, there are no quotes.  Please see the 2nd screenshot.

Thanks,
Andrew.
Comment 3 Andrew Schulman 2009-06-22 14:58:49 UTC
Created attachment 34734 [details]
email configuration in kalarm
Comment 4 Andrew Schulman 2009-06-22 14:59:19 UTC
Created attachment 34735 [details]
identities configuration in kmail
Comment 5 Andrew Schulman 2009-06-22 15:02:35 UTC
Created attachment 34736 [details]
email error dialog from kalarm
Comment 6 David Jarvie 2009-06-22 15:37:23 UTC
I need to see the header fields in the sent email which the server is
rejecting. Could you please send a test email using KAlarm. Hopefully the
failure notice which you receive will have your original email attached -
please copy that attached email and submit is as an attachment to this bug
report.
Comment 7 Andrew Schulman 2009-06-22 18:15:37 UTC
> I need to see the header fields in the sent email which the server is
> rejecting. Could you please send a test email using KAlarm. Hopefully the
> failure notice which you receive will have your original email attached -
> please copy that attached email and submit is as an attachment to this
> bug report.

Well the funny thing is, looking at the logs of the SMTP server, which is 
here in my LAN under my control, I see that the server is never contacted.  
Neither kmail nor kalarm ever submits a message to the SMTP server for 
delivery.  So, there's no delivery failure report for me to show you.  
Wireshark also shows no SMTP activity during the failed delivery.  So, not 
sure how else I could intercept the headers to show you.

Also, I found that when I change kalarm's email client preference from KMail 
to Sendmail, the error message goes away.  I'm surprised that this works, 
since I thought the reason to choose KMail was to be able to use KMail 
identities, but I guess I was wrong about that.

Not sure at this point whether KMail or KAlarm is at fault, but I'm happy to 
continue troubleshooting.

Andrew.
Comment 8 Andrew Schulman 2009-06-22 20:11:15 UTC
Clarification:  when I change the email client preference to Sendmail, the error goes away, not just the error message.  The alarm email is correctly sent.
Comment 9 David Jarvie 2009-06-23 14:05:51 UTC
Using KMail identities is simply a way of specifying the email address to use for sending the message. This email address can be used regardless of the transmission method - sendmail or kmail. Your misunderstanding related to this points to a deficiency in the configuration dialogue, which must implicitly suggest that the two are related. Apart from clarifying it in the WhatsThis help texts, I'm not sure how to make it clearer that they are unrelated.

Is there a message attached to the failure notice? If so, could you please attach it here.
Comment 10 Andrew Schulman 2009-06-23 19:27:01 UTC
> --- Comment #9 from David Jarvie <djarvie kde org>  2009-06-23 14:05:51
> --- Using KMail identities is simply a way of specifying the email
> address to use for sending the message. This email address can be used
> regardless of the transmission method - sendmail or kmail.

OK.

> Your
> misunderstanding related to this points to a deficiency in the
> configuration dialogue, which must implicitly suggest that the two are
> related. Apart from clarifying it in the WhatsThis help texts, I'm not
> sure how to make it clearer that they are unrelated.

No big deal.  I guess then I'm just unsure why I'd want to prefer either 
KMail or Sendmail as my client.  I guess if both are configured then it 
doesn't matter.  But this is a separate and minor issue, no need to address 
it here.

> Is there a message attached to the failure notice? If so, could you
> please attach it here.

No, I'm afraid there isn't.  No email is ever sent, so there's no email 
delivery failure report, if that's what you mean.  All I get is the error 
dialog, as you see in the screenshot.  There's nothing attached to it.

Any other place I can pick up log/debug messages?  I'm willing, but if there 
are any logs I can't find them.

Thanks for your attention to this issue.  For me there's a simple workaround 
since I have sendmail configured on my host, but someone who didn't could be 
stuck.

Andrew.
Comment 11 Torgny Nyblom 2009-08-06 19:29:44 UTC
(In reply to comment #7)
> Well the funny thing is, looking at the logs of the SMTP server, which is 
> here in my LAN under my control, I see that the server is never contacted.  

Never contacted or nothing in the logs? At least in my setup nothing is shown in the logs for certain "early" errors.
Comment 12 Andrew Schulman 2009-08-06 20:46:13 UTC
>> Well the funny thing is, looking at the logs of the SMTP server, which
is
>>
>> here in my LAN under my control, I see that the server is never
>> contacted.
> 
> Never contacted or nothing in the logs? At least in my setup nothing is
> shown
> in the logs for certain "early" errors.

As I said before, Wireshark shows no SMTP activity during these events, so
I think I can say with confidence that the server is never contacted.

I just tried this again with Kalarm 2.2.6, KDE 4.3.0, and the problem
persists there.
Comment 13 Torgny Nyblom 2009-08-06 21:09:49 UTC
(In reply to comment #12)
> As I said before, Wireshark shows no SMTP activity during these events, so
> I think I can say with confidence that the server is never contacted.
> 
> I just tried this again with Kalarm 2.2.6, KDE 4.3.0, and the problem
> persists there.

I haven't looked into it closely (dev box on service...) but the message seems to originate from kdepimlibs/kioslave/smtp/transactionstate.cpp (line 53). The transaction state is not entered until the client has authenticated it self to the server. This suggests that some SMTP activity should have occurred. Could it be that you were filtering on the wrong port (SSL?) in wireshark?
Comment 14 Andrew Schulman 2009-08-06 22:38:02 UTC
OK, I tried it again, and this time I was able to capture the exchange.  There's something funny going on with Wireshark... first 4 times it didn't capture it, then for some reason it did.  But that's for another day.

I'm attaching the Wireshark log of the SMTP exchange.  In fact it doesn't seem to really add anything; the key point is when the client sends

MAIL FROM:<Andrew Schulman <andrex@alumni.utexas.net>> SIZE=252\r\n

which is clearly wrong, and is the same as is shown in the error dialog.  What's not clear to me is who's at fault, kmail or kalarm.

Happy to do any further diagnostics, assuming I continue to get cooperation from Wireshark.
Comment 15 Andrew Schulman 2009-08-06 22:38:39 UTC
Created attachment 35939 [details]
wireshark log
Comment 16 David Jarvie 2009-08-08 21:34:31 UTC
The Wireshark log has helped track this down. It turned out that the email address needed to have the name stripped out before calling the library function to send the email, which was an undocumented requirement. The fix will be in KDE 4.3.1 (SVN commits 1008963, 1008964).

Thanks for the trouble you took to provide information.
Comment 17 Andrew Schulman 2009-08-10 13:25:32 UTC
> The Wireshark log has helped track this down. It turned out that the
> email address needed to have the name stripped out before calling the
> library function to send the email, which was an undocumented
> requirement. The fix will be in KDE 4.3.1 (SVN commits 1008963, 1008964).

That's great, thanks!