-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
odbx_example-1.6.sh
38 lines (33 loc) · 1.47 KB
/
odbx_example-1.6.sh
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
#! /bin/sh
#
# faked calls to zfilter_db to simulate incoming messages
#
# After running odbx_example.sql to create a test database, run this script
# to populate it. After a few minutes, run a command like the following to
# see aggregate reports:
#
# [email protected] src/zaggregate -vf odbx_example.conf
ZFILTER_DB=src/zfilter_db
# message from s.example.org
$ZFILTER_DB $TEST -f odbx_example.conf \
--set-stats I @ [email protected] [email protected] @ @ @ @ @ @ @ @ @ pass fail \
--set-stats-domain \
example.org/org/aligned/dmarc:'v=DMARC1; aspf=s; p=reject sp=quarantine pct=50; ri=300; rua=mailto:[email protected]!40,mailto:[email protected]' \
s.example.org/author/aligned/spf:softfail/dkim:pass \
other.example/dkim \
mailer.s.example.org/spf_helo:permerror
# message from example.com
$ZFILTER_DB $TEST -f odbx_example.conf \
--set-stats I @ [email protected] [email protected] @ @ @ @ @ @ @ @ @ fail fail \
--set-stats-domain \
example.com/author/org/aligned/dmarc:'v=DMARC1; p=reject; ri=600; rua=mailto:[email protected]; fo=1:2:3:4:s:d:a:S:D:' \
another.example/dkim \
signed.example/dkim \
yet.another.example/dkim \
mailer.example.com/spf_helo
# message from non-dkim.example
$ZFILTER_DB $TEST -f odbx_example.conf \
--set-stats I @ [email protected] [email protected] @ @ @ @ @ @ @ @ @ none none none none\
--set-stats-domain \
non-dmarc.example/author/org/aligned/spf:pass/dkim:pass \
mailer.non-dmarc.example/spf_helo:pass