maxmailsize0 \
normal_email \
delheaders \
+ delheaders_extras \
customheaders \
customheaders_blanks \
customheaders_with_subst \
atf_check -o file:expected-1.txt sed -e "/^Message-ID:/d; /^Date:/d;" mail-1.txt
}
+delheaders_extras_body()
+{
+ atf_check $top_builddir/tests/fakesmtpd
+ trap kill_fakesmtp EXIT TERM
+ init_ml list
+ rmdir list/text
+ ln -s ${top_srcdir}/listtexts/en list/text
+ echo test@mlmmjtest > list/control/listaddress
+ echo "25678" > list/control/smtpport
+ echo "heloname" > list/control/smtphelo
+ printf "X-k3\nx-h1\nx-L\n\n\n \n\t\nplop\nNope\n" > list/control/delheaders
+
+ printf "user@test\nuser2@test" > list/subscribers.d/u
+cat > first <<EOF
+From: bob@test
+To: test@mlmmjtest
+X-L4: plop
+X-K3: plop
+X-H2: plop
+X-H1: plop
+Received: from test.com ( mail.test.com [192.168.168.1])
+ by 192.168.168.168 with ESMTP id 0A21C400643
+ for <test@mlmmjtest>; Sat, 10 May 2025 17:17:17 +0000 (UTC)
+Received: from int.test.com ( mail.int.test.com [10.0.0.1])
+ by 192.168.168.1 with ESMTP id 0A41D900249
+ for <test@mlmmjtest>; Sat, 10 May 2025 17:16:17 +0000 (UTC)
+Return-path: bob@test
+Subject: yeah
+
+Let's go, first email
+EOF
+
+ atf_check -s exit:0 $mlmmjreceive -L list -F <first
+ cat >> expected-1.txt <<EOF
+EHLO heloname\r
+MAIL FROM:<test+bounces-1-user=test@mlmmjtest>\r
+RCPT TO:<user@test>\r
+DATA\r
+From: bob@test\r
+To: test@mlmmjtest\r
+X-H2: plop\r
+Received: from test.com ( mail.test.com [192.168.168.1])\r
+ by 192.168.168.168 with ESMTP id 0A21C400643\r
+ for <test@mlmmjtest>; Sat, 10 May 2025 17:17:17 +0000 (UTC)\r
+Received: from int.test.com ( mail.int.test.com [10.0.0.1])\r
+ by 192.168.168.1 with ESMTP id 0A41D900249\r
+ for <test@mlmmjtest>; Sat, 10 May 2025 17:16:17 +0000 (UTC)\r
+Subject: yeah\r
+\r
+Let's go, first email\r
+\r
+.\r
+MAIL FROM:<test+bounces-1-user2=test@mlmmjtest>\r
+RCPT TO:<user2@test>\r
+DATA\r
+From: bob@test\r
+To: test@mlmmjtest\r
+X-H2: plop\r
+Received: from test.com ( mail.test.com [192.168.168.1])\r
+ by 192.168.168.168 with ESMTP id 0A21C400643\r
+ for <test@mlmmjtest>; Sat, 10 May 2025 17:17:17 +0000 (UTC)\r
+Received: from int.test.com ( mail.int.test.com [10.0.0.1])\r
+ by 192.168.168.1 with ESMTP id 0A41D900249\r
+ for <test@mlmmjtest>; Sat, 10 May 2025 17:16:17 +0000 (UTC)\r
+Subject: yeah\r
+\r
+Let's go, first email\r
+\r
+.\r
+QUIT\r
+EOF
+ atf_check -o file:expected-1.txt sed -e "/^Message-ID:/d; /^Date:/d;" mail-1.txt
+}
+
customheaders_body()
{
atf_check $top_builddir/tests/fakesmtpd