diff options
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/inject_emails.sh | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/tests/inject_emails.sh b/tests/inject_emails.sh index 1b1f5c7..a021170 100755 --- a/tests/inject_emails.sh +++ b/tests/inject_emails.sh @@ -1,12 +1,15 @@ #!/bin/sh -cd $(dirname $0) +SCRIPT=$0 +USER=$1 +SUBFOLDER=$2 +cd $(dirname $SCRIPT) function mail_lmtp_session ( echo -e "LHLO localhost\r" - for mail in $(find emails -name '*.eml'); do + for mail in $(find emails/$SUBFOLDER -name '*.eml' ); do echo -e "MAIL FROM: <alex@adnab.me>\r" - echo -e "RCPT TO: <lx@staging.deuxfleurs.org>\r" + echo -e "RCPT TO: $USER\r" echo -e "DATA\r" cat $mail echo -e "\r" |