Bug 68906 - cddb submission via smtp does not work
Summary: cddb submission via smtp does not work
Status: RESOLVED FIXED
Alias: None
Product: libkcddb
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Richard Lärkäng
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-11-24 01:10 UTC by Melchior Franz
Modified: 2003-11-24 19:22 UTC (History)
1 user (show)

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


Attachments
Patch to fix the problem (546 bytes, patch)
2003-11-24 18:31 UTC, Richard Lärkäng
Details
Patch to fix the problem (546 bytes, patch)
2003-11-24 18:38 UTC, Richard Lärkäng
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Melchior Franz 2003-11-24 01:10:26 UTC
Version:            (using KDE Devel)
Installed from:    Compiled sources
Compiler:          gcc (GCC) 3.3 20030226 (prerelease) (SuSE Linux) 
OS:          Linux

I've set up cddb submission as follows:

Enable submissions via SMTP checked
Username: <my username on localhost>
Host: localhost
Port: 25

When I click "Update" in the CD Database Editor, I'm asked for a password! (WTF?! Every other program, including KMail knows how to send to localhost:25 without asking for a password!) I enter my password and click OK. I get an error dialog: "Record Submission"/"Error sending message via SMTP\nUnknown error." There doesn't seem to be a way to submit cddb entries, due to the redundant and obviously non-functional authentication dialog. (Using 127.0.0.1 or my explicit server name didn't work either.)
Comment 1 Melchior Franz 2003-11-24 01:55:08 UTC
This is was kiosmtp is telling me. So the server is refusing the authentication, which is OK. It is isn't set up to do authentication. The failure is in kscd/cddb: it must not try to force auth on the server.



kio_smtp: Parsing request from query:
to=freedb-submit@freedb.org
subject=cddb%20misc%20f10fc112
from=mfranz@aon.at
kio_smtp: S: 220 server.lan ESMTP Sendmail 8.12.7/8.12.7/SuSE Linux 0.6; Mon, 24 Nov 2003 00:44:20 +0100^M
kio_smtp: C: <16 bytes>
kio_smtp: S: 250-server.lan Hello localhost [127.0.0.1], pleased to meet you^M
kio_smtp: S: 250-ENHANCEDSTATUSCODES^M
kio_smtp: S: 250-PIPELINING^M
kio_smtp: S: 250-8BITMIME^M
kio_smtp: S: 250-SIZE^M
kio_smtp: S: 250-DSN^M
kio_smtp: S: 250-ETRN^M
kio_smtp: S: 250-AUTH DIGEST-MD5 CRAM-MD5^M
kio_smtp: S: 250-DELIVERBY^M
kio_smtp: S: 250 HELP^M
kio_smtp: parseFeatures() PLAIN AUTH METHODS:
SASL/CRAM-MD5
SASL/DIGEST-MD5
kio_smtp:°
kio_smtp: parseFeatures() PLAIN CAPABILITIES:
8BITMIME
AUTH DIGEST-MD5 CRAM-MD5
DELIVERBY
DSN
ENHANCEDSTATUSCODES
ETRN
HELP
PIPELINING
SIZE
kio_smtp:°
kio_smtp: C: <17 bytes>
kio_smtp: S: 334 bm9uY2U9IktPdkZxNkorcDFIL0FDSG9QeG9BTGlqZDR6dlVyYlA2bmxiWGpnSlk0MUE9IixyZWFsbT0ic2VydmVyLmxhbiIsc>
kio_smtp: C: <282 bytes>
kio_smtp: S: 535 5.7.0 authentication failed^M
kio_smtp: closing connection
Comment 2 Richard Lärkäng 2003-11-24 17:30:47 UTC
Did I misunderstand you, or did you specify the username and password for login to your box?

The username and password is used only if you need to authenticate to your SMTP server, which you say you don't need, so you should not set a username.
Comment 3 Melchior Franz 2003-11-24 17:51:43 UTC
> Did I misunderstand you, or did you specify the username
> and password for login to your box?

You understood correctly.  :-)



> The username and password is used only if you need to authenticate
> to your SMTP server, which you say you don't need, so you should not
> set a username.

There wasn't anything like this mentioned anywhere. I looked into the kcmcddb help[1] and searched in kscd's documentation.

But anyway: removing the username doesn't change anything. Still I'm asked for username and password. If I leave both empty as you suggest, then I still get the "Error sending message via SMTP\nUnknown error."

Note that I write emails to localhost:25 with "mail", "mutt", "kmail", and even "telnet localhost 25".
None of these has ever asked for authentication and refused to relay local emails to the internet.

m.



[1] This is all of the "help" in kcmcddb: "CDDB is used to get information like artist, title and song-names in CD's". Cool!  ;-)
Comment 4 Richard Lärkäng 2003-11-24 18:29:23 UTC
Oh, looks like you're right, I must use authentication for my smtp-server, so I haven't tested without. I guessed that setting an empty username would be the same as not setting one at all would be the same, but looking at the code, it looks like that's not the case.

I'll attach a simple patch that you can try out.
Comment 5 Richard Lärkäng 2003-11-24 18:31:27 UTC
Created attachment 3386 [details]
Patch to fix the problem

This should fix it, go to libkcddb subdirectory and apply.
Comment 6 Richard Lärkäng 2003-11-24 18:38:12 UTC
Created attachment 3387 [details]
Patch to fix the problem

This should fix it, go to libkcddb subdirectory and apply.
Comment 7 Melchior Franz 2003-11-24 18:52:28 UTC
Yes, this patch works. But how should a user know that he has to leave this field empty to make the cddb feature not fail miserably with a completely bogus error message? I know about string freeze, but I'd rather put an untranslated English explanation there, than frustrating the users.

m.
Comment 8 Richard Lärkäng 2003-11-24 19:08:49 UTC
Subject: kdemultimedia/libkcddb

CVS commit by larkang: 

Only set the username if it isn't empty. Fixes sending of cddb-information if
smtp-server doesn't need authentication

CCMAIL: 68906-done@bugs.kde.org


  M +2 -1      smtpsubmit.cpp   1.7


--- kdemultimedia/libkcddb/smtpsubmit.cpp  #1.6:1.7
@@ -40,4 +40,5 @@ namespace KCDDB
     url_.setHost(hostname);
     url_.setPort(port);
+    if (!username.isEmpty())
     url_.setUser(username);
     url_.setPath("/send");


Comment 9 Richard Lärkäng 2003-11-24 19:12:29 UTC
Btw I guess it could be possible to change the text if we can find anything more clear, but I'm not completely sure. Do you have any suggestions on another text?
Comment 10 Melchior Franz 2003-11-24 19:27:16 UTC
Subject: Re: 

> Btw I guess it could be possible to change the text if we can
> find anything more clear, but I'm not completely sure.

"Change the text"? There *is* no text right now, except from
the "Username:" label next to an empty input field. And people,
even computer savvy people, tend to fill out empty input fields.

It can IMHO only be done in the following way:


  Server:   ________________

  [ ] Server needs authentication
  Username: ________________


Whereby the Username field would be grayed out and only enabled if
the checkbox in "Server needs authentication" is checked.

m.

Comment 11 Richard Lärkäng 2004-01-18 12:33:58 UTC
Subject: kdemultimedia/libkcddb/kcmcddb

CVS commit by larkang: 

Make it more clear that the username should only be entered if it is needed by the smtp-server for sending mails.
Won't be in KDE until 3.3 because of new string

CCMAIL: 68906@bugs.kde.org


  M +144 -110  cddbconfigwidgetbase.ui   1.20
  M +16 -2     kcmcddb.cpp   1.21