[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Smrsh and the vacation program



I just use procmail and cron and a couple scripts to do this task.

I setup a master file and a vacation file, which must be executable,
called .procmailrc.master:

<an empty file on my main mail system where I work>

and vacation.procmailrc:

SHELL=/bin/sh    # for other shells, this might need adjustment
:0 Whc: vacation.lock
    # Perform a quick check to see if the mail was addressed to us
    * $^To:.*\<$\LOGNAME\>
    # Don't reply to daemons and mailinglists
    * !^FROM_DAEMON
    # Mail loops are evil
    * !^X-Loop: karlp colubs com
    | formail -rD 8192 procmailrc.cache

   :0 ehc         # if the name was not in the cache
   | (formail -rI"Notice" \
   -A"X-Loop: karlp colubs com" ; \
   echo "This email was machine generated. Please Note:"; \
   echo " "; \
   echo "Your email has been delivered to my inbox, but"; \
   echo "I won't get it until later."; \
   echo "You see, I'm gone until REPLACETEXT ."; \
   echo " "; \
   echo "Sorry."; \
   echo " "; \
   echo "-- "; cat $HOME/.signature \
   ) | $SENDMAIL -oi -t


then I have a couple of shell scripts:

procmailrc.sh:
#!/bin/sh
cd
mv .promailrc.master .procmailrc

and

procmailrc.vacation.sh:

#!/bin/sh
cd
cat vacation.procmailrc >> .procmailrc

When I have vacation days scheduled, I just run crontab -e as myself and
put lines in (or actually just change the existing ones) that say:

0 0 20 12 * /home/karlp/bin/procmailrc.vacation.sh
0 0 23 12 * /home/karlp/bin/procmailrc.sh

As you can see from this, I took last December 20, 21 and 22 off, and
returned on the 23rd for one day before Christmas holiday.

When someone sends an email, they get a single response, their email
address is appended to a file called procmailrc.cache and then if they
send more emails, that file is checked and they aren't notified again.
When I return, I check procmailrc.cache and then delete it when I'm
satisfied I've looked at it long enough to know whether I care who emailed
me or not.

Hope this helps (and especially that I've included everything) and you can
make it work successfully as I have.

Karl L. Pearson
Senior Consulting Systems Analyst
Senior Consulting Database Analyst
karlp ourldsfamily com

On Wed, 21 Feb 2001, John Nelson wrote:


All,

I seem to have a problem with "smrsh" and the vacation program.  I
installed "vacation" under RH 6.2 using the RH RPM and created a SMRSH
directory with a symbolic link to the vacation program in /usr/adm/sm.bin.

Everytime I send mail to vacationing people though I keep getting a
message from sendmail that says "the vacation program is unavailable to
sendmail" (or something like that).

I can't think of anything else to set up though.  The problem seems to
manifest itself before even getting to the vacation program, but can't
understand why SMRSH would be unable to forward to
/usr/adm/sm.bin/vacation.

I notice that on RH6.2 SMRSH wants a "-c" argument.  Hope sendmail knows
its supposed to use that.

Any ideas?

 -- John

______________________________________________________________
John T. Nelson                   Lexonia Internet Services LLC
email: jnelson lexonia com       PO Box 9007
web:   http://www.lexonia.net/   McLean VA, 22102
______________________________________________________________



_______________________________________________
Redhat-install-list mailing list
Redhat-install-list redhat com
https://listman.redhat.com/mailman/listinfo/redhat-install-list





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]