Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 17 Apr 2001 11:33:21 -0400
From:      "Gerald T. Freymann" <freymann@eagle.ca>
To:        "Joel Dinel" <jdinel@touchtunes.com>
Cc:        <freebsd-questions@FreeBSD.ORG>
Subject:   Re: Procmail rule
Message-ID:  <01f301c0c753$bcd0fe00$0f01a8c0@phantom>
References:  <3ADC57A8.5B7210A3@touchtunes.com>

next in thread | previous in thread | raw e-mail | index | archive | help
> 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?01f301c0c753$bcd0fe00$0f01a8c0>