emailengine-app 2.61.1 → 2.61.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (136) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/data/google-crawlers.json +1 -1
  3. package/lib/account/account-state.js +248 -0
  4. package/lib/account.js +17 -178
  5. package/lib/api-routes/account-routes.js +1006 -0
  6. package/lib/api-routes/message-routes.js +1377 -0
  7. package/lib/consts.js +12 -2
  8. package/lib/email-client/base-client.js +282 -771
  9. package/lib/email-client/gmail/gmail-api.js +243 -0
  10. package/lib/email-client/gmail-client.js +145 -53
  11. package/lib/email-client/imap/mailbox.js +24 -698
  12. package/lib/email-client/imap/sync-operations.js +812 -0
  13. package/lib/email-client/imap-client.js +1 -1
  14. package/lib/email-client/message-builder.js +566 -0
  15. package/lib/email-client/notification-handler.js +314 -0
  16. package/lib/email-client/outlook/graph-api.js +326 -0
  17. package/lib/email-client/outlook-client.js +159 -113
  18. package/lib/email-client/smtp-pool-manager.js +196 -0
  19. package/lib/imapproxy/imap-server.js +3 -12
  20. package/lib/oauth/gmail.js +4 -4
  21. package/lib/oauth/mail-ru.js +30 -5
  22. package/lib/oauth/outlook.js +57 -3
  23. package/lib/oauth/pubsub/google.js +30 -11
  24. package/lib/oauth/scope-checker.js +202 -0
  25. package/lib/oauth2-apps.js +8 -4
  26. package/lib/redis-operations.js +484 -0
  27. package/lib/routes-ui.js +283 -2582
  28. package/lib/tools.js +4 -196
  29. package/lib/ui-routes/account-routes.js +1931 -0
  30. package/lib/ui-routes/admin-config-routes.js +1233 -0
  31. package/lib/ui-routes/admin-entities-routes.js +2367 -0
  32. package/lib/ui-routes/oauth-routes.js +992 -0
  33. package/lib/utils/network.js +237 -0
  34. package/package.json +9 -9
  35. package/sbom.json +1 -1
  36. package/static/js/app.js +5 -5
  37. package/static/licenses.html +78 -18
  38. package/translations/de.mo +0 -0
  39. package/translations/de.po +85 -82
  40. package/translations/en.mo +0 -0
  41. package/translations/en.po +63 -71
  42. package/translations/et.mo +0 -0
  43. package/translations/et.po +84 -82
  44. package/translations/fr.mo +0 -0
  45. package/translations/fr.po +85 -82
  46. package/translations/ja.mo +0 -0
  47. package/translations/ja.po +84 -82
  48. package/translations/messages.pot +74 -87
  49. package/translations/nl.mo +0 -0
  50. package/translations/nl.po +86 -82
  51. package/translations/pl.mo +0 -0
  52. package/translations/pl.po +84 -82
  53. package/views/account/security.hbs +4 -4
  54. package/views/accounts/account.hbs +13 -13
  55. package/views/accounts/register/imap-server.hbs +12 -12
  56. package/views/config/document-store/pre-processing/index.hbs +4 -2
  57. package/views/config/oauth/app.hbs +6 -7
  58. package/views/config/oauth/index.hbs +2 -2
  59. package/views/config/service.hbs +3 -4
  60. package/views/dashboard.hbs +5 -7
  61. package/views/error.hbs +22 -7
  62. package/views/gateways/gateway.hbs +2 -2
  63. package/views/partials/add_account_modal.hbs +7 -10
  64. package/views/partials/document_store_header.hbs +1 -1
  65. package/views/partials/editor_scope_info.hbs +0 -1
  66. package/views/partials/oauth_config_header.hbs +1 -1
  67. package/views/partials/side_menu.hbs +3 -3
  68. package/views/partials/webhook_form.hbs +2 -2
  69. package/views/templates/index.hbs +1 -1
  70. package/views/templates/template.hbs +8 -8
  71. package/views/tokens/index.hbs +6 -6
  72. package/views/tokens/new.hbs +1 -1
  73. package/views/webhooks/index.hbs +4 -4
  74. package/views/webhooks/webhook.hbs +7 -7
  75. package/workers/api.js +148 -2436
  76. package/workers/smtp.js +2 -1
  77. package/lib/imapproxy/imap-core/test/client.js +0 -46
  78. package/lib/imapproxy/imap-core/test/fixtures/append.eml +0 -1196
  79. package/lib/imapproxy/imap-core/test/fixtures/chunks.js +0 -44
  80. package/lib/imapproxy/imap-core/test/fixtures/fix1.eml +0 -6
  81. package/lib/imapproxy/imap-core/test/fixtures/fix2.eml +0 -599
  82. package/lib/imapproxy/imap-core/test/fixtures/fix3.eml +0 -32
  83. package/lib/imapproxy/imap-core/test/fixtures/fix4.eml +0 -6
  84. package/lib/imapproxy/imap-core/test/fixtures/mimetorture.eml +0 -599
  85. package/lib/imapproxy/imap-core/test/fixtures/mimetorture.js +0 -2740
  86. package/lib/imapproxy/imap-core/test/fixtures/mimetorture.json +0 -1411
  87. package/lib/imapproxy/imap-core/test/fixtures/mimetree.js +0 -85
  88. package/lib/imapproxy/imap-core/test/fixtures/nodemailer.eml +0 -582
  89. package/lib/imapproxy/imap-core/test/fixtures/ryan_finnie_mime_torture.eml +0 -599
  90. package/lib/imapproxy/imap-core/test/fixtures/simple.eml +0 -42
  91. package/lib/imapproxy/imap-core/test/fixtures/simple.json +0 -164
  92. package/lib/imapproxy/imap-core/test/imap-compile-stream-test.js +0 -671
  93. package/lib/imapproxy/imap-core/test/imap-compiler-test.js +0 -272
  94. package/lib/imapproxy/imap-core/test/imap-indexer-test.js +0 -236
  95. package/lib/imapproxy/imap-core/test/imap-parser-test.js +0 -922
  96. package/lib/imapproxy/imap-core/test/memory-notifier.js +0 -129
  97. package/lib/imapproxy/imap-core/test/prepare.sh +0 -74
  98. package/lib/imapproxy/imap-core/test/protocol-test.js +0 -1756
  99. package/lib/imapproxy/imap-core/test/search-test.js +0 -1356
  100. package/lib/imapproxy/imap-core/test/test-client.js +0 -152
  101. package/lib/imapproxy/imap-core/test/test-server.js +0 -623
  102. package/lib/imapproxy/imap-core/test/tools-test.js +0 -22
  103. package/test/api-test.js +0 -899
  104. package/test/autoreply-test.js +0 -327
  105. package/test/bounce-test.js +0 -151
  106. package/test/complaint-test.js +0 -256
  107. package/test/fixtures/autoreply/LICENSE +0 -27
  108. package/test/fixtures/autoreply/rfc3834-01.eml +0 -23
  109. package/test/fixtures/autoreply/rfc3834-02.eml +0 -24
  110. package/test/fixtures/autoreply/rfc3834-03.eml +0 -26
  111. package/test/fixtures/autoreply/rfc3834-04.eml +0 -48
  112. package/test/fixtures/autoreply/rfc3834-05.eml +0 -19
  113. package/test/fixtures/autoreply/rfc3834-06.eml +0 -59
  114. package/test/fixtures/bounces/163.eml +0 -2521
  115. package/test/fixtures/bounces/fastmail.eml +0 -242
  116. package/test/fixtures/bounces/gmail.eml +0 -252
  117. package/test/fixtures/bounces/hotmail.eml +0 -655
  118. package/test/fixtures/bounces/mailru.eml +0 -121
  119. package/test/fixtures/bounces/outlook.eml +0 -1107
  120. package/test/fixtures/bounces/postfix.eml +0 -101
  121. package/test/fixtures/bounces/rambler.eml +0 -116
  122. package/test/fixtures/bounces/workmail.eml +0 -142
  123. package/test/fixtures/bounces/yahoo.eml +0 -139
  124. package/test/fixtures/bounces/zoho.eml +0 -83
  125. package/test/fixtures/bounces/zonemta.eml +0 -100
  126. package/test/fixtures/complaints/LICENSE +0 -27
  127. package/test/fixtures/complaints/amazonses.eml +0 -72
  128. package/test/fixtures/complaints/dmarc.eml +0 -59
  129. package/test/fixtures/complaints/hotmail.eml +0 -49
  130. package/test/fixtures/complaints/optout.eml +0 -40
  131. package/test/fixtures/complaints/standard-arf.eml +0 -68
  132. package/test/fixtures/complaints/yahoo.eml +0 -68
  133. package/test/oauth2-apps-test.js +0 -301
  134. package/test/sendonly-test.js +0 -160
  135. package/test/test-config.js +0 -34
  136. package/test/webhooks-server.js +0 -39
