From owner-freebsd-questions Tue Apr 17 8:30:41 2001 Delivered-To: freebsd-questions@freebsd.org Received: from marlo.eagle.ca (marlo.eagle.ca [209.167.16.10]) by hub.freebsd.org (Postfix) with ESMTP id 2F15037B422 for ; Tue, 17 Apr 2001 08:30:35 -0700 (PDT) (envelope-from freymann@eagle.ca) Received: from phantom (staff.eagle.ca [209.167.16.15]) by marlo.eagle.ca (8.11.0/8.11.0) with SMTP id f3HFVdK18817; Tue, 17 Apr 2001 11:31:40 -0400 (EDT) (envelope-from freymann@eagle.ca) Message-ID: <01f301c0c753$bcd0fe00$0f01a8c0@phantom> Reply-To: "Gerald T. Freymann" From: "Gerald T. Freymann" To: "Joel Dinel" Cc: References: <3ADC57A8.5B7210A3@touchtunes.com> Subject: Re: Procmail rule Date: Tue, 17 Apr 2001 11:33:21 -0400 Organization: eagle.ca MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > I'm looking for a very basic procmail rule that will reply to *every* > mail sent to a user with something like "Out of the office - back > monday". Awh, I found just the thing, and it's "smart" too! Set it up this way to start with.. go to /usr/home/luser create a file called "vacation.txt" with whatever you want sent back to the person who emails the luser, something like: ============start======== I am currently away until Monday when I'll return hung over and pale. Thank you, Joe Luser ==============stop============ create /usr/home/luser/.procmailrc ===start===== # Set to yes when debugging VERBOSE=no # Remove ## when debugging; set to no if you want minimal logging LOGABSTRACT=no # Replace $HOME/Msgs with your message directory # Pine uses $HOME/mail MAILDIR=$HOME/mail # Make sure this directory exists! # Directory for storing procmail-related files PMDIR=$HOME/Procmail # Put ## before LOGFILE if you want no logging (not recommended) LOGFILE=$PMDIR/log INCLUDERC=$PMDIR/procmail.rc =====stop==== Create a subdirectory called Procmail In this directory, create procmail.rc (/usr/home/luser/Procmail/procmail.rc) =============start=========== :0 Whc: vacation.lock # Perform a quick check to see if the mail was addressed to us * $^To:.*luser@yourdomain.com # Don't reply to daemons and mailinglists * !^FROM_DAEMON # Mail loops are evil * !^X-Loop: luser@yourdomain.com | formail -rD 8192 /usr/home/luser/Procmail/vacation.cache :0 eh # if the name was not in the cache | (formail -rI"Precedence: junk" \ -A"X-Loop: luser@yourdomain.com" ; \ cat $HOME/vacation.txt \ ) | $SENDMAIL -oi -t ==============stop============ I got this off a Procmail help page.... I think it was in here: http://www.uwasa.fi/~ts/info/proctips.html Enjoy! -Gerry To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message