diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2002-04-18 00:49:30 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2002-04-18 00:49:30 +0000 |
commit | 3001c6f5135796bf49346dd969e8445342d2251b (patch) | |
tree | d710aec0cc173e2b9a67ff56f56f47a1f3b32bc0 /gnu/usr.sbin/sendmail/vacation | |
parent | 7bc62683b217ae48e11df50f14c39728b723a832 (diff) |
update to sendmail 8.12.3
Diffstat (limited to 'gnu/usr.sbin/sendmail/vacation')
-rw-r--r-- | gnu/usr.sbin/sendmail/vacation/vacation.1 | 67 | ||||
-rw-r--r-- | gnu/usr.sbin/sendmail/vacation/vacation.c | 15 |
2 files changed, 59 insertions, 23 deletions
diff --git a/gnu/usr.sbin/sendmail/vacation/vacation.1 b/gnu/usr.sbin/sendmail/vacation/vacation.1 index 66e9fe3b905..d94a6dda3e6 100644 --- a/gnu/usr.sbin/sendmail/vacation/vacation.1 +++ b/gnu/usr.sbin/sendmail/vacation/vacation.1 @@ -9,12 +9,12 @@ .\" the sendmail distribution. .\" .\" -.\" $Sendmail: vacation.1,v 8.26 2001/11/21 04:21:35 gshapiro Exp $ +.\" $Sendmail: vacation.1,v 8.29 2002/03/23 19:17:36 gshapiro Exp $ .\" -.TH VACATION 1 "$Date: 2002/01/14 03:21:41 $" +.TH VACATION 1 "$Date: 2002/04/18 00:49:29 $" .SH NAME vacation -\- return ``I am not here'' indication +\- E-mail auto-responder .SH SYNOPSIS .B vacation .RB [ \-a @@ -41,8 +41,14 @@ vacation .I login .SH DESCRIPTION .B Vacation -returns a message to the sender of a message telling them that you -are currently not reading your mail. The intended use is in a +returns a message, +.IR ~/.vacation.msg +by default, to the sender informing them that you are currently not +reading your mail. +The message is only sent to each sender once per reply interval (see +.B \-r +below). +The intended use is in a .I .forward file. For example, your .I .forward @@ -80,6 +86,9 @@ with incorrect arguments, or with non-existent .IR login s, are logged in the system log file, using syslog(8). +This should only be used on the command line, not in your +.I .forward +file. .TP .BI \-f " filename" Use @@ -97,11 +106,24 @@ Initialize the vacation database files. It should be used before you modify your .I .forward file. +This should only be used on the command line, not in your +.I .forward +file. .TP .B \-I Same as .B \-i (for backwards compatibility). +This should only be used on the command line, not in your +.I .forward +file. +.TP +.B \-l +List the content of the vacation database file including the address +and the associated time of the last auto-response to that address. +This should only be used on the command line, not in your +.I .forward +file. .TP .BI \-m " filename" Use @@ -112,10 +134,6 @@ Unless the .I filename starts with / it is relative to ~. .TP -.B \-l -List the content of the vacation database file including the address -and the associated time of the last auto-response to that address. -.TP .BI \-r " interval" Set the reply interval to .I interval @@ -124,6 +142,12 @@ An interval of ``0'' or ``infinite'' (actually, any non-numeric character) will never send more than one reply. +The +.B \-r +option should only be used when the vacation database is initialized +(see +.B \-i +above). .TP .BI \-s " address" Use @@ -144,13 +168,16 @@ The -f and -m options must be used to specify the database and message file since there is no home directory for the default settings for these options. .TP .B \-x -reads an exclusion list from stdin (one address per line). +Reads an exclusion list from stdin (one address per line). Mails coming from an address in this exclusion list won't get a reply by .BR vacation . It is possible to exclude complete domains by specifying ``@domain'' as element of the exclusion list. +This should only be used on the command line, not in your +.I .forward +file. .TP .B \-z Set the sender of the vacation message to @@ -159,6 +186,16 @@ instead of the user. This probably violates the RFCs since vacation messages are not required by a standards-track RFC to have a null reverse-path. .PP +.B Vacation +reads the first line from the standard input for a +UNIX +``From'' +line to determine the sender. +Sendmail(8) +includes this +``From'' +line automatically. +.PP No message will be sent unless .I login (or an @@ -213,16 +250,6 @@ I am on vacation until July 22. If you have something urgent, please contact Keith Bostic <bostic@CS.Berkeley.EDU>. --eric .fi -.PP -.B Vacation -reads the first line from the standard input for a -UNIX -``From'' -line to determine the sender. -Sendmail(8) -includes this -``From'' -line automatically. .SH FILES .TP 1.8i ~/.vacation.db diff --git a/gnu/usr.sbin/sendmail/vacation/vacation.c b/gnu/usr.sbin/sendmail/vacation/vacation.c index 50f5c0280a9..c2215314883 100644 --- a/gnu/usr.sbin/sendmail/vacation/vacation.c +++ b/gnu/usr.sbin/sendmail/vacation/vacation.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999-2001 Sendmail, Inc. and its suppliers. + * Copyright (c) 1999-2002 Sendmail, Inc. and its suppliers. * All rights reserved. * Copyright (c) 1983, 1987, 1993 * The Regents of the University of California. All rights reserved. @@ -20,7 +20,7 @@ SM_IDSTR(copyright, The Regents of the University of California. All rights reserved.\n\ Copyright (c) 1983 Eric P. Allman. All rights reserved.\n") -SM_IDSTR(id, "@(#)$Sendmail: vacation.c,v 8.131 2001/12/12 00:02:42 gshapiro Exp $") +SM_IDSTR(id, "@(#)$Sendmail: vacation.c,v 8.134 2002/03/01 20:45:00 ca Exp $") #include <ctype.h> @@ -319,7 +319,7 @@ main(argc, argv) SM_CF_OPT_T mbdbname; SM_MBDB_T user; - cfpath = getcfname(0, 0, SM_GET_SENDMAIL_CF, NULL); + cfpath = getcfname(0, 0, SM_GET_SENDMAIL_CF, cfpath); mbdbname.opt_name = "MailboxDatabase"; mbdbname.opt_val = "pw"; (void) sm_cf_getopt(cfpath, 1, &mbdbname); @@ -370,6 +370,15 @@ main(argc, argv) RunAsGid = user_info.smdbu_group_id = getegid(); sff |= SFF_OPENASROOT; } + if (getuid() == 0) + { + /* Allow root to initialize user's vacation databases */ + sff |= SFF_OPENASROOT|SFF_ROOTOK; + + /* ... safely */ + sff |= SFF_NOSLINK|SFF_NOHLINK|SFF_REGONLY; + } + result = smdb_open_database(&Db, dbfilename, O_CREAT|O_RDWR | (iflag ? O_TRUNC : 0), |