summaryrefslogtreecommitdiff
path: root/etc/mail/Makefile
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2003-09-23 21:37:12 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2003-09-23 21:37:12 +0000
commit490959af4a46af4d62494b762be931f65aa68b20 (patch)
treed7e0239bd79398045f0423c9a3bd46cdc410e136 /etc/mail/Makefile
parent8cf486d5d89a94681b17b383d294ac9eb5fe19c0 (diff)
Sample files for /etc/mail, installed at 'make distribution' time.
Diffstat (limited to 'etc/mail/Makefile')
-rw-r--r--etc/mail/Makefile66
1 files changed, 66 insertions, 0 deletions
diff --git a/etc/mail/Makefile b/etc/mail/Makefile
new file mode 100644
index 00000000000..b65804eca10
--- /dev/null
+++ b/etc/mail/Makefile
@@ -0,0 +1,66 @@
+# $OpenBSD: Makefile,v 1.1 2003/09/23 21:37:11 millert Exp $
+#
+# Generate the various .db versions from their source files.
+# The sendmail .mc files are not built here. They live in
+# /usr/share/sendmail/cf and have their own Makefile.
+#
+
+.for DB in access aliases mailertable virtusertable userdb
+. if exists(${DB})
+DB_FILES+= ${DB}.db
+. endif
+.endfor
+
+all: ${DB_FILES}
+
+clean:
+ rm -f ${DB_FILES}
+
+distribution:
+ ${INSTALL} -c -o root -g ${BINGRP} -m 644 Makefile \
+ ${DESTDIR}/etc/mail/Makefile
+ ${INSTALL} -c -o root -g ${BINGRP} -m 644 README \
+ ${DESTDIR}/etc/mail/README
+ ${INSTALL} -c -o root -g ${BINGRP} -m 644 access \
+ ${DESTDIR}/etc/mail/access
+ makemap hash ${DESTDIR}/etc/mail/access < access
+ ${INSTALL} -c -o root -g ${BINGRP} -m 644 aliases \
+ ${DESTDIR}/etc/mail/aliases
+ /usr/libexec/sendmail/sendmail -C${DESTDIR}/etc/mail/sendmail.cf \
+ -bi -O AliasFile=${DESTDIR}/etc/mail/aliases \
+ -O DontBlameSendmail=mapinunsafedirpath
+ ${INSTALL} -c -o root -g ${BINGRP} -m 644 local-host-names \
+ ${DESTDIR}/etc/mail/local-host-names
+ ${INSTALL} -c -o root -g ${BINGRP} -m 644 mailertable \
+ ${DESTDIR}/etc/mail/mailertable
+ makemap hash ${DESTDIR}/etc/mail/mailertable < mailertable
+ ${INSTALL} -c -o root -g ${BINGRP} -m 644 relay-domains \
+ ${DESTDIR}/etc/mail/relay-domains
+ ${INSTALL} -c -o root -g ${BINGRP} -m 644 trusted-users \
+ ${DESTDIR}/etc/mail/trusted-users
+ ${INSTALL} -c -o root -g ${BINGRP} -m 644 virtusertable \
+ ${DESTDIR}/etc/mail/virtusertable
+ makemap hash ${DESTDIR}/etc/mail/virtusertable < virtusertable
+ @for db in access.db aliases.db mailertable.db virtusertable.db; do \
+ chown root:${BINGRP} ${DESTDIR}/etc/mail/$$db; \
+ chmod 644 ${DESTDIR}/etc/mail/$$db; \
+ done
+
+access.db: access
+ makemap hash ${.ALLSRC} < ${.ALLSRC}
+
+aliases.db: aliases
+ sendmail -bi
+
+mailertable.db: mailertable
+ makemap hash ${.ALLSRC} < ${.ALLSRC}
+
+virtusertable.db: virtusertable
+ makemap hash ${.ALLSRC} < ${.ALLSRC}
+
+userdb.db: userdb
+ makemap btree ${.ALLSRC} < ${.ALLSRC}
+
+.PHONY: distribution
+.include <bsd.own.mk>
+.include <bsd.sys.mk>