SCCS-vsn: usr.sbin/sendmail/src/main.c 1.3
SCCS-vsn: usr.sbin/sendmail/src/savemail.c 1.2
SCCS-vsn: usr.sbin/sendmail/src/sendmail.h 1.2
** return exit status).
** -ep (default) Print error messages
** normally.
** return exit status).
** -ep (default) Print error messages
** normally.
+** -ee Send BerkNet style errors. This
+** is equivalent to MailBack except
+** that it has gives zero return code
+** (unless there were errors during
+** returning). This used to be
+** "EchoBack", but you know how the old
+** software bounces.
** -m In group expansion, send to the
** sender also (stands for the Mail metoo
** option.
** -m In group expansion, send to the
** sender also (stands for the Mail metoo
** option.
char FromFlag; /* from person is explicitly specified */
char Debug; /* run in debug mode */
char MailBack; /* mail back response on error */
char FromFlag; /* from person is explicitly specified */
char Debug; /* run in debug mode */
char MailBack; /* mail back response on error */
-char EchoBack; /* echo the message on error */
+char BerkNet; /* called from BerkNet */
char WriteBack; /* write back response on error */
char HasXscrpt; /* if set, the transcript file exists */
char NoAlias; /* don't do aliasing */
char WriteBack; /* write back response on error */
char HasXscrpt; /* if set, the transcript file exists */
char NoAlias; /* don't do aliasing */
- case 'e': /* echo back */
- EchoBack++;
+ case 'e': /* do berknet error processing */
+ BerkNet++;
- ** If echoing the bad mail, do it.
- ** Output the transcript and a message saying that the
- ** message will be mailed back; then fall through to
- ** the MailBack case.
+ ** If called from Eric Schmidt's network, do special mailback.
+ ** Fundamentally, this is the mailback case except that
+ ** it returns an OK exit status (assuming the return
+ ** worked).
- if (EchoBack || WriteBack)
- xfile = fopen(Transcript, "r");
- if (xfile == NULL)
- syserr("Cannot open %s", Transcript);
- fflush(stdout);
- }
- else
- xfile = NULL;
-
- if (EchoBack)
- {
- while (fgets(buf, sizeof buf, xfile) != NULL)
- fputs(buf, stderr);
- fprintf(stderr, "\nThe unsent mail will be returned to you\n");
+ xfile = fopen(Transcript, "r");
+ if (xfile == NULL)
+ syserr("Cannot open %s", Transcript);
printf("\r\nMessage from %s\r\n", MY_NAME);
printf("Errors occurred while sending mail, transcript follows:\r\n");
while (fgets(buf, sizeof buf, xfile) && !ferror(stdout))
fputs(buf, stdout);
if (ferror(stdout))
syserr("savemail: stdout: write err");
printf("\r\nMessage from %s\r\n", MY_NAME);
printf("Errors occurred while sending mail, transcript follows:\r\n");
while (fgets(buf, sizeof buf, xfile) && !ferror(stdout))
fputs(buf, stdout);
if (ferror(stdout))
syserr("savemail: stdout: write err");
- if (xfile != NULL)
- fclose(xfile);
-
/*
** If mailing back, do it.
** Throw away all further output. Don't do aliases, since
/*
** If mailing back, do it.
** Throw away all further output. Don't do aliases, since
extern char FromFlag; /* if set, "From" person is explicit */
extern char Debug; /* if set, debugging info */
extern char MailBack; /* mail back response on error */
extern char FromFlag; /* if set, "From" person is explicit */
extern char Debug; /* if set, debugging info */
extern char MailBack; /* mail back response on error */
-extern char EchoBack; /* echo the message on error */
+extern char BerkNet; /* called from BerkNet */
extern char WriteBack; /* write back response on error */
extern char NoAlias; /* if set, don't do any aliasing */
extern char ForceMail; /* if set, mail even if already got a copy */
extern char WriteBack; /* write back response on error */
extern char NoAlias; /* if set, don't do any aliasing */
extern char ForceMail; /* if set, mail even if already got a copy */