summaryrefslogtreecommitdiffstats
path: root/util/t/anonbox.net/got-some-valid-looking-email
blob: 4c3e7a11dcc062cadcbeaf614765bfc0025bf4a0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#! /bin/sh
set -euf

tempfile=`mktemp /tmp/test.XXXXXXXX`
trap "rm -f $tempfile" EXIT INT

anonbox.net >$tempfile
. $tempfile

{
  echo $email
} | {
  IFS=@. read _logname subdomain domain

  echo "$uri" | grep -q "^https://$domain/$subdomain/[0-9a-f]*/$"
}