sendmail: stop doing -t unconditionally; makemime: generate 76 char base64 lines
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
parent
a0bef7cc27
commit
41fea01066
@ -119,7 +119,7 @@ static char* FAST_FUNC parse_url(char *url, char **user, char **pass)
|
|||||||
void FAST_FUNC encode_base64(char *fname, const char *text, const char *eol)
|
void FAST_FUNC encode_base64(char *fname, const char *text, const char *eol)
|
||||||
{
|
{
|
||||||
enum {
|
enum {
|
||||||
SRC_BUF_SIZE = 45, /* This *MUST* be a multiple of 3 */
|
SRC_BUF_SIZE = 57, /* This *MUST* be a multiple of 3 */
|
||||||
DST_BUF_SIZE = 4 * ((SRC_BUF_SIZE + 2) / 3),
|
DST_BUF_SIZE = 4 * ((SRC_BUF_SIZE + 2) / 3),
|
||||||
};
|
};
|
||||||
#define src_buf text
|
#define src_buf text
|
||||||
|
@ -281,6 +281,7 @@ int sendmail_main(int argc UNUSED_PARAM, char **argv)
|
|||||||
|
|
||||||
// analyze headers
|
// analyze headers
|
||||||
// To: or Cc: headers add recipients
|
// To: or Cc: headers add recipients
|
||||||
|
if (opts & OPT_t) {
|
||||||
if (0 == strncasecmp("To:", s, 3) || 0 == strncasecmp("Bcc:" + 1, s, 3)) {
|
if (0 == strncasecmp("To:", s, 3) || 0 == strncasecmp("Bcc:" + 1, s, 3)) {
|
||||||
rcptto(sane_address(s+3));
|
rcptto(sane_address(s+3));
|
||||||
goto addheader;
|
goto addheader;
|
||||||
@ -289,9 +290,10 @@ int sendmail_main(int argc UNUSED_PARAM, char **argv)
|
|||||||
if (0 == strncasecmp("Bcc:", s, 4)) {
|
if (0 == strncasecmp("Bcc:", s, 4)) {
|
||||||
rcptto(sane_address(s+4));
|
rcptto(sane_address(s+4));
|
||||||
free(s);
|
free(s);
|
||||||
// N.B. Bcc: vanishes from headers!
|
continue; // N.B. Bcc: vanishes from headers!
|
||||||
} else
|
}
|
||||||
if (strchr(s, ':') || (list && skip_whitespace(s) != s)) {
|
}
|
||||||
|
if (strchr(s, ':') || (list && isspace(s))) {
|
||||||
// other headers go verbatim
|
// other headers go verbatim
|
||||||
// N.B. RFC2822 2.2.3 "Long Header Fields" allows for headers to occupy several lines.
|
// N.B. RFC2822 2.2.3 "Long Header Fields" allows for headers to occupy several lines.
|
||||||
// Continuation is denoted by prefixing additional lines with whitespace(s).
|
// Continuation is denoted by prefixing additional lines with whitespace(s).
|
||||||
|
Loading…
x
Reference in New Issue
Block a user