From: heiner@amross.cpr.sub.org (Heinrich Kordewiner)
Newsgroups: alt.sys.amiga.uucp
Subject: Re: Mail answering program wanted
Date: 21 Aug 92 21:30:23 GMT
Reply-To: heiner@amross.cpr.sub.org
Organization: Private
X-NewsSoftware: GRn 1.16e (7/4/92) by Mike Schwartz & Michael B. Smith

In article <overlord.09m4@megalith.miami.fl.us> overlord@megalith.miami.fl.us (Carlos Amezaga) writes:
> Quoted from <...unknown> by ralle@oberon.dinoco.de (Ralph Niere):
> > [...]
> > I'm looking for a program that answers my mail while I'm on vacation.
> > It should send a reply to each incoming mail including a short message
> > telling the sender of the original mail when I'll be back and so on.
> > [...]

> [ UUEcho-Solution deleted ]
>
> 	As you can see, I join text file called UUECHO.  This is the
> Original message the creater of the message sent me, except that the To:
> and From: headers have been reversed. [...]

There are few problems with this kind of automaticaly responding mail. First,
Your answer will allways contain the full original mail. Funny, if someone
sends You uuencoded megafiles? Next, there are possible mail-loops if two
such vacation-responding-systems start talking to each other. Let's hope, You
got a very bad link to Your mail-feed.  ;-)

But it's not a big deal, to make such a daemon by yourself. In Dillons
aliases-manual there is an example for setting up such a program:

|    mail may be piped to a command, such as an automated vacation-response
|    program:
|
|	dillon: \dillon, >uumail:archive, |vacation

This vacation-prog has to do few things: Parse the mail-header from stdin and get
"From:" and/or "Reply-To:"-Line, look if it is safe to reply (some kind of
daemon, "postmaster"?), take some/few lines from the message-body and do a
"sendmail" with these graped lines to the replyaddress.

I've written such a vacation-response-ARexx-daemon yesterday afternoon, when I
first read Ralph's question and have sent it to him via email. This script looks
for <env:vacation> to include its contents in the response and doesn't answer if
that thing is not at its place. So I only need to do a

<setenv vacation "I will be back on Saturday">

or

<unsetenv vacation>

when I'm back again and it is not required to modify "UuLib:aliases" every time.

I would have posted it to this group since it is only 150 lines ARexx. But: I
don't knew any solution for bang-only-paths (Is there any possiblity to determin
the use of bang or domainpaths? In my subdomain I get even flamed if I only
*think* of bangs...) and there should be more security for checking against
sending responses to daemons. What should be done with "Sender:"-only
headerlines? Should I look in "UuLib:aliases" if there is a 'true' user in the
"To:"-line? What's about checking against getting mail from mailinglists? How to
prevent the daemon from sending mail to cruel&cryptic gateways, should there be
even a look-up-dont-sent-table? Include all the header in the response or does
it look more nice to give the response a (pseudo) human touch? Any suggestions?
Maybe there even exists a much better prog in netland?

If someone wants to help me in improving my script please ask for it via email.


Bye

Heiner

P.S.: Please forgive my bad English, my spell-checker just moved to Wales and
Webster's Dictionary still isn't  available on CDROM   ;-)

--
H. Kordewiner, Schuetzenpfuhl 5, D-3572 Amoeneburg 3, heiner@amross.cpr.sub.org