greenmail-mail-test / greenmail

Official master for the Greenmail project
http://greenmail-mail-test.github.io/greenmail/
Apache License 2.0
640 stars 184 forks source link

greenmail.auth.disabled doesn't work as expected #260

Open iluxa-com opened 6 years ago

iluxa-com commented 6 years ago

Steps: Run standalone Greenmail server with the -Dgreenmail.auth.disabled option send an email to the server for test@test.com //new account is created Try to fetch emails for test@test.com from the server connecting as test@test.com with any password

Expected: The emails fetch successfully since documentation states:

Disables user authentication check, so that any password works. 

Actual: The server drops connection with the wrong password error.

jonhoo commented 6 years ago

I think the password has to be the same as the username? That at least seems to work for me!

marcelmay commented 6 years ago

@iluxa-com : Which version of GreenMail do you use? Can you provide any log output?

lazycodeninja commented 5 years ago

I had this problem today; I had a long-running 1.5.9 Docker container that would accept any password, but when I created a new container with the same image and config with in ECS I got authentication errors unless the password was correct (same as email address), even though I could see in the logs that it was running with -Dgreenmail.auth.disabled.

The only difference was that I didn't specify a tag in ECS. I reloaded the container with the tag 1.5.9 and the auth check was disabled. But I removed the tag again to see if I could isolate the issue and the auth check was still disabled, so I don't really have a clue what caused it or fixed it.

The only difference in the logs is that in the instance where the auth check was not disabled, there's an error relating to imaps, as described in issue #223. But I'm not using imaps so I wouldn't expect it's relevant.

lazycodeninja commented 5 years ago

It happened again just now, and this time there were absolutely no config changes; I just stopped and recreated the container. The only consistent thing was the log again showed the imaps error. I stopped and recreated the container once more with no error in the logs, and auth was disabled again.