So Plain and Login are just two different ways of authentication with an SMTP server; they serve the same purpose but different servers can, in theory, offer different methods.

https://www.ionos.co.uk/digitalguide/e-mail/technical-matters/smtp-auth/

the ehlo shouldn't really matter, that's just your client saying "Hi, I'm a client"

It seems that for some reason the server is not accepting your credentials. Presumably the client is trying plain first and when it fails, is trying with login as a fallback. Login, does user and passowrd in two stepsĀ  which is why the first part of the process (where you send the user name) is working.

There are other ways of authenticating but the server does seemingly support plain and login so it's not apparent that it's mandating those other methods (or even advertising them.)

I'm struggling to see why this is not working other than checking that the password really is correct as otherwise everything looks good.

On 16/08/2024 15:03, Graeme Gemmill wrote:
This is the debug(1) output:
send: 'ehlo auth.smtp.1and1.co.uk\r\n'
reply: b'250-kundenserver.de Hello auth.smtp.1and1.co.uk [78.141.12.8]\r\n'
reply: b'250-8BITMIME\r\n'
reply: b'250-AUTH LOGIN PLAIN\r\n'
reply: b'250 SIZE 141557760\r\n'
reply: retcode (250); Msg: b'kundenserver.de Hello auth.smtp.1and1.co.uk
[78.141.12.8]\n8BITMIME\nAUTH LOGIN PLAIN\nSIZE 141557760'
send: 'AUTH PLAIN AGdyYWVtZUBnZW1taWxsLm5hbWUARTEwMDBhMTUwXA==\r\n'
reply: b'535 Authentication credentials invalid\r\n'
reply: retcode (535); Msg: b'Authentication credentials invalid'
send: 'AUTH LOGIN Z3JhZW1lQGdlbW1pbGwubmFtZQ==\r\n'
reply: b'334 UGFzc3dvcmQ6\r\n'
reply: retcode (334); Msg: b'UGFzc3dvcmQ6'
send: 'RTEwMDBhMTUwXA==\r\n'
reply: b'535 Authentication credentials invalid\r\n'
reply: retcode (535); Msg: b'Authentication credentials invalid'
send: 'QUIT\r\n'
reply: b'221 kundenserver.de Service closing transmission channel\r\n'
reply: retcode (221); Msg: b'kundenserver.de Service closing
transmission channel'

( I added a smtp.ehlo('auth.smtp.1and1.co.uk') command, because the
first test contained

send: 'ehlo [127.0.0.1]\r\n'

reply: b'250-kundenserver.de Hello [127.0.0.1] [78.141.12.8]\r\n'

but it didn't make the rest any more successful)

The first AUTH PLAIN is rejected, but the AUTH LOGIN is accepted (334).
Is the following Msg: a request to sent a password?

Can anyone decode this further?

Thanks, Graeme

--
 Next meeting: Online, Jitsi, Tuesday, 2024-09-03 20:00
 Check to whom you are replying
 Meetings, mailing list, IRC, ...  https://dorset.lug.org.uk
 New thread, don't hijack:  mailto:dorset@mailman.lug.org.uk

Reply via email to