Errors-to: epmdf@YMIR.BITNET
X-Envelope-to: PMDF-L@IRLEARN.BITNET
X-VMS-To: IN%"robin_goldstone@macgate.csuchico.edu"
X-VMS-Cc: IPMDF
MIME-version: 1.0
Content-type: TEXT/PLAIN; CHARSET=US-ASCII
Content-transfer-encoding: 7BIT
Date:         Thu, 20 Aug 92 23:29:53 GMT
From:         "Daniel C. Newman" <DAN@INNOSOFT.COM>
Subject:      RE: deliver and 'vacation' processing
X-To:         robin_goldstone@macgate.csuchico.edu, IPMDF@YMIR
Newsgroups: bit.listserv.pmdf-l

> I have never used DELIVER before and I though I would experiment around with i
   t
> to set up a simple "vacation" process, such that whenever anyone sends mail to
> my account, they would get a message back saying I am on vacation.  My
> MAIL.DELIVERY looks like this:

> * * * A L DELIVER.LOG
> * * * A E @VACATION.COM
> * * * A D
>
> The first line is for debugging purposes. The second line invokes a DCL progra
   m
> which sends the vacation message back to the user.  The third line delivers th
   e
> message to the mailbox.
>
> I am having trouble with my VACATION.COM procedure.  All I want it to do is
> send a message back to the user.  It looks like this:
>
> $ MAIL VACATION.TXT 'FROM'
>
> The problem is the value of the symbol 'FROM' which DELIVER creates.  Accordin
   g
> to the DELIVER.LOG file, the symbol looks like this:
> $ FROM == "IN%""RGOLDSTONE@oavax.csuchico.edu""  ""Robin Goldstone"""
>
> When I try to do:
> $ MAIL VACATION.TXT 'FROM'
> I get the error:
> %DCL-W-MAXPARM, too many parameters - reenter command with fewer parameters
>  \"Robin Goldstone"\
>
> I know this is a quote problem.  If I do:
> $ mail vacation.txt "IN%""RGOLDSTONE@oavax.csuchico.edu""  ""Robin Goldstone""
   "
> it works fine.  So somewhere some quotes are getting stripped.  DCL and quotes
> always gives me fits.  Can someone tell me what is happening and how I can fix
> it?

You have to keep in mind that when a symbol is defined,

    $ from == "xxxx"

the outer set of quotes are not part of the symbol definition -- they're there
to quote the stuff being defined.  For example, in

    $ from = "abcd efg"

the actual vaue of the symbol is

      abcd efg

and not

      "abcd efg"

This is what is different between the commands

      $ MAIL VACATION.TXT 'FROM'

and
      $ MAIL VACATION.TXT "IN%""....."""


Now, what you actually want to use is the command

      $ MAIL VACATION.TXT "''QFROM'"

> Also, another problem.  The last line of MAIL.DELIVERY is:
> * * * A D
> which causes the message to be delivered "normally."  However, I noticed that
> the delivered message has a header on it.  I have the 'headeromit' keyword on
> my 'l' channel, but DELIVER seems to be ignoring this.  Is this a bug?

No, this is an intentional feature.  When DELIVER is invoked, the l channel
setting for headeromit / headerbottom is ignored.  This gives individual
users some say in how their message headers are handled.  If you want to
strip them, use the "O" action instead of "D".  (I think that is the correct
action; I'm on the road right now and will leave the checking to you.)

This is an important feature and is the only mechanism which allows users
to override the system management's decision to strip message headers.  It
also provides a means for indivudual users to strip headers if they wish to and
their system management doesn't want to.

By the way, be sure that your VACATION.COM keeps a record of addresses that
have been sent a vacation message to.  Use this list to then prevent sending
repeated messages to.  If you don't do this, then you can create some nasty
mailing loops whereby you keep on sending mail to a mailing list....

Dan
Comments: Gated by NETNEWS@AUVM.AMERICAN.EDU