Here are the following commands :
root@yoda:/home/btellier# docker exec 9253 /root/james-server-app-3.0.0-beta5-SNAPSHOT/bin/james-cli.sh -h 127.0.0.1 -p 9999 listdomains
root@yoda:/home/btellier# docker exec 9253 /root/james-server-app-3.0.0-beta5-SNAPSHOT/bin/james-cli.sh -h 127.0.0.1 -p 9999 adduser email@example.com p
Error while execute command:
Domain does not exist in DomainList
What we can see is that James list domains that do not really exists. I can not use an auto detected domain.
Domain auto detection is done on AbstractDomainList in getDomains operation.
It is not done in containsDomain operation.
So when I try to add a user above, code fails on the containsDomain that returns false.
Solution is to make the same resolution on containsUser
Acceptance criteria :
- I can add a user to an auto detected domain
- Improve auto detection handling :
- an auto detected domain can not be deleted ( returns specific error )
- an auto detected domain can be added ( as we may want to persist it )
- an auto detected domain is contained
- an auto detected domain is listed
- Tests should be written for auto detection handling for above stories