Project

General

Profile

Actions

Task #1583

open

New testing environment - FakeSMTP

Added by Petr Fišer over 5 years ago. Updated over 5 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
03/26/2019
Due date:
% Done:

0%

Estimated time:
Owner:

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.

Actions #1

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

Actions #2

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

Actions

Also available in: Atom PDF