Commit e474fe4
Ralf Schlatterbeck
Mail improvements:
- Implement new config option in mail-section "ignore_alternatives" to
ignore alternatives in a multipart/alternative mail. The *last*
text/plain part of the *first* multipart/alternative is used as the
message, if ignore_alternatives is set all other alternative parts of
the first multipart/alternative that contained a text/plain part are
ignored. Other multipart/alternative or other multipart are attached
as before. This fixes [SF#959811] "Multipart/alternative handling
considered bad". Note that this also changes which text/plain part is
attached as the message if there are several text/plain parts in a
multipart: Previously the *first* text/plain would be attached. Now we
attach the *last* one, this is more in line with rfc 2046, sec. 5.1.4.
according to Philipp Gortan.
- Fix bug in attachment of text parts: If there are multiple text/plain
parts in a nested multipart, the previous code would attach the
multipart serialisation instead of the text/plain serialisation as a
file to the issue in some cases.
- Add regression tests for the new config-option and bug-fixes above.1 parent 966f6ec commit e474fe4
File tree
4 files changed
+159
-18
lines changed- roundup
- test
4 files changed
+159
-18
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
7 | 10 | | |
8 | 11 | | |
9 | 12 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
716 | 716 | | |
717 | 717 | | |
718 | 718 | | |
| 719 | + | |
| 720 | + | |
| 721 | + | |
| 722 | + | |
| 723 | + | |
| 724 | + | |
719 | 725 | | |
720 | 726 | | |
721 | 727 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
76 | | - | |
| 76 | + | |
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
| |||
346 | 346 | | |
347 | 347 | | |
348 | 348 | | |
349 | | - | |
350 | | - | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
351 | 356 | | |
352 | 357 | | |
353 | 358 | | |
354 | 359 | | |
355 | 360 | | |
356 | 361 | | |
357 | 362 | | |
| 363 | + | |
| 364 | + | |
358 | 365 | | |
359 | | - | |
| 366 | + | |
| 367 | + | |
360 | 368 | | |
361 | 369 | | |
362 | 370 | | |
363 | 371 | | |
364 | 372 | | |
| 373 | + | |
365 | 374 | | |
366 | | - | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
367 | 388 | | |
368 | 389 | | |
| 390 | + | |
| 391 | + | |
369 | 392 | | |
370 | 393 | | |
371 | 394 | | |
| |||
374 | 397 | | |
375 | 398 | | |
376 | 399 | | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
377 | 414 | | |
378 | 415 | | |
379 | 416 | | |
| |||
1204 | 1241 | | |
1205 | 1242 | | |
1206 | 1243 | | |
1207 | | - | |
| 1244 | + | |
| 1245 | + | |
1208 | 1246 | | |
1209 | 1247 | | |
1210 | 1248 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
340 | 340 | | |
341 | 341 | | |
342 | 342 | | |
343 | | - | |
344 | | - | |
345 | | - | |
346 | | - | |
347 | | - | |
348 | | - | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
349 | 376 | | |
350 | | - | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
351 | 443 | | |
352 | 444 | | |
353 | 445 | | |
| |||
1068 | 1160 | | |
1069 | 1161 | | |
1070 | 1162 | | |
| 1163 | + | |
1071 | 1164 | | |
1072 | | - | |
| 1165 | + | |
1073 | 1166 | | |
1074 | 1167 | | |
1075 | 1168 | | |
1076 | 1169 | | |
1077 | 1170 | | |
1078 | | - | |
1079 | | - | |
| 1171 | + | |
| 1172 | + | |
| 1173 | + | |
1080 | 1174 | | |
1081 | 1175 | | |
1082 | 1176 | | |
| |||
0 commit comments