rnwood / smtp4dev

smtp4dev - the fake smtp email server for development and testing
BSD 3-Clause "New" or "Revised" License
3.02k stars 339 forks source link

[Feature] Settings to enable/disable each auth mechanism. #852

Closed amorley65 closed 4 months ago

amorley65 commented 3 years ago

First of all, I love the revamp of this SMTP test program!

I have a question about setting the authentication method used. Is there a way of setting this using the command line? I would like to set it to plain for the testing I am doing (it keeps defaulting to CRAM-MD5 on me).

Thanks Andrew

rnwood commented 3 years ago

Hi. This is currently not exposed in smtp4dev v3, although underying library does support this. I have turned this ticket into a feature request to track this.

jafin commented 3 years ago

@amorley65 Could I understand your question a bit more. I see out of the box smtp4dev responds with

250-AUTH=CRAM-MD5 PLAIN LOGIN ANONYMOUS
250 AUTH CRAM-MD5 PLAIN LOGIN ANONYMOUS

And depending on the client, it may select CRAM-MD5 but can select any of those offered

For example with Blat I can specify the -nomd5 param which defaults to PLAIN

<<<getline<<< 250-8BITMIME
<<<getline<<< 250-SIZE
<<<getline<<< 250-SMTPUTF8
<<<getline<<< 250-AUTH=CRAM-MD5 PLAIN LOGIN ANONYMOUS
<<<getline<<< 250 AUTH CRAM-MD5 PLAIN LOGIN ANONYMOUS
Sending stdin.txt to user@bar.com
Subject: Subject
Login name is Test@here.com
>>>putline>>> AUTH PLAIN  *****
<<<getline<<< 235 Authenticated OK

Is your requirement to make the smtp4dev server not emit a CRAM-MD5 AUTH header?

jafin commented 2 years ago

@rnwood could you review the PR on smtpserver repo, see if it can solve this issue?

rnwood commented 4 months ago

PR#1413 merged.