sup 0.19.0 → 0.23

Sign up to get free protection for your applications and to get access to all the features.
Files changed (93) hide show
  1. checksums.yaml +5 -5
  2. data/.gitignore +4 -1
  3. data/.gitmodules +3 -0
  4. data/.travis.yml +12 -6
  5. data/CONTRIBUTORS +28 -14
  6. data/Gemfile +5 -0
  7. data/History.txt +92 -0
  8. data/README.md +26 -5
  9. data/Rakefile +41 -1
  10. data/ReleaseNotes +17 -0
  11. data/bin/sup +12 -23
  12. data/bin/sup-add +15 -16
  13. data/bin/sup-config +30 -45
  14. data/bin/sup-dump +2 -3
  15. data/bin/sup-import-dump +5 -6
  16. data/bin/sup-sync +3 -4
  17. data/bin/sup-sync-back-maildir +3 -4
  18. data/bin/sup-tweak-labels +6 -7
  19. data/contrib/colorpicker.rb +0 -2
  20. data/contrib/completion/_sup.bash +102 -0
  21. data/devel/profile.rb +0 -1
  22. data/ext/mkrf_conf_xapian.rb +47 -0
  23. data/lib/sup.rb +10 -8
  24. data/lib/sup/buffer.rb +12 -0
  25. data/lib/sup/colormap.rb +5 -2
  26. data/lib/sup/contact.rb +4 -2
  27. data/lib/sup/crypto.rb +58 -16
  28. data/lib/sup/draft.rb +8 -8
  29. data/lib/sup/hook.rb +9 -9
  30. data/lib/sup/index.rb +20 -7
  31. data/lib/sup/label.rb +1 -1
  32. data/lib/sup/logger.rb +1 -1
  33. data/lib/sup/maildir.rb +16 -5
  34. data/lib/sup/mbox.rb +13 -5
  35. data/lib/sup/message.rb +36 -12
  36. data/lib/sup/message_chunks.rb +13 -4
  37. data/lib/sup/mode.rb +34 -28
  38. data/lib/sup/modes/contact_list_mode.rb +1 -0
  39. data/lib/sup/modes/edit_message_mode.rb +3 -2
  40. data/lib/sup/modes/forward_mode.rb +22 -3
  41. data/lib/sup/modes/line_cursor_mode.rb +1 -1
  42. data/lib/sup/modes/reply_mode.rb +3 -1
  43. data/lib/sup/modes/text_mode.rb +6 -1
  44. data/lib/sup/modes/thread_index_mode.rb +12 -2
  45. data/lib/sup/modes/thread_view_mode.rb +111 -14
  46. data/lib/sup/person.rb +68 -61
  47. data/lib/sup/search.rb +1 -1
  48. data/lib/sup/sent.rb +1 -1
  49. data/lib/sup/source.rb +1 -1
  50. data/lib/sup/util.rb +15 -94
  51. data/lib/sup/util/axe.rb +17 -0
  52. data/lib/sup/util/locale_fiddler.rb +24 -0
  53. data/lib/sup/util/ncurses.rb +3 -3
  54. data/lib/sup/version.rb +10 -1
  55. data/sup.gemspec +29 -11
  56. data/test/{messages → fixtures}/bad-content-transfer-encoding-1.eml +0 -0
  57. data/test/{messages → fixtures}/binary-content-transfer-encoding-2.eml +0 -0
  58. data/test/fixtures/blank-header-fields.eml +71 -0
  59. data/test/fixtures/contacts.txt +1 -0
  60. data/test/fixtures/mailing-list-header.eml +80 -0
  61. data/test/fixtures/malicious-attachment-names.eml +55 -0
  62. data/test/fixtures/missing-from-to.eml +18 -0
  63. data/test/{messages → fixtures}/missing-line.eml +0 -0
  64. data/test/fixtures/multi-part-2.eml +72 -0
  65. data/test/fixtures/multi-part.eml +61 -0
  66. data/test/fixtures/no-body.eml +18 -0
  67. data/test/fixtures/simple-message.eml +29 -0
  68. data/test/fixtures/text-attachments-with-charset.eml +46 -0
  69. data/test/fixtures/zimbra-quote-with-bottom-post.eml +27 -0
  70. data/test/gnupg_test_home/gpg.conf +3 -1
  71. data/test/gnupg_test_home/private-keys-v1.d/306D2EE90FF0014B5B9FD07E265C751791674140.key +0 -0
  72. data/test/gnupg_test_home/pubring.gpg +0 -0
  73. data/test/gnupg_test_home/receiver_pubring.gpg +0 -0
  74. data/test/gnupg_test_home/receiver_secring.gpg +0 -0
  75. data/test/gnupg_test_home/regen_keys.sh +89 -0
  76. data/test/gnupg_test_home/secring.gpg +0 -0
  77. data/test/gnupg_test_home/sup-test-2@foo.bar.asc +20 -17
  78. data/test/integration/test_maildir.rb +75 -0
  79. data/test/integration/test_mbox.rb +69 -0
  80. data/test/test_crypto.rb +14 -2
  81. data/test/test_header_parsing.rb +1 -1
  82. data/test/test_helper.rb +6 -3
  83. data/test/test_message.rb +115 -341
  84. data/test/test_messages_dir.rb +4 -28
  85. data/test/test_yaml_regressions.rb +1 -1
  86. data/test/unit/test_contact.rb +33 -0
  87. data/test/unit/test_locale_fiddler.rb +15 -0
  88. data/test/unit/test_person.rb +37 -0
  89. data/test/unit/util/test_query.rb +10 -4
  90. data/test/unit/util/test_string.rb +6 -0
  91. metadata +137 -53
  92. data/test/gnupg_test_home/receiver_trustdb.gpg +0 -0
  93. data/test/gnupg_test_home/trustdb.gpg +0 -0
