[Raw Msg Headers][Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
vacation program
Hi,
I noticed that the vacation program replies to autoreplies (at least
for .54). After looking at the source, I think the following patch
should fix the problem.
In case you are wondering, I also removed a section of duplicate code:
Unless I missed something (which could be the case), the EX_USAGE+101
and EX_USAGE+102 cases are identical and I don't see why argc or
getenv("USER") would change between the two checks.
The patch also applies cleanly to 2.99.50s11, which is what I am using
right now...
-------------- cut here --------- 8< -----------------------------------
--- vacation.c.dist Thu Aug 17 16:44:10 2000
+++ vacation.c Tue Oct 10 14:57:34 2000
@@ -246,17 +246,6 @@
exit(EX_NOUSER);
}
- /* verify recipient argument */
-#ifdef ZMAILER
- if (argc == 0) {
- p = getenv("USER");
- if (p == NULL) {
- usrerr("Zmailer error: USER environment variable not set");
- exit(EX_USAGE+102);
- }
- }
-#endif /* ZMAILER */
-
#ifdef HAVE_NDBM_H
if (dblog)
db = dbm_open(VDB, O_RDWR | (iflag ? O_TRUNC|O_CREAT : 0),
@@ -610,6 +599,9 @@
register struct ignore *cur;
register int len;
register char *p;
+
+ if (strcmp(from, "<>") == 0)
+ return(1);
/*
* This is mildly amusing, and I'm not positive it's right; trying
-------------- cut here --------- 8< -----------------------------------
--
Ambrose C. Li <acli@mingpaoxpress.com>
EDP Section, Production Department Tel +1 416 321 0088 x272
Ming Pao Newspapers (Canada) Ltd. (Toronto) FAX +1 416 321 9663
1024D 945C 2CF7 001D 5F03 B026 375F C5CF A55C 9F10 8B0E