blob: e01880dc77254eb02bac2a5238948374faf5f20b (
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
|
# Notes on this project
# Things to do:
# fancier hi-q or pipette; handle triangular piping
# skrewt: read, use, and write envelope info
# skrewt: integrate call to spamc
# skrewt: integrate call to qmail-queue
# skrewt: integrate greylisting
CC= /usr/bin/g++
CFLAGS = -std=gnu++0x -Wall -g -I $(HOME)/lib/include
#?? exhibits = checkpassword.patch hi-q.c pido.c pop3.conf smtp.conf \
#?? smtp.rules spamc-zap.patch spamd qmail
.PHONY : shipit clean list-src ALWAYS foo dirs setup imgs \
zip wc html all hacha hevea tcprules logmark
.SECONDARY : # do not remove any intermediate files
# sources for main programs that go in /var/qmail/bin
qmain = pido.c hi-q.c skrewt.c hi-test.c mail-scan.c greylist.c \
wripper.c spf_example.c ward.c
qprogs = $(qmain:%.c=%)
# sources for other main programs:
moremain = wripper.c bash-c.c ltgrey.c fixown.c pipette.c
moreprogs = $(moremain:%.c=%)
# sources for libraries
nonmain = libltgrey.c libskrewt.c
sources = $(qmain) $(moremain) $(nonmain)
beware_other = checkpassword.c spamc.c
## dependency-finding scheme (with local mods) based on:
## http://www.gnu.org/manual/make-3.77/html_mono/make.html#SEC42
## (see also include statement at end of this makefile)
%.d : %.c
@$(SHELL) -ec '$(CXX) -MM $(CXXFLAGS) $< \
| sed '\''s/\($*\)\.o[ :]*/\1.o $@ : /g'\'' > $@; \
[ -s $@ ] || rm -f $@'
all: $(qprogs) $(moreprogs) fixown2 ward
spf_example : spf_example.o sepofra.o utils.o
$(CXX) $^ -lspf2 -o $@
show:
: --- $(qprogs) +++ $(moreprogs)
fixown: fixown.o utils.o
$(CC) $^ -o $@
chmod o-rwx $@
./fixown2 $@
fixown2: fixown.o utils.o
$(CC) $^ -o $@
chmod o-rwx $@
./fixown $@
pipette: pipette.o utils.o
$(CC) $^ -o $@
skrewt: skrewt.o libskrewt.o utils.o sepofra.o
$(CC) $^ -lboost_filesystem -lboost_system -lspf2 -o $@
./fixown $@
ward: ward.o libskrewt.o utils.o sepofra.o
$(CC) $^ -lboost_filesystem -lboost_system -lspf2 -o $@
./fixown $@
greylist: greylist.o utils.o
$(CC) $^ -lboost_filesystem -lboost_system -o $@
./fixown $@
ltgrey: ltgrey.o utils.o libltgrey.o
$(CC) $^ -lboost_filesystem -lboost_system -o $@
./fixown $@
wripper: wripper.o
$(CC) $^ -o $@
./fixown $@
mail-scan: mail-scan.o utils.o
$(CC) $^ -lboost_regex -o $@
hi-test: hi-test.o utils.o
$(CC) $^ -lboost_regex -o $@
install:
install $(qprogs) /var/qmail/bin/
install -gdaemon -m2755 wripper /usr/lib/mailman/mail/
install bash-c /usr/local/bin/
cp filters.conf aufilters.conf /var/qmail/control/
install -m700 -d /var/qmail/rbin
chown qmaild /var/qmail/rbin
chgrp qmail /var/qmail/rbin
install -m755 ../checkpasswd/checkpassword /var/qmail/rbin/
chown root /var/qmail/rbin/checkpassword
chmod u+s /var/qmail/rbin/checkpassword
cp smtp.conf /etc/stunnel/
cp pop3.conf /etc/stunnel/
install qmail-tls-check_certs /var/qmail/bin/
install spamassassin /etc/init.d/
install qmail /etc/init.d/
install spamassassin.default /etc/default/spamassassin
install tcprules.make /etc/tcpserver/makefile
/etc/tcpserver/smtp.rules :
./mk_smtp_rules $@
logmark:
logger -t jsd -p mail.info =========================
# Command to let everybody out of the penalty box:
parole:
greylist -scan |grep penalty | while read addr rest ; do TCPREMOTEIP=$addr greylist -p 1 -v ; done
todo:
echo \
pass message-ID to greylist program \
... also provide a way for certain recipients to bypass some checks \
... both will require major restructuring, "cat" process \
... IPv6 reverse-DNS recors \
... "clean up bad DNS reports nnnn --> () ==> ()" \
.....
ALWAYS:
@echo ...
##?? include $(chapters:.htm=.d)
##?? include $(fancy:%.htm=aux/%.fig)
include $(sources:.c=.d)
|