+ # remote port numbers vary
+ s/(Connection request from 127.0.0.1 port) \d{1,5}/$1 sssss/;
+
+ # Platform-dependent error strings
+ s/Operation timed out/Connection timed out/;
+
+ # Platform differences on disconnect
+ s/unexpected disconnection while reading SMTP command from \[127.0.0.1\] \K\(error: Connection reset by peer\) //;
+
+ # Platform-dependent resolver option bits
+ s/^ (?:writing|update) neg-cache entry for [^,]+-\K[0-9a-f]+, ttl/xxxx, ttl/;
+
+ # timing variance, run-to-run
+ s/^time on queue = \K1s/0s/;
+
+ # Skip hosts_require_dane checks when the options
+ # are unset, because dane ain't always there.
+ next if /in\shosts_require_dane\?\sno\s\(option\sunset\)/x;
+
+ # DISABLE_OCSP
+ next if /in hosts_requ(est|ire)_ocsp\? (no|yes)/;
+
+ # SUPPORT_PROXY
+ next if /host in hosts_proxy\?/;
+
+ # PIPE_CONNECT
+ next if / in (pipelining_connect_advertise_hosts|hosts_pipe_connect)?\? no /;
+
+ # Experimental_International
+ next if / in smtputf8_advertise_hosts\? no \(option unset\)/;
+
+ # Experimental_REQUIRETLS
+ next if / in tls_advertise_requiretls?\? no \(end of list\)/;
+
+ # TCP Fast Open
+ next if /^(ppppp )?setsockopt FASTOPEN: Network Error/;
+
+ # Environment cleaning
+ next if /\w+ in keep_environment\? (yes|no)/;
+
+ # Sizes vary with test hostname
+ s/^cmd buf flush \d+ bytes$/cmd buf flush ddd bytes/;
+
+ # Spool filesystem free space changes on different systems.
+ s/^((?:spool|log) directory space =) -?\d+K (inodes =)\s*-?\d+/$1 nnnnnK $2 nnnnn/;
+
+ # Non-TLS builds have different expansions for received_header_text
+ if (s/(with \$received_protocol)\}\} \$\{if def:tls_cipher \{\(\$tls_cipher\)\n$/$1/)
+ {
+ $_ .= <IN>;
+ s/[\sâ•Ž]+\}\}(?=\(Exim )/\}\} /;
+ }
+ if (/^ ├──condition: def:tls_cipher$/)
+ {
+ <IN>; <IN>; <IN>; <IN>; <IN>; <IN>;
+ <IN>; <IN>; <IN>; <IN>; <IN>; next;
+ }
+
+ # Not all platforms build with DKIM enabled
+ next if /^DKIM >> Body data for hash, canonicalized/;
+
+ # Not all platforms build with SPF enabled
+ next if /^(spf_conn_init|SPF_dns_exim_new|spf_compile\.c)/;
+
+ # Not all platforms have sendfile support
+ next if /^cannot use sendfile for body: no support$/;
+
+ # Parts of DKIM-specific debug output depend on the time/date
+ next if /^date:\w+,\{SP\}/;
+ next if /^DKIM \[[^[]+\] (Header hash|b) computed:/;
+
+ # Not all platforms support TCP Fast Open, and the compile omits the check
+ if (s/\S+ in hosts_try_fastopen\? (no \(option unset\)|no \(end of list\)|yes \(matched "\*"\))\n$//)
+ {
+ chomp;
+ $_ .= <IN>;
+ s/ \.\.\. >>> / ... /;
+ if (s/ non-TFO mode connection attempt to 224.0.0.0, 0 data\b$//) { chomp; $_ .= <IN>; }
+ s/Address family not supported by protocol family/Network Error/;
+ s/Network is unreachable/Network Error/;
+ }
+ next if /^(ppppp )?setsockopt FASTOPEN: Protocol not available$/;
+ s/^(Connecting to .* \.\.\. sending) \d+ (nonTFO early-data)$/$1 dd $2/;
+
+ if (/^([0-9: ]* # possible timestamp
+ Connecting\ to\ [^ ]+\ [^ ]+(\ from\ [^ ]+)?)\ \.\.\.
+ \ .*TFO\ mode\x20
+ (sendto,\ no\ data:\ EINPROGRESS # Linux
+ |connection\ attempt\ to\ [^,]+,\ 0\ data) # MacOS & no-support
+ $/x)
+ {
+ $_ = $1 . " ... " . <IN>;
+ s/^(.* \.\.\.) [0-9: ]*connected$/$1 connected/;
+
+ if (/^Connecting to .* \.\.\. connected$/)
+ {
+ $_ .= <IN>;
+ if (/^(Connecting to .* \.\.\. )connected\n\s+SMTP(\(close\)>>|\(Connection refused\)<<)$/)
+ {
+ $_ = $1 . "failed: Connection refused\n" . <IN>;
+ s/^(Connecting .*)\n\s+SMTP\(close\)>>$/$1/;
+ }
+ elsif (/^(Connecting to .* \.\.\. connected\n)read response data: size=/)
+ { $_ = $1; }
+
+ # Date/time in SMTP banner
+ s/[A-Z][a-z]{2},\s\d\d?\s[A-Z][a-z]{2}\s\d{4}\s\d\d\:\d\d:\d\d\s[-+]\d{4}
+ /Tue, 2 Mar 1999 09:44:33 +0000/gx;
+ }
+ }
+
+ # Specific pointer values reported for DB operations change from run to run
+ s/^(\s*returned from EXIM_DBOPEN: )(0x)?[0-9a-f]+/${1}0xAAAAAAAA/;
+ s/^(\s*EXIM_DBCLOSE.)(0x)?[0-9a-f]+/${1}0xAAAAAAAA/;
+
+ # Platform-dependent output during MySQL startup
+ next if /PerconaFT file system space/;
+ next if /^Waiting for MySQL server to answer/;
+ next if /mysqladmin: CREATE DATABASE failed; .* database exists/;
+
+ # Not all builds include DMARC
+ next if /^DMARC: no (dmarc_tld_file|sender_host_address)$/ ;
+
+ # TLS resumption is not always supported by the build
+ next if /in tls_resumption_hosts\?/;
+
+ # Platform differences in errno strings
+ s/ SMTP\(Operation timed out\)<</ SMTP(Connection timed out)<</;
+
+ # Platform differences for errno values (eg. Hurd)
+ s/^errno = \d+$/errno = EEE/;
+ s/^writing error \d+: /writing error EEE: /;
+