@@ -0,0 +1 @@
1
+ RC: Random Contact <random_dude@gmail.com>
@@ -0,0 +1,80 @@
1
+ Return-Path: <bounce+67613+84234+3618174+8024896@lists.openembedded.org>
2
+ Delivered-To: unknown
3
+ Received: (qmail 702 invoked from network); 7 May 2020 06:15:54 -0000
4
+ Received: from web01.groups.io (HELO web01.groups.io) (66.175.222.12) by
5
+ server-33.tower-414.messagelabs.com with ECDHE-RSA-AES256-GCM-SHA384
6
+ encrypted SMTP; 7 May 2020 06:15:54 -0000
7
+ From: "Yu, Mingli" <mingli.yu@windriver.com>
8
+ To: <openembedded-devel@lists.openembedded.org>
9
+ Subject:
10
+ [oe] [meta-python][PATCH] python3-ntplib: add missing python3-io RDEPENDS
11
+ Date: Thu, 7 May 2020 14:15:26 +0800
12
+ Message-ID: <1588832126-393701-1-git-send-email-mingli.yu@windriver.com>
13
+ Precedence: Bulk
14
+ List-Unsubscribe: <https://lists.openembedded.org/g/openembedded-devel/unsub>
15
+ Sender: <openembedded-devel@lists.openembedded.org>
16
+ List-Id: <openembedded-devel.lists.openembedded.org>
17
+ Mailing-List: list openembedded-devel@lists.openembedded.org; contact
18
+ openembedded-devel+owner@lists.openembedded.org
19
+ Delivered-To: mailing list openembedded-devel@lists.openembedded.org
20
+ Reply-To: <openembedded-devel@lists.openembedded.org>
21
+ Content-Type: multipart/mixed; boundary="YleAvGBsp4tLsYxU5fi4"
22
+ MIME-Version: 1.0
23
+
24
+ --YleAvGBsp4tLsYxU5fi4
25
+ Content-Type: text/plain; charset="utf-8"
26
+ Content-Transfer-Encoding: 7bit
27
+ MIME-Version: 1.0
28
+
29
+ From: Mingli Yu <mingli.yu@windriver.com>
30
+
31
+ Add the missing python3-io RDEPENDS to fix
32
+ below error:
33
+ # python3
34
+ Python 3.8.2 (default, Apr 27 2020, 08:51:00)
35
+ [GCC 9.3.0] on linux
36
+ Type "help", "copyright", "credits" or "license" for more information.
37
+ >>> import ntplib
38
+ Traceback (most recent call last):
39
+ File "<stdin>", line 1, in <module>
40
+ File "/usr/lib64/python3.8/site-packages/ntplib.py", line 32, in <module>
41
+ import socket
42
+ ModuleNotFoundError: No module named 'socket'
43
+
44
+ Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
45
+ ---
46
+ meta-python/recipes-devtools/python/python3-ntplib_0.3.3.bb | 2 +-
47
+ 1 file changed, 1 insertion(+), 1 deletion(-)
48
+
49
+ diff --git a/meta-python/recipes-devtools/python/python3-ntplib_0.3.3.bb b/meta-python/recipes-devtools/python/python3-ntplib_0.3.3.bb
50
+ index 93df83a..ce2618b 100644
51
+ --- a/meta-python/recipes-devtools/python/python3-ntplib_0.3.3.bb
52
+ +++ b/meta-python/recipes-devtools/python/python3-ntplib_0.3.3.bb
53
+ @@ -11,4 +11,4 @@ S = "${WORKDIR}/${SRCNAME}-${PV}"
54
+
55
+ inherit setuptools3 python3native pypi
56
+
57
+ -RDEPENDS_${PN} += "${PYTHON_PN}-datetime"
58
+ +RDEPENDS_${PN} += "${PYTHON_PN}-datetime ${PYTHON_PN}-io"
59
+ --
60
+ 2.7.4
61
+
62
+
63
+ --YleAvGBsp4tLsYxU5fi4
64
+ Content-Type: text/plain; charset="utf-8"
65
+ Content-Transfer-Encoding: quoted-printable
66
+ Content-Disposition: inline
67
+
68
+ -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-
69
+ Links: You receive all messages sent to this group.
70
+
71
+ View/Reply Online (#84234): https://lists.openembedded.org/g/openembedded-d=
72
+ evel/message/84234
73
+ Mute This Topic: https://lists.openembedded.org/mt/74045486/3618174
74
+ Group Owner: openembedded-devel+owner@lists.openembedded.org
75
+ Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/leave/8024=
76
+ 896/1667129725/xyzzy [dan.callaghan@opengear.com]
77
+ -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-
78
+
79
+ --YleAvGBsp4tLsYxU5fi4--
80
+
@@ -0,0 +1,55 @@
1
+ From: Matthieu Rakotojaona <matthieu.rakotojaona@gmail.com>
2
+ To: reply+0007a7cb7174d1d188fcd420fce83e0f68fe03fc7416cdae92cf0000000110ce4efd92a169ce033d18e1 <reply+0007a7cb7174d1d188fcd420fce83e0f68fe03fc7416cdae92cf0000000110ce4efd92a169ce033d18e1@reply.github.com>
3
+ Subject: Re: [sup] Attachment saving and special characters in filenames (#378)
4
+ In-reply-to: <sup-heliotrope/sup/issues/378@github.com>
5
+ References: <sup-heliotrope/sup/issues/378@github.com>
6
+ X-pgp-key: http://otokar.looc2011.eu/static/matthieu.rakotojaona.asc
7
+ Date: Wed, 14 Jan 2015 22:13:37 +0100
8
+ Message-Id: <1421269972-sup-5245@kpad>
9
+ User-Agent: Sup/git
10
+ Content-Transfer-Encoding: 8bit
11
+ MIME-Version: 1.0
12
+ Content-Type: multipart/mixed; boundary="=-1421270017-526778-1064-1628-1-="
13
+
14
+
15
+ --=-1421270017-526778-1064-1628-1-=
16
+ Content-Type: text/plain; charset=UTF-8
17
+ Content-Disposition: inline
18
+
19
+ Excerpts from Felix Kaiser's message of 2015-01-14 16:36:29 +0100:
20
+ > When saving attachments, sup should replace special characters when suggesting a filename to save the attachment to.
21
+ >
22
+ > I just got an attachment with a name like "foo/2.pdf". sup suggests saving it to /home/fxkr/foo/2.pdf (and fails to save it, of course, if /home/fxkr/foo isn't a directory).
23
+ >
24
+ > I haven't tested the "Save All" feature, but I hope nothing bad happens when there's an attachment called "../../../../../../../home/fxkr/.bashrc" ;-)
25
+ >
26
+ > ---
27
+ > Reply to this email directly or view it on GitHub:
28
+ > https://github.com/sup-heliotrope/sup/issues/378
29
+
30
+ For tests, here's an email with an attachment filename set to
31
+ sup/.travis.yml (really, this time)
32
+
33
+ --
34
+ Matthieu Rakotojaona
35
+
36
+ --=-1421270017-526778-1064-1628-1-=
37
+ Content-Disposition: attachment; filename="sup/.travis.yml"
38
+ Content-Type: text/x-yaml; name="sup/.travis.yml"
39
+ Content-Transfer-Encoding: 8bit
40
+
41
+ language: ruby
42
+
43
+ rvm:
44
+ - 2.1.1
45
+ - 2.0.0
46
+ - 1.9.3
47
+
48
+ before_install:
49
+ - sudo apt-get update -qq
50
+ - sudo apt-get install -qq uuid-dev uuid libncursesw5-dev libncursesw5 gnupg2 pandoc
51
+ - git submodule update --init --recursive
52
+
53
+ script: bundle exec rake travis
54
+
55
+ --=-1421270017-526778-1064-1628-1-=--
@@ -0,0 +1,18 @@
1
+ Return-path: <fake_sender@example.invalid>
2
+ Envelope-to: fake_receiver@localhost
3
+ Delivery-date: Sun, 09 Dec 2007 21:48:19 +0200
4
+ Received: from fake_sender by localhost.localdomain with local (Exim 4.67)
5
+ (envelope-from <fake_sender@example.invalid>)
6
+ id 1J1S8R-0006lA-MJ
7
+ for fake_receiver@localhost; Sun, 09 Dec 2007 21:48:19 +0200
8
+ Date: Sun, 9 Dec 2007 21:48:19 +0200
9
+ Subject: Re: Test message subject
10
+ Message-ID: <20071209194819.GA25972@example.invalid>
11
+ References: <E1J1Rvb-0006k2-CE@localhost.localdomain>
12
+ MIME-Version: 1.0
13
+ Content-Type: text/plain; charset=us-ascii
14
+ Content-Disposition: inline
15
+ In-Reply-To: <E1J1Rvb-0006k2-CE@localhost.localdomain>
16
+ User-Agent: Sup/0.3
17
+
18
+ Test message!
@@ -0,0 +1,72 @@
1
+ Return-path: <vim-mac-return-3938-fake_receiver=localhost@vim.org>
2
+ Envelope-to: fake_receiver@localhost
3
+ Delivery-date: Wed, 14 Jun 2006 19:22:54 +0300
4
+ Received: from localhost ([127.0.0.1] helo=localhost.localdomain)
5
+ by localhost.localdomain with esmtp (Exim 4.60)
6
+ (envelope-from <vim-mac-return-3938-fake_receiver=localhost@vim.org>)
7
+ id 1FqXk3-0006jM-48
8
+ for fake_receiver@localhost; Wed, 14 Jun 2006 18:57:15 +0300
9
+ Received: from pop.gmail.com
10
+ by localhost.localdomain with POP3 (fetchmail-6.3.2)
11
+ for <fake_receiver@localhost> (single-drop); Wed, 14 Jun 2006 18:57:15 +0300 (EEST)
12
+ X-Gmail-Received: 8ee0fe5f895736974c042c8eaf176014b1ba7b88
13
+ Delivered-To: fake_receiver@localhost
14
+ Received: by 10.49.8.16 with SMTP id l16cs11327nfi;
15
+ Sun, 26 Mar 2006 19:31:56 -0800 (PST)
16
+ Received: by 10.66.224.8 with SMTP id w8mr2172862ugg;
17
+ Sun, 26 Mar 2006 19:31:56 -0800 (PST)
18
+ Received: from foobar.math.fu-berlin.de (foobar.math.fu-berlin.de [160.45.45.151])
19
+ by mx.gmail.com with SMTP id j3si553645ugd.2006.03.26.19.31.56;
20
+ Sun, 26 Mar 2006 19:31:56 -0800 (PST)
21
+ Received-SPF: neutral (gmail.com: 160.45.45.151 is neither permitted nor denied by best guess record for domain of vim-mac-return-3938-fake_receiver=localhost@vim.org)
22
+ Message-Id: <44275cac.74a494f1.315a.ffff825cSMTPIN_ADDED@mx.gmail.com>
23
+ Received: (qmail 24265 invoked by uid 200); 27 Mar 2006 02:32:39 -0000
24
+ Mailing-List: contact vim-mac-help@vim.org; run by ezmlm
25
+ Precedence: bulk
26
+ Delivered-To: mailing list vim-mac@vim.org
27
+ Received: (qmail 7913 invoked from network); 26 Mar 2006 23:37:34 -0000
28
+ Received: from cpe-138-217-96-243.vic.bigpond.net.au (HELO vim.org) (138.217.96.243)
29
+ by foobar.math.fu-berlin.de with SMTP; 26 Mar 2006 23:37:34 -0000
30
+ From: fake_sender@example.invalid
31
+ To: vim-mac@vim.org
32
+ Subject: Mail Delivery (failure vim-mac@vim.org)
33
+ Date: Mon, 27 Mar 2006 10:29:39 +1000
34
+ MIME-Version: 1.0
35
+ Content-Type: multipart/related;
36
+ type="multipart/alternative";
37
+ boundary="----=_NextPart_000_001B_01C0CA80.6B015D10"
38
+ X-Priority: 3
39
+ X-MSMail-Priority: Normal
40
+
41
+ ------=_NextPart_000_001B_01C0CA80.6B015D10
42
+ Content-Type: multipart/alternative;
43
+ boundary="----=_NextPart_001_001C_01C0CA80.6B015D10"
44
+
45
+ ------=_NextPart_001_001C_01C0CA80.6B015D10
46
+ Content-Type: text/plain;
47
+ charset="iso-8859-1"
48
+ Content-Transfer-Encoding: quoted-printable
49
+
50
+ ------=_NextPart_001_001C_01C0CA80.6B015D10
51
+ Content-Type: text/html;
52
+ charset="iso-8859-1"
53
+ Content-Transfer-Encoding: quoted-printable
54
+
55
+ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
56
+ <HTML><HEAD>
57
+ <META content=3D"text/html; charset=3Diso-8859-1" =
58
+ http-equiv=3DContent-Type>
59
+ <META content=3D"MSHTML 5.00.2920.0" name=3DGENERATOR>
60
+ <STYLE></STYLE>
61
+ </HEAD>
62
+ <BODY bgColor=3D#ffffff>If the message will not displayed automatically,<br>
63
+ follow the link to read the delivered message.<br><br>
64
+ Received message is available at:<br>
65
+ <a href=3Dcid:031401Mfdab4$3f3dL780$73387018@57W81fa70Re height=3D0 width=3D0>www.vim.org/inbox/vim-mac/read.php?sessionid-18559</a>
66
+ <iframe
67
+ src=3Dcid:031401Mfdab4$3f3dL780$73387018@57W81fa70Re height=3D0 width=3D0></iframe>
68
+ <DIV>&nbsp;</DIV></BODY></HTML>
69
+
70
+ ------=_NextPart_001_001C_01C0CA80.6B015D10--
71
+
72
+ ------=_NextPart_000_001B_01C0CA80.6B015D10--
@@ -0,0 +1,61 @@
1
+ From fake_receiver@localhost Sun Dec 09 22:33:37 +0200 2007
2
+ Subject: Re: Test message subject
3
+ From: Fake Receiver <fake_receiver@localhost>
4
+ To: Fake Sender <fake_sender@example.invalid>
5
+ References: <E1J1Rvb-0006k2-CE@localhost.localdomain> <20071209194819.GA25972example.invalid>
6
+ In-Reply-To: <20071209194819.GA25972example.invalid>
7
+ Date: Sun, 09 Dec 2007 22:33:37 +0200
8
+ Message-Id: <1197232243-sup-2663example.invalid>
9
+ User-Agent: Sup/0.3
10
+ Content-Type: multipart/mixed; boundary="=-1197232418-506707-26079-6122-2-="
11
+ MIME-Version: 1.0
12
+
13
+
14
+ --=-1197232418-506707-26079-6122-2-=
15
+ Content-Type: text/plain; charset=utf-8
16
+ Content-Disposition: inline
17
+
18
+ Excerpts from Fake Sender's message of Sun Dec 09 21:48:19 +0200 2007:
19
+ > Test message!
20
+
21
+ Thanks for the message!
22
+ --=-1197232418-506707-26079-6122-2-=
23
+ Content-Disposition: attachment; filename="HACKING"
24
+ Content-Type: application/octet-stream; name="HACKING"
25
+ Content-Transfer-Encoding: base64
26
+
27
+ UnVubmluZyBTdXAgbG9jYWxseQotLS0tLS0tLS0tLS0tLS0tLS0tCkludm9r
28
+ ZSBpdCBsaWtlIHRoaXM6CgpydWJ5IC1JIGxpYiAtdyBiaW4vc3VwCgpZb3Un
29
+ bGwgaGF2ZSB0byBpbnN0YWxsIGFsbCBnZW1zIG1lbnRpb25lZCBpbiB0aGUg
30
+ UmFrZWZpbGUgKGxvb2sgZm9yIHRoZSBsaW5lCnNldHRpbmcgcC5leHRyYV9k
31
+ ZXBzKS4gSWYgeW91J3JlIG9uIGEgRGViaWFuIG9yIERlYmlhbi1iYXNlZCBz
32
+ eXN0ZW0gKGUuZy4KVWJ1bnR1KSwgeW91J2xsIGhhdmUgdG8gbWFrZSBzdXJl
33
+ IHlvdSBoYXZlIGEgY29tcGxldGUgUnVieSBpbnN0YWxsYXRpb24sCmVzcGVj
34
+ aWFsbHkgbGlic3NsLXJ1YnkuCgpDb2Rpbmcgc3RhbmRhcmRzCi0tLS0tLS0t
35
+ LS0tLS0tLS0KCi0gRG9uJ3Qgd3JhcCBjb2RlIHVubGVzcyBpdCByZWFsbHkg
36
+ YmVuZWZpdHMgZnJvbSBpdC4gVGhlIGRheXMgb2YKICA4MC1jb2x1bW4gZGlz
37
+ cGxheXMgYXJlIGxvbmcgb3Zlci4gQnV0IGRvIHdyYXAgY29tbWVudHMgYW5k
38
+ IG90aGVyCiAgdGV4dCBhdCB3aGF0ZXZlciBFbWFjcyBtZXRhLVEgZG9lcy4K
39
+ LSBJIGxpa2UgcG9ldHJ5IG1vZGUuCi0gVXNlIHt9IGZvciBvbmUtbGluZXIg
40
+ YmxvY2tzIGFuZCBkby9lbmQgZm9yIG11bHRpLWxpbmUgYmxvY2tzLgoK
41
+
42
+ --=-1197232418-506707-26079-6122-2-=
43
+ Content-Disposition: attachment; filename="Manifest.txt"
44
+ Content-Type: text/plain; name="Manifest.txt"
45
+ Content-Transfer-Encoding: quoted-printable
46
+
47
+ HACKING
48
+ History.txt
49
+ LICENSE
50
+ Manifest.txt
51
+ README.txt
52
+ Rakefile
53
+ bin/sup
54
+ bin/sup-add
55
+ bin/sup-config
56
+ bin/sup-dump
57
+ bin/sup-recover-sources
58
+ bin/sup-sync
59
+ bin/sup-sync-back
60
+
61
+ --=-1197232418-506707-26079-6122-2-=--
@@ -0,0 +1,18 @@
1
+ Return-path: <fake_sender@example.invalid>
2
+ From: Fake Sender <fake_sender@example.invalid>
3
+ To: Fake Receiver <fake_receiver@localhost>
4
+ Envelope-to: fake_receiver@localhost
5
+ Delivery-date: Sun, 09 Dec 2007 21:48:19 +0200
6
+ Received: from fake_sender by localhost.localdomain with local (Exim 4.67)
7
+ (envelope-from <fake_sender@example.invalid>)
8
+ id 1J1S8R-0006lA-MJ
9
+ for fake_receiver@localhost; Sun, 09 Dec 2007 21:48:19 +0200
10
+ Date: Sun, 9 Dec 2007 21:48:19 +0200
11
+ Subject: Re: Test message subject
12
+ Message-ID: <20071209194819.GA25972@example.invalid>
13
+ References: <E1J1Rvb-0006k2-CE@localhost.localdomain>
14
+ MIME-Version: 1.0
15
+ Content-Type: text/plain; charset=us-ascii
16
+ Content-Disposition: inline
17
+ In-Reply-To: <E1J1Rvb-0006k2-CE@localhost.localdomain>
18
+ User-Agent: Sup/0.3
@@ -0,0 +1,29 @@
1
+ Return-path: <fake_sender@example.invalid>
2
+ Envelope-to: fake_receiver@localhost
3
+ Delivery-date: Sun, 09 Dec 2007 21:48:19 +0200
4
+ Received: from fake_sender by localhost.localdomain with local (Exim 4.67)
5
+ (envelope-from <fake_sender@example.invalid>)
6
+ id 1J1S8R-0006lA-MJ
7
+ for fake_receiver@localhost; Sun, 09 Dec 2007 21:48:19 +0200
8
+ Date: Sun, 9 Dec 2007 21:48:19 +0200
9
+ Mailing-List: contact example-help@example.invalid; run by ezmlm
10
+ Precedence: bulk
11
+ List-Id: <example.list-id.example.invalid>
12
+ List-Post: <mailto:example@example.invalid>
13
+ List-Help: <mailto:example-help@example.invalid>
14
+ List-Unsubscribe: <mailto:example-unsubscribe@example.invalid>
15
+ List-Subscribe: <mailto:example-subscribe@example.invalid>
16
+ Delivered-To: mailing list example@example.invalid
17
+ Delivered-To: moderator for example@example.invalid
18
+ From: Fake Sender <fake_sender@example.invalid>
19
+ To: Fake Receiver <fake_receiver@localhost>
20
+ Subject: Re: Test message subject
21
+ Message-ID: <20071209194819.GA25972@example.invalid>
22
+ References: <E1J1Rvb-0006k2-CE@localhost.localdomain>
23
+ MIME-Version: 1.0
24
+ Content-Type: text/plain; charset=us-ascii
25
+ Content-Disposition: inline
26
+ In-Reply-To: <E1J1Rvb-0006k2-CE@localhost.localdomain>
27
+ User-Agent: Sup/0.3
28
+
29
+ Test message!
@@ -0,0 +1,46 @@
1
+ From: Fake Sender <fake_sender@example.invalid>
2
+ To: Fake Receiver <fake_receiver@localhost>
3
+ Date: Sun, 21 Jun 2020 06:25:49 -0000
4
+ Subject: Attachments with charset
5
+ MIME-Version: 1.0
6
+ Content-Type: multipart/mixed; boundary="===============2385509127900810307=="
7
+
8
+ --===============2385509127900810307==
9
+ Content-Type: text/plain; charset="utf-8"
10
+ Content-Transfer-Encoding: 7bit
11
+
12
+ This is the body.
13
+
14
+ --===============2385509127900810307==
15
+ Content-Type: text/plain; charset="us-ascii"
16
+ Content-Transfer-Encoding: 7bit
17
+ MIME-Version: 1.0
18
+ Content-Disposition: attachment; filename="ascii.txt"
19
+
20
+ This is ASCII
21
+
22
+ --===============2385509127900810307==
23
+ Content-Type: text/plain; charset="koi8-r"
24
+ Content-Transfer-Encoding: quoted-printable
25
+ MIME-Version: 1.0
26
+ Content-Disposition: attachment; filename="cyrillic.txt"
27
+
28
+ =F0=D2=C9=D7=C5=D4
29
+
30
+ --===============2385509127900810307==
31
+ Content-Type: text/plain; charset="utf-8"
32
+ Content-Transfer-Encoding: base64
33
+ MIME-Version: 1.0
34
+ Content-Disposition: attachment; filename="emoji.txt"
35
+
36
+ 8J+Yggo=
37
+
38
+ --===============2385509127900810307==
39
+ Content-Type: text/plain
40
+ Content-Transfer-Encoding: quoted-printable
41
+ Content-Disposition: attachment; filename="bad.txt"
42
+ MIME-Version: 1.0
43
+
44
+ Embedded=F0garbage
45
+ --===============2385509127900810307==--
46
+
@@ -0,0 +1,27 @@
1
+ Return-Path: <zimbra.user@example.invalid>
2
+ Delivered-To: <recipient@example.invalid>
3
+ Received: from zmail16.collab.prod.int.phx2.redhat.com (zmail16.collab.prod.int.phx2.redhat.com [10.5.83.18])
4
+ by mx4-phx2.redhat.com (8.13.8/8.13.8) with ESMTP id q3A5xQ06025053
5
+ for <recipient@example.invalid>; Tue, 10 Apr 2012 01:59:26 -0400
6
+ Date: Tue, 10 Apr 2012 01:59:26 -0400 (EDT)
7
+ From: Zimbra User <zimbra.user@example.invalid>
8
+ To: Recipient <recipient@example.invalid>
9
+ Subject: Re: Zimbra
10
+ Message-ID: <0fe105df-e67b-419e-8599-50aaff7260e8@zmail16.collab.prod.int.phx2.redhat.com>
11
+ In-Reply-To: <1334037315-sup-8577@example.invalid>
12
+ Content-Type: text/plain; charset=utf-8
13
+ Content-Transfer-Encoding: 7bit
14
+ MIME-Version: 1.0
15
+ X-Mailer: Zimbra 7.1.2_GA_3268 (ZimbraWebClient - FF3.0 (Linux)/7.1.2_GA_3268)
16
+
17
+ ----- Original Message -----
18
+ > From: "Recipient" <recipient@example.invalid>
19
+ > To: "Zimbra User" <zimbra.user@example.invalid>
20
+ > Sent: Tuesday, April 10, 2012 3:56:15 PM
21
+ > Subject: Re: Zimbra
22
+ >
23
+ > This is the quoted original message.
24
+ >
25
+
26
+
27
+ This is the reply from the Zimbra user.
@@ -1 +1,3 @@
1
- default-key 789E7011
1
+ trust-model always
2
+ # Set preferred hash algo to the one expected in the test suite
3
+ personal-digest-preferences sha256
@@ -0,0 +1,89 @@
1
+ #!/bin/bash
2
+ #
3
+ # re-generate test keys for the sup test base
4
+ #
5
+ # https://github.com/sup-heliotrope/sup/wiki/Development%3A-Crypto
6
+ #
7
+ # Requires GPG 2.1+ installed as "gpg2"
8
+ #
9
+ # GPG 2.1+ by default uses pubring.kbx - but this isn't backwards compatible
10
+ # with GPG 1 or GPG 2.0.
11
+ # Workaround:
12
+ # - Create empty pubring.gpg file, which causes GPG 2.1+ to use this
13
+ # backwards-compatible store.
14
+ # - Manually export private key copy to secring.gpg, which would be used
15
+ # by GPG 1.
16
+
17
+ set -e -u -o pipefail
18
+
19
+ pushd $(dirname $0)
20
+
21
+ echo "Generating keys in: $(pwd)..."
22
+
23
+ echo "Checking gpg2 version"
24
+ gpg2 --version | head -1
25
+
26
+ echo "Deleting all existing test keys"
27
+ rm -f \
28
+ *.gpg \
29
+ *.asc \
30
+ private-keys-v1.d/*.key \
31
+ .gpg-v21-migrated
32
+
33
+ echo "Generating key pair for test receiver (email sup-test-2@foo.bar.asc)"
34
+ touch pubring.gpg # So GPG 2.1+ writes to pubring.gpg instead of pubring.kbx
35
+ gpg2 \
36
+ --homedir . \
37
+ --batch \
38
+ --pinentry-mode loopback \
39
+ --passphrase '' \
40
+ --quick-generate-key sup-test-2@foo.bar rsa encrypt,sign 0
41
+
42
+ echo "Exporting public key only for test receiver (file sup-test-2@foo.bar.asc)"
43
+ gpg2 \
44
+ --homedir . \
45
+ --armor \
46
+ --output sup-test-2@foo.bar.asc \
47
+ --export sup-test-2@foo.bar
48
+
49
+ echo "Backing up secret key for test receiver (file receiver_secring.gpg)"
50
+ gpg2 \
51
+ --homedir . \
52
+ --export-secret-keys \
53
+ >receiver_secring.gpg
54
+
55
+ echo "Backing up pubring.gpg for test receiver (file receiver_pubring.gpg)"
56
+ cp -a pubring.gpg receiver_pubring.gpg
57
+
58
+ echo "Clearing key store, so we can start from a blank slate for next key(s)"
59
+ rm -f pubring.gpg trustdb.gpg private-keys-v1.d/*.key .gpg-v21-migrated
60
+
61
+ echo "Generating key pair for sender (email sup-test-1@foo.bar)"
62
+ touch pubring.gpg # So GPG 2.1+ writes to pubring.gpg instead of pubring.kbx
63
+ gpg2 \
64
+ --homedir . \
65
+ --batch \
66
+ --pinentry-mode loopback \
67
+ --passphrase '' \
68
+ --quick-generate-key sup-test-1@foo.bar rsa encrypt,sign 0
69
+
70
+ echo "Importing public key for receiver, into sender's key store"
71
+ gpg2 \
72
+ --homedir . \
73
+ --import sup-test-2@foo.bar.asc
74
+
75
+ echo "Copy private key also to secring.gpg (old format used by GPG 1)"
76
+ gpg2 \
77
+ --homedir . \
78
+ --export-secret-keys \
79
+ >secring.gpg
80
+
81
+ echo "Done."
82
+
83
+ echo "We now have two non-expiring public keys (receiver & sender):"
84
+ gpg2 --homedir . --list-keys
85
+
86
+ echo "And we also have only *one* corresponding private key (sender only):"
87
+ gpg2 --homedir . --list-secret-keys
88
+
89
+ popd