Assorted fixes.
* libmailutils/mailer/mailer.c (mu_mailer_send_fragments): Fix 3rd argument to _set_to. * libproto/mailer/smtp.c (smtp_send_message): SIZE capability can appear alone, without specifying maximum size. * mh/mh_whom.c (mh_alias_expand): Recreate domain part for addresses missing it.
Showing
3 changed files
with
13 additions
and
6 deletions
... | @@ -666,7 +666,7 @@ mu_mailer_send_fragments (mu_mailer_t mailer, | ... | @@ -666,7 +666,7 @@ mu_mailer_send_fragments (mu_mailer_t mailer, |
666 | if (sender_addr) | 666 | if (sender_addr) |
667 | from = sender_addr; | 667 | from = sender_addr; |
668 | 668 | ||
669 | status = _set_to (&rcpt_addr, msg, from, mailer); | 669 | status = _set_to (&rcpt_addr, msg, to, mailer); |
670 | if (status) | 670 | if (status) |
671 | return status; | 671 | return status; |
672 | if (rcpt_addr) | 672 | if (rcpt_addr) | ... | ... |
... | @@ -467,10 +467,13 @@ smtp_send_message (mu_mailer_t mailer, mu_message_t msg, | ... | @@ -467,10 +467,13 @@ smtp_send_message (mu_mailer_t mailer, mu_message_t msg, |
467 | mu_message_lines (msg, &lines) == 0) | 467 | mu_message_lines (msg, &lines) == 0) |
468 | { | 468 | { |
469 | size_t msgsize = size + lines; | 469 | size_t msgsize = size + lines; |
470 | if (strncmp (size_str, "SIZE=", 5) == 0) | ||
471 | { | ||
470 | size_t maxsize = strtoul (size_str + 5, NULL, 10); | 472 | size_t maxsize = strtoul (size_str + 5, NULL, 10); |
471 | 473 | ||
472 | if (msgsize && msgsize > maxsize) | 474 | if (msgsize && maxsize && msgsize > maxsize) |
473 | return EFBIG; | 475 | return EFBIG; |
476 | } | ||
474 | status = mu_smtp_mail_basic (smtp, mail_from, | 477 | status = mu_smtp_mail_basic (smtp, mail_from, |
475 | "SIZE=%lu", | 478 | "SIZE=%lu", |
476 | (unsigned long) msgsize); | 479 | (unsigned long) msgsize); | ... | ... |
... | @@ -81,11 +81,15 @@ mh_alias_expand (const char *str, mu_address_t *paddr, int *incl) | ... | @@ -81,11 +81,15 @@ mh_alias_expand (const char *str, mu_address_t *paddr, int *incl) |
81 | 81 | ||
82 | if (mu_address_sget_domain (addr, i, &key) == 0 && key == NULL) | 82 | if (mu_address_sget_domain (addr, i, &key) == 0 && key == NULL) |
83 | { | 83 | { |
84 | if (mu_address_sget_local_part (addr, i, &key) == 0 | 84 | if (mu_address_sget_local_part (addr, i, &key) || |
85 | && mh_alias_get_address (key, paddr, incl) == 0) | 85 | mh_alias_get_address (key, paddr, incl) == 0 || |
86 | /* Recreating address from local part adds the default | ||
87 | domain to it: */ | ||
88 | mu_address_create (&subaddr, key)) | ||
86 | continue; | 89 | continue; |
87 | } | 90 | } |
88 | 91 | else | |
92 | { | ||
89 | status = mu_address_get_nth (addr, i, &subaddr); | 93 | status = mu_address_get_nth (addr, i, &subaddr); |
90 | if (status) | 94 | if (status) |
91 | { | 95 | { |
... | @@ -93,7 +97,7 @@ mh_alias_expand (const char *str, mu_address_t *paddr, int *incl) | ... | @@ -93,7 +97,7 @@ mh_alias_expand (const char *str, mu_address_t *paddr, int *incl) |
93 | str, (unsigned long) i, mu_strerror (status)); | 97 | str, (unsigned long) i, mu_strerror (status)); |
94 | continue; | 98 | continue; |
95 | } | 99 | } |
96 | 100 | } | |
97 | mu_address_union (paddr, subaddr); | 101 | mu_address_union (paddr, subaddr); |
98 | mu_address_destroy (&subaddr); | 102 | mu_address_destroy (&subaddr); |
99 | } | 103 | } | ... | ... |
-
Please register or sign in to post a comment