Skip to content

Commit 543361f

Browse files
committed
add TLS target to makefile
1 parent af4bc2c commit 543361f

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

Makefile

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ NAME := postfix
22
TAG := latest
33
IMAGE_NAME := panubo/$(NAME)
44

5-
.PHONY: help bash run run-dkim run-all-dkim build push clean
5+
.PHONY: *
66

77
help:
88
@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
1717
@docker attach ${ID}
1818
@docker kill ${ID}
1919

20+
run-tls: ## Runs the docker image in a test mode with TLS
21+
$(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))
22+
$(eval IP := $(shell docker inspect --format '{{ .NetworkSettings.IPAddress }}' ${ID}))
23+
@echo "Running ${ID} @ smtp://${IP}"
24+
@docker attach ${ID}
25+
@docker kill ${ID}
26+
2027
run-dkim: ## Runs the docker image in a test mode with DKIM
2128
$(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))
2229
$(eval IP := $(shell docker inspect --format '{{ .NetworkSettings.IPAddress }}' ${ID}))

0 commit comments

Comments
 (0)