-SRC := $(shell pwd)
-DST := /etc/postfix
+SUBDIRS := postfix postfixadmin dovecot
-INPUTS := main.cf Makefile master.cf mysql/* postgrey_whitelist_clients.local postgrey_whitelist_recipients rbl_override
+all: $(SUBDIRS)
+.PHONY: $(SUBDIRS)
-all: $(INPUTS:%=$(DST)/%)
-
-$(DST)/%: $(SRC)/%
- @mkdir -p $(@D)
- cp $^ $@
+$(SUBDIRS):
+ $(MAKE) -C $@