Page MenuHomePhabricator

raw-paste-data.txt

Authored By
jhathaway
Jun 6 2022, 1:54 PM
Size
1 KB
Referenced Files
None
Subscribers
None

raw-paste-data.txt

Top Local Names:
626 info-it
715 info-en-q
716 info-ru
717 wikinews
912 info-es
974 permissions
1361 wikimania-scholarships
1378 dal-feedback
1468 contrib
1684 permissions-en
1893 permissions-commons
2161 info-de
2297 wikimania-program
2880 donations
2922 press-de
3005 stewards
5323 info-en
5398 https
7103 info
8473 wikimania-registration
Top Domain Names:
0 wikilovesmonuments.be
0 wikilovesmonuments.cat
0 wikilovesmonuments.eu
0 wikilovesmonuments.nl
0 wikimedia.com
0 wikipedia.com
67 wikibooks.org
87 wikimedia.community
88 wikiversity.org
89 wikinews.org
105 wikidata.org
114 mediawiki.org
116 wikisource.org
208 wikilovesmonuments.org
347 wiktionary.org
470 wikivoyage.org
1362 wikiquote.org
8513 wikipedia.org
59924 wikimedia.org
#!/bin/bash
set -o errexit
set -o nounset
set -o pipefail
shopt -s lastpipe
function join_by {
local d=${1-} f=${2-}
if shift 2; then
printf %s "$f" "${@/#/$d}"
fi
}
results=$(mktemp)
cleanup() {
rm "$results"
}
trap cleanup SIGINT SIGHUP SIGABRT EXIT
declare -a addresses
while read -r key _; do
addresses+=("${key%:*}")
done </etc/exim4/otrs_emails
grep -E '=> ('"$(join_by '|' "${addresses[@]}")"')' < <(zcat /var/log/exim4/mainlog.*.gz) >"$results"
declare -Ai domain_names
declare -Ai local_names
for email in "${addresses[@]}"; do
count=$(grep -c '=> '"$email" <"$results") || true
IFS='@' read -r local_name domain_name <<<"$email"
local_names[$local_name]+=$count
domain_names[$domain_name]+=$count
done
printf '\nTop Local Names:\n'
for local_name in "${!local_names[@]}"; do
printf '%d\t%s\n' "${local_names[$local_name]}" "$local_name"
done | sort -n | tail -n 20
printf '\nTop Domain Names:\n'
for domain_name in "${!domain_names[@]}"; do
printf '%d\t%s\n' "${domain_names[$domain_name]}" "$domain_name"
done | sort -n | tail -n 20

File Metadata

Mime Type
text/plain; charset=utf-8
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
9498928
Default Alt Text
raw-paste-data.txt (1 KB)

Event Timeline