aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2022-07-15 16:15:48 +0200
committerAlex Auvolat <alex@adnab.me>2022-07-15 16:15:48 +0200
commit24c6607304323f0dd3c70bf952bfc5775735ca70 (patch)
tree824cd15d393d38f69f8d4fd8cfb5fa7921ee69ee /tests
parent64a322b4cb11a73c2da5f1a44649384a16b3ee2b (diff)
downloadaerogramme-24c6607304323f0dd3c70bf952bfc5775735ca70.tar.gz
aerogramme-24c6607304323f0dd3c70bf952bfc5775735ca70.zip
Some more FETCH things work
Diffstat (limited to 'tests')
-rwxr-xr-xtests/inject_emails.sh18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/inject_emails.sh b/tests/inject_emails.sh
new file mode 100755
index 0000000..1b1f5c7
--- /dev/null
+++ b/tests/inject_emails.sh
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+cd $(dirname $0)
+
+function mail_lmtp_session (
+ echo -e "LHLO localhost\r"
+ for mail in $(find emails -name '*.eml'); do
+ echo -e "MAIL FROM: <alex@adnab.me>\r"
+ echo -e "RCPT TO: <lx@staging.deuxfleurs.org>\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)