diff options
author | Lars Wirzenius <liw@liw.fi> | 2014-07-25 21:38:29 +0300 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2014-07-25 21:38:29 +0300 |
commit | 819f0cb22b5acce77ea8d4f9318da098e6097bee (patch) | |
tree | bd118ed304022d47330a4eab22bd706ae3f990ca /yarns | |
parent | 8432d6b54589070b1f8b481c4728659e4d119c84 (diff) | |
download | distix-819f0cb22b5acce77ea8d4f9318da098e6097bee.tar.gz |
Add 'distix import-mail'
Diffstat (limited to 'yarns')
-rw-r--r-- | yarns/080-import-mail.yarn | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/yarns/080-import-mail.yarn b/yarns/080-import-mail.yarn new file mode 100644 index 0000000..84c58f6 --- /dev/null +++ b/yarns/080-import-mail.yarn @@ -0,0 +1,26 @@ +Importing e-mails +================= + +Distix needs to import e-mails. E-mails be fed to it one-by-one by a +mail transport agent, or in mail folders by the user. In the latter, +especially, distix needs to be careful about handling mails that have +already been imported once. + +Let's start with the simple case of importing a single e-mail. Mail +transport agents will feed the e-mail to distix via a pipe, so distix +will read the e-mail from its standard input. + + SCENARIO import one email + + WHEN user attempts to run distix init REPO + THEN attempt succeeded + + GIVEN file MAIL1 containing "From: foo@example.com\nSubject: bar\n\nyo\n" + WHEN user attempts to run distix import-mail REPO MAIL1 + THEN attempt succeeded + AND everything in REPO is committed to git + + WHEN user changes working directory to REPO + AND user attempts to run distix list + THEN attempt succeeded + AND output matches "^[0-9a-f]{32} bar$" |