blob: 09f1fc85a7ac16a03aec5b44899613d96e8a20f3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
|
# $OpenBSD: Makefile,v 1.8 2014/03/12 21:40:27 tedu 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.
#
SENDMAIL= /usr/libexec/sendmail/sendmail
MAKEMAP= /usr/libexec/sendmail/makemap
.for DB in access aliases genericstable 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 wheel -m 644 Makefile \
${DESTDIR}/etc/mail/Makefile
${INSTALL} -c -o root -g wheel -m 644 README \
${DESTDIR}/etc/mail/README
${INSTALL} -c -o root -g wheel -m 644 access \
${DESTDIR}/etc/mail/access
${MAKEMAP} hash ${DESTDIR}/etc/mail/access < access
${INSTALL} -c -o root -g wheel -m 644 aliases \
${DESTDIR}/etc/mail/aliases
${SENDMAIL} -C${DESTDIR}/etc/mail/sendmail.cf \
-bi -O AliasFile=${DESTDIR}/etc/mail/aliases \
-O DontBlameSendmail=mapinunsafedirpath
${INSTALL} -c -o root -g wheel -m 644 local-host-names \
${DESTDIR}/etc/mail/local-host-names
${INSTALL} -c -o root -g wheel -m 644 genericstable \
${DESTDIR}/etc/mail/genericstable
${MAKEMAP} hash ${DESTDIR}/etc/mail/genericstable < genericstable
${INSTALL} -c -o root -g wheel -m 644 mailertable \
${DESTDIR}/etc/mail/mailertable
${MAKEMAP} hash ${DESTDIR}/etc/mail/mailertable < mailertable
${INSTALL} -c -o root -g wheel -m 644 relay-domains \
${DESTDIR}/etc/mail/relay-domains
${INSTALL} -c -o root -g wheel -m 644 trusted-users \
${DESTDIR}/etc/mail/trusted-users
${INSTALL} -c -o root -g wheel -m 644 virtusertable \
${DESTDIR}/etc/mail/virtusertable
${INSTALL} -c -o root -g wheel -m 644 spamd.conf \
${DESTDIR}/etc/mail/spamd.conf
${INSTALL} -c -o root -g wheel -m 644 smtpd.conf \
${DESTDIR}/etc/mail/smtpd.conf
${MAKEMAP} hash ${DESTDIR}/etc/mail/virtusertable < virtusertable
@for db in access.db aliases.db genericstable.db mailertable.db \
virtusertable.db; do \
chmod 644 ${DESTDIR}/etc/mail/$$db; \
done
access.db: access
${MAKEMAP} hash ${.ALLSRC} < ${.ALLSRC}
aliases.db: aliases
newaliases
genericstable.db: genericstable
${MAKEMAP} hash ${.ALLSRC} < ${.ALLSRC}
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>
|