aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2011-11-18 22:25:35 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2011-11-18 22:25:35 +0100
commit41fea01066539ed8e958c21591a5fe7155565ceb (patch)
treea4531fe81eaa3b1231ef810589477fcb323ba25e
parenta0bef7cc276476e69e2496e728bf97b32d3b561d (diff)
downloadbusybox-w32-41fea01066539ed8e958c21591a5fe7155565ceb.tar.gz
busybox-w32-41fea01066539ed8e958c21591a5fe7155565ceb.tar.bz2
busybox-w32-41fea01066539ed8e958c21591a5fe7155565ceb.zip
sendmail: stop doing -t unconditionally; makemime: generate 76 char base64 lines
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--mailutils/mail.c2
-rw-r--r--mailutils/sendmail.c22
2 files changed, 13 insertions, 11 deletions
diff --git a/mailutils/mail.c b/mailutils/mail.c
index f5260d9db..199f64407 100644
--- a/mailutils/mail.c
+++ b/mailutils/mail.c
@@ -119,7 +119,7 @@ static char* FAST_FUNC parse_url(char *url, char **user, char **pass)
119void FAST_FUNC encode_base64(char *fname, const char *text, const char *eol) 119void FAST_FUNC encode_base64(char *fname, const char *text, const char *eol)
120{ 120{
121 enum { 121 enum {
122 SRC_BUF_SIZE = 45, /* This *MUST* be a multiple of 3 */ 122 SRC_BUF_SIZE = 57, /* This *MUST* be a multiple of 3 */
123 DST_BUF_SIZE = 4 * ((SRC_BUF_SIZE + 2) / 3), 123 DST_BUF_SIZE = 4 * ((SRC_BUF_SIZE + 2) / 3),
124 }; 124 };
125#define src_buf text 125#define src_buf text
diff --git a/mailutils/sendmail.c b/mailutils/sendmail.c
index dbd491002..f96ca3291 100644
--- a/mailutils/sendmail.c
+++ b/mailutils/sendmail.c
@@ -281,17 +281,19 @@ int sendmail_main(int argc UNUSED_PARAM, char **argv)
281 281
282 // analyze headers 282 // analyze headers
283 // To: or Cc: headers add recipients 283 // To: or Cc: headers add recipients
284 if (0 == strncasecmp("To:", s, 3) || 0 == strncasecmp("Bcc:" + 1, s, 3)) { 284 if (opts & OPT_t) {
285 rcptto(sane_address(s+3)); 285 if (0 == strncasecmp("To:", s, 3) || 0 == strncasecmp("Bcc:" + 1, s, 3)) {
286 goto addheader; 286 rcptto(sane_address(s+3));
287 goto addheader;
288 }
289 // Bcc: header adds blind copy (hidden) recipient
290 if (0 == strncasecmp("Bcc:", s, 4)) {
291 rcptto(sane_address(s+4));
292 free(s);
293 continue; // N.B. Bcc: vanishes from headers!
294 }
287 } 295 }
288 // Bcc: header adds blind copy (hidden) recipient 296 if (strchr(s, ':') || (list && isspace(s))) {
289 if (0 == strncasecmp("Bcc:", s, 4)) {
290 rcptto(sane_address(s+4));
291 free(s);
292 // N.B. Bcc: vanishes from headers!
293 } else
294 if (strchr(s, ':') || (list && skip_whitespace(s) != s)) {
295 // other headers go verbatim 297 // other headers go verbatim
296 // N.B. RFC2822 2.2.3 "Long Header Fields" allows for headers to occupy several lines. 298 // N.B. RFC2822 2.2.3 "Long Header Fields" allows for headers to occupy several lines.
297 // Continuation is denoted by prefixing additional lines with whitespace(s). 299 // Continuation is denoted by prefixing additional lines with whitespace(s).