diff options
-rw-r--r-- | Makefile.in | 2 | ||||
-rw-r--r-- | options.c | 11 | ||||
-rw-r--r-- | sink.c | 8 |
3 files changed, 11 insertions, 10 deletions
diff --git a/Makefile.in b/Makefile.in index 4ae6958e..98e86efd 100644 --- a/Makefile.in +++ b/Makefile.in @@ -4,7 +4,7 @@ # So just uncomment all the lines marked QNX. PACKAGE = fetchmail -VERSION = 4.7.4 +VERSION = 4.7.5 SUBDIRS = @INTLSUB@ @POSUB@ @@ -229,8 +229,9 @@ struct query *ctl; /* option record to be initialized */ */ int c; - int ocount = 0; /* count of destinations specified */ - int errflag = 0; /* TRUE when a syntax error is detected */ + int ocount = 0; /* count of destinations specified */ + int errflag = 0; /* TRUE when a syntax error is detected */ + int helpflag = 0; /* TRUE when option help was explicitly requested */ int option_index; char *buf, *cp; @@ -540,13 +541,13 @@ struct query *ctl; /* option record to be initialized */ case '?': case LA_HELP: default: - errflag++; + helpflag++; } } - if (errflag || ocount > 1) { + if (errflag || ocount > 1 || helpflag) { /* squawk if syntax errors were detected */ -#define P(s) fputs(s, stderr) +#define P(s) fputs(s, helpflag ? stdout : stderr) P(_("usage: fetchmail [options] [server ...]\n")); P(_(" Options are as follows:\n")); P(_(" -?, --help display this option help\n")); @@ -287,11 +287,11 @@ static int send_bouncemail(struct msgblk *msg, int userclass, report(stdout, 0, "SMTP: (bounce-message body)"); /* bouncemail headers */ - SockPrintf(sock, "Return-Path: <>"); - SockPrintf(sock, "From: FETCHMAIL-DAEMON@%s\r\n", fetchmailhost); - SockPrintf(sock, "To: %s\n", msg->return_path); + SockPrintf(sock, "Return-Path: <>\r\n"); + SockPrintf(sock, "From: %s\r\n", daemon_name); + SockPrintf(sock, "To: %s\r\n", msg->return_path); SockPrintf(sock, "MIME-Version: 1.0\r\n"); - SockPrintf(sock, "Content-Type: multipart/report; report-type=delivery-status; boundary=\"%s\"\r\n", boundary); + SockPrintf(sock, "Content-Type: multipart/report; report-type=delivery-status;\r\n\tboundary=\"%s\"\r\n", boundary); SockPrintf(sock, "\r\n"); SockPrintf(sock, "Content-Transfer-Encoding: 7bit\r\n"); SockPrintf(sock, "\r\n"); |