@@ -1,599 +0,0 @@
1
- Subject: Ryan Finnie's MIME Torture Test v1.0
2
- From: Ryan Finnie <rfinnie@domain.dom>
3
- To: bob@domain.dom
4
- Content-Type: multipart/mixed; boundary="=-qYxqvD9rbH0PNeExagh1"
5
- Message-Id: <1066976914.4721.5.camel@localhost>
6
- Mime-Version: 1.0
7
- Date: 23 Oct 2003 23:28:34 -0700
8
-
9
-
10
- --=-qYxqvD9rbH0PNeExagh1
11
- Content-Type: text/plain; CHARSET=US-ASCII
12
- Content-Transfer-Encoding: 8bit
13
-
14
- Welcome to Ryan Finnie's MIME torture test. This message was designed
15
- to introduce a couple of the newer features of MIME-aware MUAs, features
16
- that have come around since the days of the original MIME torture test.
17
-
18
- Just to be clear, this message SUPPLEMENTS the original torture test,
19
- not replaces it. The original test is still very much valid these days,
20
- and new MUAs should strive to first pass the original test, then this
21
- one.
22
-
23
- By the way, the message/rfc822 parts have Content-Descriptions
24
- containing Futurama quotes. Bonus points if the MUA display these
25
- somewhere.
26
-
27
- Have fun!
28
-
29
- Ryan Finnie
30
-
31
- --=-qYxqvD9rbH0PNeExagh1
32
- Content-Disposition: inline
33
- Content-Description: I'll be whatever I wanna do. --Fry
34
- Content-Type: message/rfc822
35
-
36
- Subject: plain jane message
37
- From: Ryan Finnie <rfinnie@domain.dom>
38
- To: bob@domain.dom
39
- Message-Id: <1066973156.4264.42.camel@localhost>
40
- Mime-Version: 1.0
41
- Date: 23 Oct 2003 22:25:56 -0700
42
- Content-Type: text/plain; CHARSET=US-ASCII
43
- Content-Transfer-Encoding: 8bit
44
-
45
- Subject: plain jane message
46
- From: Ryan Finnie <rfinnie@domain.dom>
47
- To: bob@domain.dom
48
- Content-Type: text/plain
49
- Message-Id: <1066973156.4264.42.camel@localhost>
50
- Mime-Version: 1.0
51
- Date: 23 Oct 2003 22:25:56 -0700
52
- Content-Transfer-Encoding: 7bit
53
-
54
- This is a plain text/plain message. Nothing fancy here...
55
- --=-qYxqvD9rbH0PNeExagh1
56
- Content-Disposition: inline
57
- Content-Description: Would you kindly shut your noise-hole? --Bender
58
- Content-Type: message/rfc822
59
-
60
- Subject: messages inside messages inside...
61
- From: Ryan Finnie <rfinnie@domain.dom>
62
- To: bob@domain.dom
63
- Content-Type: multipart/mixed; boundary="=-9Brg7LoMERBrIDtMRose"
64
- Message-Id: <1066976111.4263.74.camel@localhost>
65
- Mime-Version: 1.0
66
- Date: 23 Oct 2003 23:15:11 -0700
67
-
68
-
69
- --=-9Brg7LoMERBrIDtMRose
70
- Content-Type: text/plain; CHARSET=US-ASCII
71
- Content-Transfer-Encoding: 8bit
72
-
73
- While a message/rfc822 part inside another message/rfc822 part in a
74
- message isn't too strange, 200 iterations of that would be. The MUA
75
- should have some sense when to stop looping through.
76
-
77
- --=-9Brg7LoMERBrIDtMRose
78
- Content-Disposition: inline
79
- Content-Description: At the risk of sounding negative, no. --Leela
80
- Content-Type: message/rfc822
81
-
82
- Subject: the original message
83
- From: Ryan Finnie <rfinnie@domain.dom>
84
- To: bob@domain.dom
85
- Content-Type: multipart/mixed; boundary="=-XFYecI7w+0shpolXq8bb"
86
- Message-Id: <1066975745.4263.70.camel@localhost>
87
- Mime-Version: 1.0
88
- Date: 23 Oct 2003 23:09:05 -0700
89
-
90
-
91
- --=-XFYecI7w+0shpolXq8bb
92
- Content-Type: text/plain; CHARSET=US-ASCII
93
- Content-Transfer-Encoding: 8bit
94
-
95
- by this point, I should be the 3rd layer deep!
96
-
97
- I also have an attachment.
98
-
99
- --=-XFYecI7w+0shpolXq8bb
100
- Content-Disposition: attachment; filename=foo.gz
101
- Content-Transfer-Encoding: base64
102
- Content-Type: application/x-gzip; NAME=foo.gz
103
-
104
- H4sIAOHBmD8AA4vML1XPyVHISy1LLVJIy8xLUchNVeQCAHbe764WAAAA
105
-
106
- --=-XFYecI7w+0shpolXq8bb--
107
-
108
- --=-9Brg7LoMERBrIDtMRose--
109
-
110
- --=-qYxqvD9rbH0PNeExagh1
111
- Content-Disposition: inline
112
- Content-Description: Dirt doesn't need luck! --Professor
113
- Content-Type: message/rfc822
114
-
115
- Subject: this message JUST contains an attachment
116
- From: Ryan Finnie <rfinnie@domain.dom>
117
- To: bob@domain.dom
118
- Content-Disposition: attachment; filename=blah.gz
119
- Content-Transfer-Encoding: base64
120
- Content-Description: Attachment has identical content to above foo.gz
121
- Message-Id: <1066974048.4264.62.camel@localhost>
122
- Mime-Version: 1.0
123
- Date: 23 Oct 2003 22:40:49 -0700
124
- Content-Type: application/x-gzip; NAME=blah.gz
125
-
126
- SubjectthismessageJUSTcontainsanattachmentFromRyanFinnierfinniedomaindomTobo
127
- bdomaindomContentDispositionattachmentfilenameAblahgzContentTypeapplication/
128
- xgzipnameAblahgzContentTransferEncodingbase64ContentDescriptionAttachmenthas
129
- identicalcontenttoabovefoogzMessageId1066974048426462camellocalhostMimeVersi
130
- on10Date23Oct20032240490700H4sIAOHBmD8AA4vML1XPyVHISy1LLVJIy8xLUchNVeQCAHbe7
131
- 64WA
132
-
133
- --=-qYxqvD9rbH0PNeExagh1
134
- Content-Disposition: inline
135
- Content-Description: Hold still, I don't have good depth perception! --Leela
136
- Content-Type: message/rfc822
137
-
138
- Subject: Attachment filename vs. name
139
- From: Ryan Finnie <rfinnie@domain.dom>
140
- To: bob@domain.dom
141
- Content-Type: multipart/mixed; boundary="=-1066975756jd02"
142
- Message-Id: <1066975756.4263.70.camel@localhost>
143
- Mime-Version: 1.0
144
- Date: 23 Oct 2003 23:09:16 -0700
145
-
146
-
147
- --=-1066975756jd02
148
- Content-Type: text/plain; CHARSET=US-ASCII
149
- Content-Transfer-Encoding: 8bit
150
-
151
- In this message's attachment, the Content-Disposition has a
152
- filename of blah1.gz, while the Content-Type has a name of
153
- blah2.gz. What should be done? Well, since this is an attachment
154
- (as indicated in the Content-Disposition), the MUA should
155
- suggest a filename of blah1.gz. The MUA *COULD* find a way to
156
- represent the name of blah2.gz somewhere else, it's not needed.
157
-
158
- --=-1066975756jd02
159
- Content-Disposition: attachment; filename=blah1.gz
160
- Content-Transfer-Encoding: base64
161
- Content-Description: filename is blah1.gz, name is blah2.gz
162
- Content-Type: application/x-gzip; NAME=blah2.gz
163
-
164
- H4sIAOHBmD8AA4vML1XPyVHISy1LLVJIy8xLUchNVeQCAHbe764WAAAA
165
-
166
- --=-1066975756jd02--
167
-
168
- --=-qYxqvD9rbH0PNeExagh1
169
- Content-Disposition: inline
170
- Content-Description: Hello little man. I WILL DESTROY YOU! --Moro
171
- Content-Type: message/rfc822
172
-
173
- Subject: No filename? No problem!
174
- From: Ryan Finnie <rfinnie@domain.dom>
175
- To: bob@domain.dom
176
- Content-Type: multipart/mixed; boundary="=-1066975756jd03"
177
- Message-Id: <1066975761.4263.70.camel@localhost>
178
- Mime-Version: 1.0
179
- Date: 23 Oct 2003 23:09:21 -0700
180
-
181
-
182
- --=-1066975756jd03
183
- Content-Type: text/plain; CHARSET=US-ASCII
184
- Content-Transfer-Encoding: 8bit
185
-
186
- When searching for a suitable name to suggest for a filename,
187
- the MUA should probably follow this order. First, look for
188
- Content-Disposition's filename attribute. If that is missing,
189
- look for Content-Type's file attribute. If that is also missing,
190
- I would recomment taking the Content-Description, stripping off
191
- any characters that cannot be used in a filename, and suggesting
192
- that.
193
-
194
- If none of those fields are available, the MUA could just make
195
- up a random filename. SOMETHING is better than nothing.
196
-
197
- --=-1066975756jd03
198
- Content-Disposition: attachment
199
- Content-Transfer-Encoding: base64
200
- Content-Description: I'm getting sick of witty things to say
201
- Content-Type: application/x-gzip
202
-
203
- H4sIAOHBmD8AA4vML1XPyVHISy1LLVJIy8xLUchNVeQCAHbe764WAAAA
204
-
205
- --=-1066975756jd03--
206
-
207
- --=-qYxqvD9rbH0PNeExagh1
208
- Content-Disposition: inline
209
- Content-Description: Friends! Help! A guinea pig tricked me! --Zoidberg
210
- Content-Type: message/rfc822
211
-
212
- Subject: html and text, both inline
213
- From: Ryan Finnie <rfinnie@domain.dom>
214
- To: bob@domain.dom
215
- Content-Type: multipart/mixed; boundary="=-ZCKMfHzvHMyK1iBu4kff"
216
- Message-Id: <1066974044.4264.62.camel@localhost>
217
- Mime-Version: 1.0
218
- Date: 23 Oct 2003 22:40:45 -0700
219
-
220
-
221
- --=-ZCKMfHzvHMyK1iBu4kff
222
- Content-Type: text/html; CHARSET=utf-8
223
- Content-Transfer-Encoding: 8bit
224
-
225
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
226
- <HTML>
227
- <HEAD>
228
- <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
229
- <META NAME="GENERATOR" CONTENT="GtkHTML/1.1.10">
230
- </HEAD>
231
- <BODY>
232
- <FONT COLOR="#f8cc00">This is the HTML part.</FONT><BR>
233
- It should be displayed inline.
234
- </BODY>
235
- </HTML>
236
-
237
- --=-ZCKMfHzvHMyK1iBu4kff
238
- Content-Type: text/plain; CHARSET=US-ASCII
239
- Content-Transfer-Encoding: 8bit
240
-
241
- This is the text part.
242
- It should ALSO be displayed inline.
243
-
244
- --=-ZCKMfHzvHMyK1iBu4kff--
245
-
246
- --=-qYxqvD9rbH0PNeExagh1
247
- Content-Disposition: inline
248
- Content-Description: Smeesh! --Amy
249
- Content-Type: message/rfc822
250
-
251
- Subject: text and text, both inline
252
- From: Ryan Finnie <rfinnie@domain.dom>
253
- To: bob@domain.dom
254
- Content-Type: multipart/mixed; boundary="=-pNc4wtlOIxs8RcX7H/AK"
255
- Message-Id: <1066974089.4265.64.camel@localhost>
256
- Mime-Version: 1.0
257
- Date: 23 Oct 2003 22:41:29 -0700
258
-
259
-
260
- --=-pNc4wtlOIxs8RcX7H/AK
261
- Content-Type: text/plain; CHARSET=US-ASCII
262
- Content-Transfer-Encoding: 8bit
263
-
264
- This is the first text part.
265
- It should be displayed inline.
266
-
267
- --=-pNc4wtlOIxs8RcX7H/AK
268
- Content-Type: text/plain; CHARSET=US-ASCII
269
- Content-Transfer-Encoding: 8bit
270
-
271
- This is the second text part.
272
- It should also be displayed inline.
273
-
274
- --=-pNc4wtlOIxs8RcX7H/AK--
275
-
276
- --=-qYxqvD9rbH0PNeExagh1
277
- Content-Disposition: inline
278
- Content-Description: That's not a cigar. Uh... and it's not mine. --Hermes
279
- Content-Type: message/rfc822
280
-
281
- Subject: HTML and... HTML?
282
- From: Ryan Finnie <rfinnie@domain.dom>
283
- To: bob@domain.dom
284
- Content-Type: multipart/mixed; boundary="=-zxh/IezwzZITiphpcbJZ"
285
- Message-Id: <1066973957.4263.59.camel@localhost>
286
- Mime-Version: 1.0
287
- Date: 23 Oct 2003 22:39:17 -0700
288
-
289
-
290
- --=-zxh/IezwzZITiphpcbJZ
291
- Content-Type: text/html; CHARSET=utf-8
292
- Content-Transfer-Encoding: 8bit
293
-
294
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
295
- <HTML>
296
- <HEAD>
297
- <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
298
- <META NAME="GENERATOR" CONTENT="GtkHTML/1.1.10">
299
- </HEAD>
300
- <BODY>
301
- <B>Bold!!!</B><BR>
302
- <BR>
303
- What do we have here... This message is an HTML message. Also attached
304
- is an HTML FILE. Both of these are in a multipart/mixed part.<BR>
305
- <BR>
306
- Now, the first HTML part (what you're reading now) should be displayed
307
- if the MUA is HTML-capable. If it is not, the MUA could possibly offer
308
- this part up as an attachment to download, seeing as how no plaintext
309
- part is offered as an alternative.<BR>
310
- <BR>
311
- However, the second HTML part is listed with a disposition as
312
- attachment. Therefore, it should be offered as an attachment, not
313
- displayed inline.
314
- </BODY>
315
- </HTML>
316
-
317
- --=-zxh/IezwzZITiphpcbJZ
318
- Content-Disposition: attachment; filename=htmlfile.html
319
- Content-Type: text/html; NAME=htmlfile.html; CHARSET=UTF-8
320
- Content-Transfer-Encoding: 8bit
321
-
322
- <html>
323
- <head><title>This is an Attachment</title></head>
324
- <body>
325
- <p>The title says it all...</p>
326
- </body>
327
- </html>
328
-
329
- --=-zxh/IezwzZITiphpcbJZ--
330
-
331
- --=-qYxqvD9rbH0PNeExagh1
332
- Content-Disposition: inline
333
- Content-Description: The spirit is willing, but the flesh is spongy, and
334
- bruised. --Zapp
335
- Content-Type: message/rfc822
336
-
337
- Subject: smiley!
338
- From: Ryan Finnie <rfinnie@domain.dom>
339
- To: bob@domain.dom
340
- Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-vH3FQO9a8icUn1ROCoAi"
341
- Message-Id: <1066972996.4264.39.camel@localhost>
342
- Mime-Version: 1.0
343
- Date: 23 Oct 2003 22:23:16 -0700
344
-
345
-
346
- --=-vH3FQO9a8icUn1ROCoAi
347
- Content-Type: multipart/mixed; boundary="=-CgV5jm9HAY9VbUlAuneA"
348
-
349
-
350
- --=-CgV5jm9HAY9VbUlAuneA
351
- Content-Type: multipart/related; type="multipart/alternative";
352
- boundary="=-GpwozF9CQ7NdF+fd+vMG"
353
-
354
-
355
- --=-GpwozF9CQ7NdF+fd+vMG
356
- Content-Type: multipart/alternative; boundary="=-dHujWM/Xizz57x/JOmDF"
357
-
358
-
359
- --=-dHujWM/Xizz57x/JOmDF
360
- Content-Type: text/plain
361
- Content-Transfer-Encoding: quoted-printable
362
-
363
- If this sentence is red, you are viewing the HTML part.
364
- Wow, what a complicated message. This message is laid out as so:
365
-
366
- multipart/signed
367
- | multipart/mixed
368
- | | mutipart/related
369
- | | | multipart/alternative
370
- | | | | text/plain
371
- | | | | text/html
372
- | | | image/png (smiley)
373
- | | image/gif (dot)
374
- | application/pgp-signature
375
-
376
- :)
377
-
378
- A smiley face should be embedded into the HTML part above (if you are
379
- viewing the HTML part), while the red square dot should be attached, not
380
- displayed inline. Additionally, this whole message is PGP signed.
381
-
382
- This message introduces a few tricks that the MUA should cope with.=20
383
- First of all, the related / alternative combination doesn't make much
384
- sense. Here's the current setup in pseudo-code:
385
-
386
- relationship between (alternative: HTML or text part) and PNG part
387
-
388
- Why would the text part be related in anyway to the PNG? Instead, the
389
- correct and more logical way to do things would be:
390
-
391
- alternative: (relationship between HTML and PNG parts) or text part
392
-
393
- However, many MUAs compose a message using the first method, so this
394
- should be taken care of when parsing the message.
395
-
396
- Additionally, notice that the inline image has a disposition of
397
- "attachment". Despite this being in there, the smiley should be
398
- embedded inline in the HTML part, not offered as an attachment.=20
399
- Conversely, the GIF image should be offered as an attachment, not
400
- displayed inline.
401
-
402
- If the MUA is not PGP capable, at the very least it should recognize
403
- multipart/signed the same as multipart/mixed, and offer the
404
- application/pgp-signature part as an attachment.
405
-
406
- --=-dHujWM/Xizz57x/JOmDF
407
- Content-Type: text/html; charset=utf-8
408
- Content-Transfer-Encoding: quoted-printable
409
-
410
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
411
- <HTML>
412
- <HEAD>
413
- <META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; CHARSET=3DUTF-8">
414
- <META NAME=3D"GENERATOR" CONTENT=3D"GtkHTML/1.1.10">
415
- </HEAD>
416
- <BODY>
417
- <FONT COLOR=3D"#f80000">If this sentence is red, you are viewing the HTML p=
418
- art.</FONT><BR>
419
- Wow, what a complicated message.  This message is laid out as so:<BR>
420
- <BR>
421
- multipart/signed<BR>
422
- | multipart/mixed<BR>
423
- | | mutipart/related<BR>
424
- | | | multipart/alternative<BR>
425
- | | | | text/plain<BR>
426
- | | | | text/html<BR>
427
- | | | image/png (smiley)<BR>
428
- | | image/gif (dot)<BR>
429
- | application/pgp-signature<BR>
430
- <BR>
431
- <IMG SRC=3D"cid:1066971953.4232.15.camel@localhost" ALIGN=3D"bottom" ALT=3D=
432
- ":)" BORDER=3D"0"><BR>
433
- <BR>
434
- A smiley face should be embedded into the HTML part above (if you are viewi=
435
- ng the HTML part), while the red square dot should be attached, not display=
436
- ed inline.  Additionally, this whole message is PGP signed.<BR>
437
- <BR>
438
- This message introduces a few tricks that the MUA should cope with.  F=
439
- irst of all, the related / alternative combination doesn't make much sense.=
440
-   Here's the current setup in pseudo-code:<BR>
441
- <BR>
442
- <I>relationship between (alternative: HTML or text part) and PNG part</I><B=
443
- R>
444
- <BR>
445
- Why would the text part be related in anyway to the PNG?  Instead, the=
446
- correct and more logical way to do things would be:<BR>
447
- <BR>
448
- alternative: (relationship between HTML and PNG parts) or text part<BR>
449
- <BR>
450
- However, many MUAs compose a message using the first method, so this should=
451
- be taken care of when parsing the message.<BR>
452
- <BR>
453
- Additionally, notice that the inline image has a disposition of "attac=
454
- hment".  Despite this being in there, the smiley should be embedd=
455
- ed inline in the HTML part, not offered as an attachment.  Conversely,=
456
- the GIF image should be offered as an attachment, not displayed inline.<BR=
457
- >
458
- <BR>
459
- If the MUA is not PGP capable, at the very least it should recognize multip=
460
- art/signed the same as multipart/mixed, and offer the application/pgp-signa=
461
- ture part as an attachment.
462
- </BODY>
463
- </HTML>
464
-
465
- --=-dHujWM/Xizz57x/JOmDF--
466
-
467
- --=-GpwozF9CQ7NdF+fd+vMG
468
- Content-ID: <1066971953.4232.15.camel@localhost>
469
- Content-Disposition: attachment; filename=smiley-3.png
470
- Content-Type: image/png; name=smiley-3.png
471
- Content-Transfer-Encoding: base64
472
-
473
- iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAC+klEQVR42n2TbUjVdxTHP/+H69Xd
474
- a2VWlFe69rzthZJUoxeNOWoFGxEhYRRFmZSVW2u9ab2KejWE1qDNBkEQhS82VoiaZkVPmoWaKNM5
475
- mA+opbd771//997//T/+epHBarEPHA6Hc84XDnwP/JcwcBS4AVgzcR04ONN7C+md+pcPCz44dPLA
476
- arZs/gg1UABuGkvvp7X1Iad+itE/YtUAle8TuH26sujzqq/LkJQsnOQQVmIASVJQMhehZORiJwc5
477
- d76FH2pf3gY2Aigzy7+eObqmtOqbXbjGGHZqCM+eQpJ9AHhWFCc5CAjWf1KAkppc+qg3vRCol4Fw
478
- 0aqcisOVW3HTE7hmBElSKD/5GFkNMhH1KDvegST78CwNSfZxeM88VuYrh4CwAuxqvxL6MnPuWiy9
479
- H1kNUPH9fZofDKPpHn8/z+Z6Yw8JK5stX5VhRO6h+OfiV3WaHxtPVKAwmF+KqXUDMkgqZ0+UoKcE
480
- P57/GXOqh46ODqrPXUQfufb6YOGxJOQD2CaHQnnlAJ4zDXggHBYvK6ap6Rau+RIz1k7djd+YHrqM
481
- pXUC4KQnWTRPAdiuRqNRkFQG/omRNJOsKVQw408xtS4QDsI10AaqEY6O8Fzq70fJy3XI8gsA5HTa
482
- rBdOkvwFKj39EWrr/sJzEnj29OvsphGugfBsLlwbZnjcYN36LxiLuADtMtCUetFAcE4ee8s+pbHV
483
- YtOemwhHx3MSaPEY3X9OUnqsk5a2OMeP7KC3t4u+3gRALUC4cEW2eN62Q4ze3SAiz74TDxvOiI+X
484
- BcTsoCoyfJKYn6OKmrMbxGRnlXhyJSSqv80Vq0KSAFa+ceKl0wcK9lfsW42TGsE/pxhfcDmKfz6e
485
- FUPg4iRH6Ov6g9EJh1t341xusWuAyn9b+c7BrbklJ8oDZGTOQpL9ePY08SmDpCEwbcHwuE370yku
486
- Nlj3gM/e90yXliyU9+8sCVJYlEUgU8IwBZruMThm83uzxsAYV4Hd/A9h4BjQBthAFOgDLgDF7w6/
487
- ArI6YJ0eTQeGAAAAAElFTkSuQmCC
488
-
489
- --=-GpwozF9CQ7NdF+fd+vMG--
490
-
491
- --=-CgV5jm9HAY9VbUlAuneA
492
- Content-Disposition: attachment; filename=dot.gif
493
- Content-Type: image/gif; name=dot.gif
494
- Content-Transfer-Encoding: base64
495
-
496
- R0lGODdhCgAKAKEAAAAAANUAAP///8PDwywAAAAACgAKAEACHZSPMssLKoIMYLyR1I2z3sZsE2VB
497
- owcBqlqurloAADs=
498
-
499
- --=-CgV5jm9HAY9VbUlAuneA--
500
-
501
- --=-vH3FQO9a8icUn1ROCoAi
502
- Content-Type: application/pgp-signature; name=signature.asc
503
- Content-Description: This is a digitally signed message part
504
-
505
- -----BEGIN PGP SIGNATURE-----
506
- Version: GnuPG v1.2.2 (GNU/Linux)
507
-
508
- iD8DBQA/mLdEKZYQqSA+yiURAjAnAJ90G22jbX/Broy0F541R0UUbsb6zgCeJn0d
509
- 02Vq9Sv6aXE+YM0lRn3jZDc=
510
- =uwCM
511
- -----END PGP SIGNATURE-----
512
-
513
- --=-vH3FQO9a8icUn1ROCoAi--
514
- --=-qYxqvD9rbH0PNeExagh1
515
- Content-Disposition: inline
516
- Content-Description: Kittens give Morbo gas. --Morbo
517
- Content-Type: message/rfc822
518
-
519
- Subject: the PROPER way to do alternative/related
520
- From: Ryan Finnie <rfinnie@domain.dom>
521
- To: bob@domain.dom
522
- Content-Type: multipart/alternative; type="multipart/alternative"; boundary="=-tyGlQ9JvB5uvPWzozI+y"
523
- Message-Id: <1066973557.4265.51.camel@localhost>
524
- Mime-Version: 1.0
525
- X-Mailer: Not Evolution
526
- Date: 23 Oct 2003 22:32:37 -0700
527
-
528
-
529
- --=-tyGlQ9JvB5uvPWzozI+y
530
- Content-Type: text/plain; CHARSET=US-ASCII
531
- Content-Transfer-Encoding: 8bit
532
-
533
- If this sentence is green, you're viewing the HTML part.
534
-
535
- Now, this is the way that all MUAs SHOULD treat this kind of situation.
536
- The layout is like so:
537
-
538
- multipart/alternative
539
- | text/plain
540
- | multipart/related
541
- | | text/html
542
- | | image/gif
543
-
544
- See? The GIF (which by the way should be inline towards the top of this
545
- message) is related to the HTML, and that whole block is an alternative
546
- to a text/plain part. This is the opposite of the way shown in the
547
- previous email.
548
-
549
- Also, the embedded image here does not have a filename. As mentioned
550
- above, the MUA should suggest something as a filename, even here (the
551
- user may want to save the embedded image, so a filename would be
552
- helpful). In this case, I would recommend appending the random text
553
- to be suggested to the user with the part's subtype, in this case
554
- something like c20vsidlkvm.gif.
555
-
556
- --=-tyGlQ9JvB5uvPWzozI+y
557
- Content-Type: multipart/related; boundary="=-bFkxH1S3HVGcxi+o/5jG"
558
-
559
-
560
- --=-bFkxH1S3HVGcxi+o/5jG
561
- Content-Type: text/html; CHARSET=utf-8
562
- Content-Transfer-Encoding: 8bit
563
-
564
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
565
- <HTML>
566
- <HEAD>
567
- <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
568
- <META NAME="GENERATOR" CONTENT="GtkHTML/1.1.10">
569
- </HEAD>
570
- <BODY>
571
- <FONT COLOR="#00fc00">If this sentence is green, you're viewing the HTML part.</FONT><BR>
572
- <IMG SRC="cid:1066973340.4232.46.camel@localhost" ALIGN="top" ALT="" BORDER="0"><BR>
573
- Now, this is the way that all MUAs <B>SHOULD</B> treat this kind of situation.  The layout is like so:<BR>
574
- <BR>
575
- multipart/alternative<BR>
576
- | text/plain<BR>
577
- | multipart/related<BR>
578
- | | text/html<BR>
579
- | | image/gif<BR>
580
- <BR>
581
- See?  The GIF (which by the way should be inline towards the top of this message) is related to the HTML, and that whole block is an alternative to a text/plain part.  This is the opposite of the way shown in the previous email.<BR>
582
- <BR>
583
- Also, the embedded image here does not have a filename.  As mentioned above, the MUA should suggest something as a filename, even here (the user may want to save the embedded image, so a filename would be helpful).  In this case, I would recommend appending the random text to be suggested to the user with the part's subtype, in this case something like c20vsidlkvm.gif.
584
- </BODY>
585
- </HTML>
586
-
587
- --=-bFkxH1S3HVGcxi+o/5jG
588
- Content-ID: <1066973340.4232.46.camel@localhost>
589
- Content-Transfer-Encoding: base64
590
- Content-Type: image/gif
591
-
592
- R0lGODlhBQALAPIAAKIA/64A/8ZL/////8BS/2QDANZ//wAAACH5BAEAAAMALAAAAAAFAAsAAAMY
593
- OBIytsIYEoiEl0lqFWgKM4zkUJzjWQwJADs=
594
-
595
- --=-bFkxH1S3HVGcxi+o/5jG--
596
-
597
- --=-tyGlQ9JvB5uvPWzozI+y--
598
-
599
- --=-qYxqvD9rbH0PNeExagh1--