Bug 317285 - KMail doesn't use SMTP authentication credentials even though configured to
Summary: KMail doesn't use SMTP authentication credentials even though configured to
Status: RESOLVED NOT A BUG
Alias: None
Product: kmail2
Classification: Applications
Component: commands and actions (show other bugs)
Version: 4.10.1
Platform: Gentoo Packages Linux
: NOR major
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-03-24 17:51 UTC by Karl-Johan Karlsson
Modified: 2015-08-01 13:20 UTC (History)
1 user (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 Karl-Johan Karlsson 2013-03-24 17:51:03 UTC
Since KDE 4.10, KMail can no longer send e-mail through my Postfix server. The server is configured to require encryption and authentication, and KMail has the username, password and encryption settings (PLAIN over STARTTLS on port 25) stored. "Server requires authentication" is checked, and settings auto-detection works. However, authentication is never attempted, and as such the e-mail is never delivered.

I have another SMTP server configured (which I can't see the logs for). It uses the same PLAIN over STARTTLS, but runs on port 26 instead. That works.

Anonymised Postfix syslog:
[postfix/smtpd] connect from XXX[Y.Y.Y.Y]
[postfix/smtpd] Anonymous TLS connection established from XXX[Y.Y.Y.Y]: TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)
[postfix/smtpd] NOQUEUE: reject: RCPT from XXX[Y.Y.Y.Y]: 554 5.7.1 <XXX@XXX>: Relay access denied; from=<XXX@XXX> to=<XXX@XXX> proto=ESMTP helo=<XXX>
[postfix/smtpd] lost connection after RSET from XXX[Y.Y.Y.Y]
[postfix/smtpd] disconnect from XXX[Y.Y.Y.Y]

Reproducible: Always
Comment 1 Karl-Johan Karlsson 2013-03-24 17:56:09 UTC
I should probably also mention that authentication to this server works with other SMTP clients (specifically, Squirrelmail), and that this is the error message in the KMail UI:

Failed to transport message. Message sending failed since the following recipients were rejected by the server: XXX@XXX (The server responded: "5.7.1 <XXX@XXX>: Relay access denied")
Comment 2 Karl-Johan Karlsson 2013-06-09 13:24:32 UTC
It turns out this was actually a bug in the Postfix configuration.
Comment 3 Peter Lemken 2015-07-31 21:08:16 UTC
It would really be helpful to know the postfix configuration bug. I am running into the same problem here and have no clue why Thunderbird works flawlessly but KMail doesn't even show an authentication try. I am watching the postfix maillog and don't even see a connection attempt.

Please?
Comment 4 Karl-Johan Karlsson 2015-08-01 07:42:53 UTC
Not that I remember anything from that long ago, but looking at my logs it seems likely that my problem was related to the introduction of smtpd_relay_restrictions in Postfix 2.10 ( http://www.postfix.org/postconf.5.html#smtpd_relay_restrictions ). I had updated Postfix to 2.10 a few weeks before I filed this bug, and the only configuration change between then and when I closed this bug is that I added this line to main.cf:

   smtpd_relay_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
Comment 5 Peter Lemken 2015-08-01 13:20:56 UTC
Never mind, it was a KMail error after all and I will file a bug report for that. 

This was first use of KMail and despite having all the correct seetings for SMTP, it simply didn't use it, but instead tried to use the initial default sending mechanism i.e. sendmail, which obviously failed.

All it took was do: File --> "Send Queued Messiafes Via" and thne select the configured SMTP transport. Voilà.

Now the correct setting has been configured as default and works fine.