The process to remove the current docker stack and then re-instate it is as follows. Once rebuilt then the new stack containers have the correct setting for the changed mail server.
# remove current stack
docker stack rm portal
watch docket ps # (until all the containers are closed)
docker rm $(docker ps -qa)
docker container prune
# restart and rerun portal
systemctl restart docker
cd <portalhome>
./portal.sh
watch docket ps # (until all the containers are running)