feat(core): the e-mail program after Java, measured against Java

The program sends to its account's SMTP server, one connection for each
recipient, and fetches its mails by POP3; the server now sends mails on
to other domains by MX and returns notices to their senders. The
program's folders are in the snapshot and go back into the project.
EmailClientRun plays six stories with two servers; the mail oracles run
in the language's locale, so Java's notice dates match the core's.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-01 19:38:44 +00:00
co-authored by Claude Opus 5.5
parent 015635926f
commit 058675a148
30 changed files with 58319 additions and 1724 deletions
+18 -7
View File
@@ -21,7 +21,7 @@ if [ ! -f "$upstream/target/filius.jar" ]; then
fi
classpath="$upstream/target/filius.jar:$upstream/target/lib/*"
mkdir -p "$here/.build"
javac -encoding UTF-8 -d "$here/.build" -cp "$classpath" "$here/src/FlsOracle.java" "$here/src/GetterDefaults.java" "$here/src/IpCheckCases.java" "$here/src/DnsHostsCases.java" "$here/src/EmailFileCases.java" "$here/src/BeansDump.java" "$here/src/Base64Cases.java" "$here/src/ScenarioNetwork.java" "$here/src/DhcpRun.java" "$here/src/TcpRun.java" "$here/src/DnsRun.java" "$here/src/ArpRun.java" "$here/src/RipRun.java" "$here/src/NatRun.java" "$here/src/WlanRun.java" "$here/src/ExampleRun.java" "$here/src/EchoRun.java" "$here/src/WebRun.java" "$here/src/RouterWebRun.java" "$here/src/KonfigCases.java" "$here/src/EmailRun.java" "$here/src/MailCases.java"
javac -encoding UTF-8 -d "$here/.build" -cp "$classpath" "$here/src/FlsOracle.java" "$here/src/GetterDefaults.java" "$here/src/IpCheckCases.java" "$here/src/DnsHostsCases.java" "$here/src/EmailFileCases.java" "$here/src/BeansDump.java" "$here/src/Base64Cases.java" "$here/src/ScenarioNetwork.java" "$here/src/DhcpRun.java" "$here/src/TcpRun.java" "$here/src/DnsRun.java" "$here/src/ArpRun.java" "$here/src/RipRun.java" "$here/src/NatRun.java" "$here/src/WlanRun.java" "$here/src/ExampleRun.java" "$here/src/EchoRun.java" "$here/src/WebRun.java" "$here/src/RouterWebRun.java" "$here/src/KonfigCases.java" "$here/src/EmailRun.java" "$here/src/MailCases.java" "$here/src/EmailClientRun.java"
# FILIUS writes its settings below $HOME; keep them out of the real one.
mkdir -p "$here/.build/home"
# Removed first: a crashed run must not leave the previous result standing.
@@ -248,20 +248,31 @@ for language in de en; do
done
# The e-mail server as Java FILIUS runs it (EmailRun on mail-lan), and its
# SMTP and POP3 workers fed without a network, in both languages (MailCases).
# SMTP and POP3 workers fed without a network, in both languages (MailCases);
# the e-mail program with two servers (EmailClientRun). The JVM runs in the
# language's locale: a server's notice carries DateFormat's date in it.
german="-Duser.language=de -Duser.country=DE"
for run in smtp:16000 smtpErrors:25000 pop3:36000 pop3Errors:20000; do
story="${run%%:*}"
output="$root/packages/core/test/scenarios/email-java-$story.java.json"
rm -f "$output"
HOME="$here/.build/home" xvfb-run -a java -cp "$classpath:$here/.build" EmailRun \
HOME="$here/.build/home" xvfb-run -a java $german -cp "$classpath:$here/.build" EmailRun \
"$root/packages/core/test/scenarios/mail-lan.scenario.json" "$story" "${run##*:}" "$output" 2>&1 | grep -v 'logback\|^$' || true
test -s "$output"
done
for language in de en; do
output="$root/packages/core/test/email-server.$language.java.json"
for language in de:DE en:GB; do
output="$root/packages/core/test/email-server.${language%%:*}.java.json"
rm -f "$output"
HOME="$here/.build/home" xvfb-run -a java -cp "$classpath:$here/.build" MailCases "$language" \
"$root/packages/core/test/email-server.cases.txt" "$output" 2>&1 | grep -v 'logback\|^$' || true
HOME="$here/.build/home" xvfb-run -a java -Duser.language="${language%%:*}" -Duser.country="${language##*:}" -cp "$classpath:$here/.build" \
MailCases "${language%%:*}" "$root/packages/core/test/email-server.cases.txt" "$output" 2>&1 | grep -v 'logback\|^$' || true
test -s "$output"
done
for run in send:15000 fetch:10000 byName:35000 wrongPass:8000 noServer:15000 unknownHost:15000; do
story="${run%%:*}"
output="$root/packages/core/test/scenarios/email-client-java-$story.java.json"
rm -f "$output"
HOME="$here/.build/home" xvfb-run -a java $german -cp "$classpath:$here/.build" EmailClientRun \
"$root/packages/core/test/scenarios/mail-lan.scenario.json" "$story" "${run##*:}" "$output" 2>&1 | grep -v 'logback\|^$\|^\s*at ' || true
test -s "$output"
done