1 USES
:= ldns libglog libidn2 opendkim openssl libseccomp
3 CXXFLAGS
+= -IPEGTL
/include -Ijson
/include
20 PROGRAMS
:= dns_tool smtp msg sasl snd socks5
22 arcsign_STEMS
:= arcsign \
23 message Domain IP IP4 IP6 Mailbox OpenARC OpenDKIM OpenDMARC Pill Reply osutil esc
25 arcverify_STEMS
:= arcverify \
26 message Domain IP IP4 IP6 Mailbox OpenARC OpenDKIM OpenDMARC Pill Reply osutil esc
28 DNS
:= DNS DNS-rrs DNS-fcrdns DNS-message
30 dns_tool_STEMS
:= dns_tool \
118 socks5_STEMS
:= socks5 \
152 default_init_allocator-test \
159 Base64-test_STEMS
:= Base64
160 CDB-test_STEMS
:= CDB osutil
162 DNS-test_STEMS
:= $(DNS
) DNS-ldns Domain IP IP4 IP6 POSIX Sock SockBuffer TLS-OpenSSL esc osutil
164 Domain-test_STEMS
:= Domain IP IP4 IP6
165 IP4-test_STEMS
:= Domain IP IP4 IP6
166 IP6-test_STEMS
:= Domain IP IP4 IP6
167 Magic-test_STEMS
:= Magic
168 Mailbox-test_STEMS
:= Mailbox Domain IP IP4 IP6 osutil
169 MessageStore-test_STEMS
:= $(DNS
) Domain IP IP4 IP6 MessageStore Pill POSIX Sock SockBuffer TLS-OpenSSL esc osutil
170 OpenDKIM-test_STEMS
:= OpenDKIM
171 POSIX-test_STEMS
:= POSIX
172 Pill-test_STEMS
:= Pill
173 SPF-test_STEMS
:= $(DNS
) Domain IP IP4 IP6 SPF POSIX Sock SockBuffer TLS-OpenSSL esc osutil
175 osutil-test_STEMS
:= osutil
177 Session-test_STEMS
:= \
199 Sock-test_STEMS
:= Domain IP IP4 IP6 POSIX Sock SockBuffer TLS-OpenSSL esc osutil
200 SockBuffer-test_STEMS
:= Domain IP IP4 IP6 POSIX Sock SockBuffer TLS-OpenSSL esc osutil
201 TLS-OpenSSL-test_STEMS
:= Domain IP IP4 IP6 POSIX TLS-OpenSSL osutil
202 esc-test_STEMS
:= esc
208 bad_recipients_data.cdb \
215 all:: $(databases
) public_suffix_list.dat
219 export TEST_MAILDIR
=$(TMPDIR
)/Maildir
220 export MAILDIR
=$(TEST_MAILDIR
)
222 export ASAN_OPTIONS
=detect_leaks
=0
224 export GHSMTP_SERVER_ID
=digilicious.com
226 export LLVM_PROFILE_FILE
=smtp.profraw
232 # ragel -o smtp.cpp smtp.rl
237 rm -rf
$(TEST_MAILDIR
)/*
240 .
/cdb-gen
< $< | cdb
-c
$@
243 rm -f accept_domains.cdb
250 accept_domains.cdb
: accept_domains cdb-gen
251 allow.cdb
: allow cdb-gen
252 block.cdb
: block cdb-gen
253 ip-block.cdb
: ip-block cdb-gen
254 three-level-tlds.cdb
: three-level-tlds cdb-gen
259 public_suffix_list.dat
:
260 wget
--timestamping https
://publicsuffix.org
/list
/public_suffix_list.dat
264 # safty_flags := # nada
266 # visibility_flags := # nada
270 include MKUltra
/rules
272 regression
:: $(programs
) $(TEST_MAILDIR
)
273 @for f in testcase_dir
/* ; do \
274 echo
-n
test `basename $$f` ""; \
276 valgrind .
/smtp
< $$f > $$tmp_out; \
277 diff testout_dir
/`basename $$f` $$tmp_out && echo ...pass
; \
282 @for f in testcase_dir
/* ; do \
283 echo
-n
test `basename $$f` ""; \
285 .
/smtp
< $$f > $$tmp_out; \
286 diff testout_dir
/`basename $$f` $$tmp_out && echo ...pass
; \
287 if
[ -e smtp.profraw
] ; then mv smtp.profraw
/tmp
/smtp-profile
/`basename $$f`; fi
; \
292 @for f in testcase_dir
/* ; do \
293 echo
-n
test `basename $$f` ""; \
295 ncat localhost
225 < $$f > $$tmp_out; \
296 diff testout_dir
/`basename $$f` $$tmp_out && echo ...pass
; \
297 if
[ -e smtp.profraw
] ; then mv smtp.profraw
/tmp
/smtp-profile
/`basename $$f`; fi
; \
303 GHSMTP_CLIENT_ID
=digilicious.com .
/snd
--selftest
306 llvm-profdata merge
-sparse
/tmp
/smtp-profile
/* -o smtp.profdata
307 llvm-cov show .
/smtp
-instr-profile
=smtp.profdata
310 touch accept_domains bad_recipients bad_recipients_data bad_senders block ip-block temp_fail
311 sudo dnf
install boost-devel file-devel fmt-devel glog-devel ldns-devel libidn2-devel tinycdb-devel libunistring-devel
315 @LC_ALL
=C
$(MAKE
) -pRrq
-f
$(firstword $(MAKEFILE_LIST
)) : 2>/dev
/null | awk
-v RS
= -F
: '/(^|\n)# Files(\n|$$)/,/(^|\n)# Finished Make data base/ {if ($$1 !~ "^[#.]") {print $$1}}' |
sort | uniq | grep
-E
-v
-e
'^[^[:alnum:]]' -e
'^$@$$'