Task #1583
openNew testing environment - FakeSMTP
0%
Description
It will be handy to actually send mail from the CzechIdM, to make sure it really does get sent.
For development purposes, we sometimes use fakesmtp ( https://github.com/munkyboy/docker-fakesmtp ?).
I am not sure if it is viable to have it running on some virtual machine on the network, the application has GUI... needs more thinking before we get to implementing.
Updated by Petr Fišer over 5 years ago
This image also works completely fine. It stashes mail in /tmp/fakemail on the host where it can be viewed. I think this is totally fine as /tmp gets cleaned up as needed.
Working minimal compose file:
version: '2.1' services: # Build from local "Dockerfile" file local-example: build: context: . image: munkyboy/fakesmtp volumes: - /tmp/fakemail:/var/mail ports: - "2525:25" restart: always
Updated by Ondřej Kopr over 5 years ago
The fakeSMPT works perfectly, good choice. Some tests from core use this. It is singleton but for tests it is enough:
https://github.com/bcvsolutions/CzechIdMng/blob/develop/Realization/backend/core/core-test-api/src/main/java/eu/bcvsolutions/idm/test/api/AbstractNotificationTest.java