From ccc9b6abb66ebda0b91b4e21f8ec2fb2e87390f7 Mon Sep 17 00:00:00 2001 From: Quentin Dufour Date: Wed, 27 Dec 2023 18:33:06 +0100 Subject: add a --dev mode --- tests/instrumentation/inject_emails.sh | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100755 tests/instrumentation/inject_emails.sh (limited to 'tests/instrumentation/inject_emails.sh') diff --git a/tests/instrumentation/inject_emails.sh b/tests/instrumentation/inject_emails.sh new file mode 100755 index 0000000..a021170 --- /dev/null +++ b/tests/instrumentation/inject_emails.sh @@ -0,0 +1,21 @@ +#!/bin/sh + +SCRIPT=$0 +USER=$1 +SUBFOLDER=$2 +cd $(dirname $SCRIPT) + +function mail_lmtp_session ( + echo -e "LHLO localhost\r" + for mail in $(find emails/$SUBFOLDER -name '*.eml' ); do + echo -e "MAIL FROM: \r" + echo -e "RCPT TO: $USER\r" + echo -e "DATA\r" + cat $mail + echo -e "\r" + echo -e ".\r" + done + echo -e "QUIT\r" +) + +mail_lmtp_session | tee >(nc localhost 12024) -- cgit v1.2.3