+ # 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/;
+
+ # content-scan: file order can vary in directory
+ s%unspool_mbox\(\): unlinking 'TESTSUITE/spool/scan/[^/]*/\K[^\']*%FFFFFFFFF%;
+
+ # 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;
+
+ # daemon notifier socket
+ s% \@(?=[^ @]+/spool/exim_daemon_notify$)% %;
+ next if /unlinking notifier socket/;
+
+ # daemon notifier socket
+ # Timing variance over runs. Collapse repeated memssages.
+ if (/notify triggered queue run/)
+ {
+ my $line = $_;
+ while (/notify triggered queue run/) { $_ = <IN>; }
+ $_ = $line . $_;
+ }
+
+ # Different builds will have different lookup types included
+ s/search_type \K\d+ \((\w+)\) quoting -1 \(none\)$/NN ($1) quoting -1 (none)/;
+ # and different numbers of lookup types result in different type-code letters,
+ # so convert them all to "0"
+ s%(?<!lsearch)[^ ](?=TESTSUITE/aux-fixed/(?:0414.list[12]|0464.domains)$)%0%;
+
+ # 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/;
+
+ # Different platforms put different error messages into retry records
+ s/dbfn_write: key=.* datalen \K\d{2,3}$/nn/;
+ s/dbfn_read: size \K\d{2,3}(?= return$)/nnn/;
+
+ # Spool filesystem free space changes on different systems.
+ s/((?:spool|log) directory space =) -?\d+K (inodes =)\s*-?\d+/$1 nnnnnK $2 nnnnn/;
+
+ # CONTENT_SCAN
+ next if /try option acl_(?:not_)?smtp_mime$/;
+
+ # DISABLE_OCSP
+ next if /in hosts_requ(est|ire)_ocsp\? (no|yes)/;
+
+ # WELLKNOWN
+ next if / in wellknown_advertise_hosts\?/;
+
+ # SUPPORT_PROXY
+ next if /host in hosts_proxy\?/;
+
+ # PIPE_CONNECT
+ if ( /^(>>>)?\s*host in pipelining_connect_advertise_hosts\?$/ )
+ {
+ $_ = <IN>;
+ while ( /^(>>>)?\s*list element:/ ) { $_ = <IN>; }
+ goto RESET_AFTER_EXTRA_LINE_READ;
+ }
+ 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\)/;
+
+ # Experimental_LIMITS
+ if ( /^((>>>)?\s*host)? in limits_advertise_hosts\?$/ )
+ {
+ $_ = <IN>;
+ while ( /^(>>>)?\s*list element: !\*$/ ) { $_ = <IN>; }
+ goto RESET_AFTER_EXTRA_LINE_READ;
+ }
+ next if / in limits_advertise_hosts?\? no \(matched "!\*"\)/;
+
+ # Experimental_XCLIENT
+ next if / in hosts_xclient\? no \(option unset\)/;
+
+ # Experimental_WELLKNOWN
+ next if / in hosts_wellknown\? no \(option unset\)/;
+
+ # TCP Fast Open
+ next if /^(ppppp )?setsockopt FASTOPEN: Network Error/;
+
+ # DISABLE_TLS_RESUME
+ # TLS resumption is not always supported by the build
+ next if /in tls_resumption_hosts\?/;
+ next if /RE '.outlook.com/;
+
+ # 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)/;
+ next if /try option spf_smtp_comment_template$/;
+
+ # 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
+ next if /\S+ in hosts_try_fastopen\? (no \(option unset\)|no \(end of list\)|yes \(matched "\*"\))\n$/ ;
+
+# 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 |\d+ )?setsockopt FASTOPEN: Protocol not available$/;
+ s/^(sending) \d+ (nonTFO early-data)$/$1 dd $2/;
+
+ if (/^[0-9: ]* # possible timestamp
+ \ .*TFO\ mode\x20
+ (sendto,\ no\ data:\ EINPROGRESS # Linux
+ |connection\ attempt\ to\ [^,]+,\ 0\ data) # MacOS & no-support
+ $/x)
+ {
+ $_ = <IN>;
+ if (/^connected$/)
+ {
+ $_ .= <IN>;
+ if (/^connected\n\s+SMTP(\(close\)>>|\(Connection refused\)<<)$/)
+ {
+ $_ = "failed: Connection refused\n" . <IN>;
+ s/^\n\s+SMTP\(close\)>>$/$1/;
+ }
+ elsif (/^(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/(returned from EXIM_DBOPEN: )(0x)?[0-9a-f]+/${1}0xAAAAAAAA/;
+ 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/;
+
+ # Postgres version-dependent differences
+ s/^initdb: warning: (enabling "trust" authentication for local connections)$/\nWARNING: $1/;
+ # Postgre DB server PID
+ s/ \[\d+\] (?=(LOG: redirecting log|HINT: Future log output))/ [pppp] /;
+
+ # Not all builds include DMARC
+ next if /^DMARC: no (dmarc_tld_file|sender_host_address)$/ ;
+
+ # 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: /;
+
+ # Time-only, in debug output
+ # we have to handle double lines from the DBOPEN, hence placed down here and /mg
+ s/^\d\d:\d\d:\d\d\s+/01:01:01 /mg;
+
+ # pid in debug lines
+ s/^(\d\d:\d\d:\d\d\s+)(\d+)/$1 . new_value($2, "p%s", \$next_pid) . " "/mgxe;
+ s/(?<!post-)[Pp]rocess\K(\s\d+ )/new_value($1, "p%s", \$next_pid) . " "/gxe;
+
+ # Path in environment varies
+ s/ PATH=\K.*$/<munged>/;
+