diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2009-07-05 21:46:37 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2009-07-05 21:46:37 +0200 |
commit | 666e1d3978ebd2b72b18333f4face0e10cc816ba (patch) | |
tree | 05626b47c6a8a1a194b182baaabff1f587660508 /mailutils/mime.c | |
parent | fe4ef36bcd660598cac4bdb5f428b3f0bdbc3fa3 (diff) | |
download | busybox-w32-666e1d3978ebd2b72b18333f4face0e10cc816ba.tar.gz busybox-w32-666e1d3978ebd2b72b18333f4face0e10cc816ba.tar.bz2 busybox-w32-666e1d3978ebd2b72b18333f4face0e10cc816ba.zip |
tweak sendmail and makemime help texts
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to '')
-rw-r--r-- | mailutils/mime.c | 61 |
1 files changed, 59 insertions, 2 deletions
diff --git a/mailutils/mime.c b/mailutils/mime.c index d309d7f7f..358f4e903 100644 --- a/mailutils/mime.c +++ b/mailutils/mime.c | |||
@@ -35,12 +35,68 @@ Options: | |||
35 | -c auto to set Content-Type: to text/plain or | 35 | -c auto to set Content-Type: to text/plain or |
36 | application/octet-stream based on picked encoding. | 36 | application/octet-stream based on picked encoding. |
37 | -j file1 file2 - join mime section file2 to multipart section file1. | 37 | -j file1 file2 - join mime section file2 to multipart section file1. |
38 | -o file - write ther result to file, instead of stdout (not | 38 | -o file - write the result to file, instead of stdout (not |
39 | allowed in child processes). | 39 | allowed in child processes). |
40 | -a header - prepend an additional header to the output. | 40 | -a header - prepend an additional header to the output. |
41 | 41 | ||
42 | @file - read all of the above options from file, one option or | 42 | @file - read all of the above options from file, one option or |
43 | value on each line. | 43 | value on each line. |
44 | {which version of makemime is this? What do we support?} | ||
45 | */ | ||
46 | |||
47 | |||
48 | /* In busybox 1.15.0.svn, makemime generates output like this | ||
49 | * (empty lines are shown exactly!): | ||
50 | {headers added with -a HDR} | ||
51 | Mime-Version: 1.0 | ||
52 | Content-Type: multipart/mixed; boundary="24269534-2145583448-1655890676" | ||
53 | |||
54 | --24269534-2145583448-1655890676 | ||
55 | Content-Type: {set by -c, e.g. text/plain}; charset={set by -C, e.g. us-ascii} | ||
56 | Content-Disposition: inline; filename="A" | ||
57 | Content-Transfer-Encoding: base64 | ||
58 | |||
59 | ...file A contents... | ||
60 | --24269534-2145583448-1655890676 | ||
61 | Content-Type: {set by -c, e.g. text/plain}; charset={set by -C, e.g. us-ascii} | ||
62 | Content-Disposition: inline; filename="B" | ||
63 | Content-Transfer-Encoding: base64 | ||
64 | |||
65 | ...file B contents... | ||
66 | --24269534-2145583448-1655890676-- | ||
67 | |||
68 | */ | ||
69 | |||
70 | |||
71 | /* For reference: here is an example email to LKML which has | ||
72 | * 1st unnamed part (so it serves as an email body) | ||
73 | * and one attached file: | ||
74 | ...other headers... | ||
75 | Content-Type: multipart/mixed; boundary="=-tOfTf3byOS0vZgxEWcX+" | ||
76 | ...other headers... | ||
77 | Mime-Version: 1.0 | ||
78 | ...other headers... | ||
79 | |||
80 | |||
81 | --=-tOfTf3byOS0vZgxEWcX+ | ||
82 | Content-Type: text/plain | ||
83 | Content-Transfer-Encoding: 7bit | ||
84 | |||
85 | ...email text... | ||
86 | ...email text... | ||
87 | |||
88 | |||
89 | --=-tOfTf3byOS0vZgxEWcX+ | ||
90 | Content-Disposition: attachment; filename="xyz" | ||
91 | Content-Type: text/plain; name="xyz"; charset="UTF-8" | ||
92 | Content-Transfer-Encoding: 7bit | ||
93 | |||
94 | ...file contents... | ||
95 | ...file contents... | ||
96 | |||
97 | --=-tOfTf3byOS0vZgxEWcX+-- | ||
98 | |||
99 | ...random junk added by mailing list robots and such... | ||
44 | */ | 100 | */ |
45 | 101 | ||
46 | int makemime_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 102 | int makemime_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
@@ -86,7 +142,8 @@ int makemime_main(int argc UNUSED_PARAM, char **argv) | |||
86 | 142 | ||
87 | // make a random string -- it will delimit message parts | 143 | // make a random string -- it will delimit message parts |
88 | srand(monotonic_us()); | 144 | srand(monotonic_us()); |
89 | boundary = xasprintf("%d-%d-%d", rand(), rand(), rand()); | 145 | boundary = xasprintf("%u-%u-%u", |
146 | (unsigned)rand(), (unsigned)rand(), (unsigned)rand()); | ||
90 | 147 | ||
91 | // put multipart header | 148 | // put multipart header |
92 | printf( | 149 | printf( |