1 USES
:= ldns libglog libidn2 opendkim openssl
3 CXXFLAGS
+= -IPEGTL
/include -Ijson
/include -Icppcodec
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 \
119 socks5_STEMS
:= socks5 \
154 default_init_allocator-test \
161 Base64-test_STEMS
:= Base64
162 CDB-test_STEMS
:= CDB osutil
164 DNS-test_STEMS
:= $(DNS
) DNS-ldns Domain IP IP4 IP6 POSIX Sock SockBuffer TLS-OpenSSL esc osutil
166 Domain-test_STEMS
:= $(DNS
) Domain IP IP4 IP6 POSIX Sock SockBuffer TLS-OpenSSL esc osutil
167 IP4-test_STEMS
:= $(DNS
) Domain IP IP4 IP6 POSIX Sock SockBuffer TLS-OpenSSL esc osutil
168 IP6-test_STEMS
:= $(DNS
) Domain IP IP4 IP6 POSIX Sock SockBuffer TLS-OpenSSL esc osutil
169 Magic-test_STEMS
:= Magic
170 Mailbox-test_STEMS
:= Mailbox Domain IP IP4 IP6 osutil
171 MessageStore-test_STEMS
:= $(DNS
) Domain IP IP4 IP6 MessageStore Pill POSIX Sock SockBuffer TLS-OpenSSL esc osutil
172 OpenDKIM-test_STEMS
:= OpenDKIM
173 POSIX-test_STEMS
:= POSIX
174 Pill-test_STEMS
:= Pill
175 SPF-test_STEMS
:= $(DNS
) Domain IP IP4 IP6 SPF POSIX Sock SockBuffer TLS-OpenSSL esc osutil
176 SRS-test_STEMS
:= SRS Domain Mailbox IP IP4 IP6
177 Send-test_STEMS
:= $(DNS
) Domain IP IP4 IP6 Mailbox OpenARC OpenDKIM OpenDMARC POSIX Pill SPF Send Sock SockBuffer TLS-OpenSSL esc osutil
179 osutil-test_STEMS
:= osutil
181 Session-test_STEMS
:= \
204 Sock-test_STEMS
:= Domain IP IP4 IP6 POSIX Sock SockBuffer TLS-OpenSSL esc osutil
205 SockBuffer-test_STEMS
:= Domain IP IP4 IP6 POSIX Sock SockBuffer TLS-OpenSSL esc osutil
206 TLS-OpenSSL-test_STEMS
:= Domain IP IP4 IP6 POSIX TLS-OpenSSL osutil
207 esc-test_STEMS
:= esc
213 bad_recipients_data.cdb \
220 all:: $(databases
) public_suffix_list.dat
224 export TEST_MAILDIR
=$(TMPDIR
)/Maildir
225 export MAILDIR
=$(TEST_MAILDIR
)
227 export ASAN_OPTIONS
=detect_leaks
=0
229 export GHSMTP_SERVER_ID
=digilicious.com
231 export LLVM_PROFILE_FILE
=smtp.profraw
237 # ragel -o smtp.cpp smtp.rl
242 rm -rf
$(TEST_MAILDIR
)/*
245 .
/cdb-gen
< $< | cdb
-c
$@
248 rm -f accept_domains.cdb
255 accept_domains.cdb
: accept_domains cdb-gen
256 allow.cdb
: allow cdb-gen
257 block.cdb
: block cdb-gen
258 ip-block.cdb
: ip-block cdb-gen
259 three-level-tlds.cdb
: three-level-tlds cdb-gen
264 public_suffix_list.dat
:
265 wget
--timestamping https
://publicsuffix.org
/list
/public_suffix_list.dat
269 # safty_flags := # nada
271 # visibility_flags := # nada
275 include MKUltra
/rules
277 regression
:: $(programs
) $(TEST_MAILDIR
)
278 @for f in testcase_dir
/* ; do \
279 echo
-n
test `basename $$f` ""; \
281 valgrind .
/smtp
< $$f > $$tmp_out; \
282 diff testout_dir
/`basename $$f` $$tmp_out && echo ...pass
; \
287 @for f in testcase_dir
/* ; do \
288 echo
-n
test `basename $$f` ""; \
290 .
/smtp
< $$f > $$tmp_out; \
291 diff testout_dir
/`basename $$f` $$tmp_out && echo ...pass
; \
292 if
[ -e smtp.profraw
] ; then mv smtp.profraw
/tmp
/smtp-profile
/`basename $$f`; fi
; \
297 @for f in testcase_dir
/* ; do \
298 echo
-n
test `basename $$f` ""; \
300 ncat localhost
225 < $$f > $$tmp_out; \
301 diff testout_dir
/`basename $$f` $$tmp_out && echo ...pass
; \
302 if
[ -e smtp.profraw
] ; then mv smtp.profraw
/tmp
/smtp-profile
/`basename $$f`; fi
; \
308 GHSMTP_CLIENT_ID
=digilicious.com .
/snd
--selftest
311 llvm-profdata merge
-sparse
/tmp
/smtp-profile
/* -o smtp.profdata
312 llvm-cov show .
/smtp
-instr-profile
=smtp.profdata
315 touch accept_domains bad_recipients bad_recipients_data bad_senders block ip-block temp_fail
316 sudo dnf
install boost-devel file-devel fmt-devel glog-devel ldns-devel libidn2-devel tinycdb-devel libunistring-devel
320 @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
'^$@$$'