On Mon, Jun 14, 1999 at 10:48:47AM -0400, Dave Kitabjian wrote:

Your script has two big failings. It is not checking to see who the sender
is, and it is not setting the return path of the vacation message to null,
ie. <>.

Your user on holiday may receive bounces - they will have the SENDER
variable set to null. You cannot reply to such a message. Similarly, your
vacation messages must be sent out with a null sender, like this:

qmail-inject -f '' $SENDER <"$HOME/.holiday"

Doing these basic checks will at least make sure you don't start a series
of loops. Also, it is advisable for vacation scripts to check for a header
called "precedence:" in the message, and if it is present, and has the value
of "junk", "bulk" or "list" to NOT send vacation replies to these messages,
because the list owner will get them and it is irritating. There is also
the possibility of automatic unsubscription with some lists.

Anyway, why go to all this hassle. There are ready programs to do exactly
this for you - unix systems come built in with a vacation message, and
there's one available on www.qmail.org if you don't like the built-in
vacation program.

> I developed a script to support holiday messages. It appears to work very 
> nicely with one important exception (that I expected): if a person on 
> holiday sends a message to another person on holiday, they get an infinite 
> loop of holiday notifications to each other (thank God for quota 
> enforcement!)
> 
> Anyway, below is the guts of my script, which is pretty basic. So my 
> question to y'all is, what logic do other "holiday" algorithms employ to 
> prevent such looping? Could I make a more judicial choice of environment 
> variables to use for the sender and recipient? (I went to some length in 
> research to configure things so that a holiday message could be properly 
> "replied" to, but perhaps disabling this is inevitable?)
> 
> Thanks in advance!
> 
> Dave
> 
> -------------------------------------------------
> #!/bin/sh
> #
> # holiday.sh
> #
> # Dave Kitabjian, 6/11/99
> #   [EMAIL PROTECTED]
> #
> # This script should be entered into a user's .qmail file as |holiday.sh
> # It depends on the SENDER environment variable, provided by qmail-local;
> #   HOME and HOST are also used.
> # It permits delivery and replies with a message found in .holiday
> #
> 
> # Should be able to use $USER @ $HOST, but we using a single-uid
> # configuration of Qmail. HOST is okay, but USER must be pulled from
> # home directory:
> # (We don't use $LOCAL since we don't know where the username ends and
> #  the domain begins without hacking $HOME)
> QMAILUSER=`basename $HOME`   # used by qmail-inject to set "From:" header
> QMAILHOST=$HOST              # used by qmail-inject to set "From:" header
> export QMAILUSER
> export QMAILHOST
> 
> qmail-inject $SENDER <"$HOME/.holiday"
> 
> exit 0
> -------------------------------------------------

-- 
System Administrator
See complete headers for address, homepage and phone numbers

Reply via email to