=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/vacation/vacation.c,v retrieving revision 1.24 retrieving revision 1.25 diff -c -r1.24 -r1.25 *** src/usr.bin/vacation/vacation.c 2006/08/14 15:49:28 1.24 --- src/usr.bin/vacation/vacation.c 2007/02/23 15:18:59 1.25 *************** *** 1,4 **** ! /* $OpenBSD: vacation.c,v 1.24 2006/08/14 15:49:28 millert Exp $ */ /* $NetBSD: vacation.c,v 1.7 1995/04/29 05:58:27 cgd Exp $ */ /* --- 1,4 ---- ! /* $OpenBSD: vacation.c,v 1.25 2007/02/23 15:18:59 deraadt Exp $ */ /* $NetBSD: vacation.c,v 1.7 1995/04/29 05:58:27 cgd Exp $ */ /* *************** *** 40,46 **** #if 0 static char sccsid[] = "@(#)vacation.c 8.2 (Berkeley) 1/26/94"; #endif ! static char rcsid[] = "$OpenBSD: vacation.c,v 1.24 2006/08/14 15:49:28 millert Exp $"; #endif /* not lint */ /* --- 40,46 ---- #if 0 static char sccsid[] = "@(#)vacation.c 8.2 (Berkeley) 1/26/94"; #endif ! static char rcsid[] = "$OpenBSD: vacation.c,v 1.25 2007/02/23 15:18:59 deraadt Exp $"; #endif /* not lint */ /* *************** *** 206,211 **** --- 206,229 ---- cont = tome = 0; while (fgets(buf, sizeof(buf), stdin) && *buf != '\n') switch (*buf) { + case 'A': /* "Auto-Submitted:" */ + case 'a': + cont = 0; + if (strncasecmp(buf, "Auto-Submitted:", 15)) + break; + for (p = buf + 15; *p && isspace(*p); ++p) + ; + /* + * RFC 3834 section 2: + * Automatic responses SHOULD NOT be issued in response + * to any message which contains an Auto-Submitted + * header where the field has any value other than "no". + */ + if (!*p) + exit(0); + if (strncasecmp(p, "no", 2)) + exit(0); + break; case 'F': /* "From " */ case 'f': cont = 0; *************** *** 242,254 **** case 'P': /* "Precedence:" */ case 'p': cont = 0; ! if (strncasecmp(buf, "Precedence", 10) || ! (buf[10] != ':' && buf[10] != ' ' && ! buf[10] != '\t')) break; ! if (!(p = strchr(buf, ':'))) ! break; ! while (*++p && isspace(*p)) ; if (!*p) break; --- 260,268 ---- case 'P': /* "Precedence:" */ case 'p': cont = 0; ! if (strncasecmp(buf, "Precedence:", 11)) break; ! for (p = buf + 11; *p && isspace(*p); ++p) ; if (!*p) break;