From 543361f2fa227237fc37275c596f63594c3a8ed5 Mon Sep 17 00:00:00 2001 From: Andrew Cutler Date: Fri, 8 Jul 2022 11:23:50 +1000 Subject: [PATCH] add TLS target to makefile --- Makefile | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 4657da0..268a7ae 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,7 @@ NAME := postfix TAG := latest IMAGE_NAME := panubo/$(NAME) -.PHONY: help bash run run-dkim run-all-dkim build push clean +.PHONY: * help: @printf "$$(grep -hE '^\S+:.*##' $(MAKEFILE_LIST) | sed -e 's/:.*##\s*/:/' -e 's/^\(.\+\):\(.*\)/\\x1b[36m\1\\x1b[m:\2/' | column -c2 -t -s :)\n" @@ -17,6 +17,13 @@ run: ## Runs the docker image in a test mode @docker attach ${ID} @docker kill ${ID} +run-tls: ## Runs the docker image in a test mode with TLS + $(eval ID := $(shell docker run -d --name postfix --hostname mail.example.com -e RELAYHOST=172.17.0.2 -e MAILNAME=mail.example.com -e USE_TLS=yes $(IMAGE_NAME):latest)) + $(eval IP := $(shell docker inspect --format '{{ .NetworkSettings.IPAddress }}' ${ID})) + @echo "Running ${ID} @ smtp://${IP}" + @docker attach ${ID} + @docker kill ${ID} + run-dkim: ## Runs the docker image in a test mode with DKIM $(eval ID := $(shell docker run -d --name postfix --hostname mail.example.com -e RELAYHOST=172.17.0.2 -e MAILNAME=mail.example.com -e DKIM_DOMAINS=foo.example.com,bar.example.com,example.net -e USE_DKIM=yes -v `pwd`/dkim.key:/etc/opendkim/dkim.key $(IMAGE_NAME):latest)) $(eval IP := $(shell docker inspect --format '{{ .NetworkSettings.IPAddress }}' ${ID}))