summaryrefslogtreecommitdiff
path: root/pith/takeaddr.c
diff options
context:
space:
mode:
authorEduardo Chappa <chappa@washington.edu>2015-03-31 12:22:58 -0600
committerEduardo Chappa <chappa@washington.edu>2015-03-31 12:22:58 -0600
commite53164a6acbbb123ba97fd227ac0b3cf4ef4eeb0 (patch)
tree0fc7075642a99b23be3f9a2be4c3d0edf99a51c7 /pith/takeaddr.c
parent3a9d4c01e5135f6d5b2aecdaf698d1d960387df9 (diff)
downloadalpine-e53164a6acbbb123ba97fd227ac0b3cf4ef4eeb0.tar.xz
* new version 2.20.5
* SMIME: Crash when a certificate has an invalid date of validity. Also Alpine will use the function ASN1_TIME_print to determine the date of validity. Reported by Ben Stienstra. * SMIME: Crash when atempting to unlock the password file and an incorrect password is entered. * Alpine version 2.20.4 would not build in Windows, due to a missing #ifdef SMIME directive in file alpine/mailpart.c. Reported by Ulf-Dietrich Braunmann. * Pico: Code reorganization in the search command to make it easier to add subcommands of the search command. * Pico: Search command can do a case sensitive match. Use the Ctrl-^ subcommand of the search command to bring this choice into view. * For a multipart/alternative message, the Take Address command will work on the part that is being read.
Diffstat (limited to 'pith/takeaddr.c')
-rw-r--r--pith/takeaddr.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/pith/takeaddr.c b/pith/takeaddr.c
index 717a1e88..1fb22ef6 100644
--- a/pith/takeaddr.c
+++ b/pith/takeaddr.c
@@ -1824,6 +1824,8 @@ grab_addrs_from_body(MAILSTREAM *stream, long int msgno,
gf_io_t pc;
SourceType src = CharStar;
int added = 0, failure;
+ char *partno = "1";
+ ATTACH_S *a = ps_global->atmts;
dprint((9, "\n - grab_addrs_from_body - \n"));
@@ -1848,7 +1850,12 @@ grab_addrs_from_body(MAILSTREAM *stream, long int msgno,
gf_set_so_writec(&pc, so);
- failure = !get_body_part_text(stream, body, msgno, "1", 0L, pc,
+ if(body->type == TYPEMULTIPART
+ && strucmp(body->subtype, "ALTERNATIVE") == 0
+ && a && a+1 && (a+1)->shown)
+ partno = "2";
+
+ failure = !get_body_part_text(stream, body, msgno, partno, 0L, pc,
NULL, NULL, GBPT_NONE);
gf_clear_so_writec(so);