[comp.mail.elm] Problems with elm 'print' command

jrt@PacBell.COM (John Trinterud) (12/15/89)

Perhaps this group can assist me in an elm [bug/feature] on the
print command. (Take pity on me, I'm a new elm user, and new to
this group :-) )

Environment is a Compaq 25MHZ machine running ISC UNIX, ksh is standard shell
(/bin/sh is ksh)

I use 'calendar' (/usr/bin/calendar) as delivered, box stock SYS V. A typical
entry in my home directory calendar file might look like:

12/14/89	Meeting on MSAP at 1000

Calendar (calendar -) runs via root's cron every night, resulting in mail
that looks like (when displayed)

--------------------

From root Thurs Dec 14 01:00 PST 1989
[one blank line]
12/14/89	Meeting on MSAP at 1000

--------------------

OK so far...

Now, type 'p' for print, and I get two lines:

--------------------

From: root
Date: Thu Dec 14 01:00 PST 1989

and no message!!

--------------------

We've played with this for several days, finally took the brute force approach
and changed the /usr/bin/calendar program to read

/usr/lbin/elm -s "calendar reminder" ${_user} < /tmp/calendar.$$

and it works, with elm adding all sorts of header lines to each message.

You can also get mail messages from uuto (telling you a file has arrived)
to fail in the same way. Since calendar and uuto seem to have /bin/mail
'coded' into them, do we have an incompatibility between elm and /bin/mail
headers??

My elmrc file has:

print = cat %s | lp -dps
weed = ON
weedout = "To:" "Status:" "Path:" "Received:" "Date"
          "Message-Id" "*end-of-user-headers"


Hope I've explained this correctly, anyone have any ideas??

PS: BTW, why does 'weedout' only work to the screen? Seems if you don't
want to see it, you wouldn't want to save these header lines to a
mail file either??



Thanks for any assistance

John Trinterud
-- 
         jrt@PacBell.COM            "If you want to feel really kneaded, and
   {backbones}!pacbell!pt06a!john    love to roll in the dough, make bread !"

les@chinet.chi.il.us (Leslie Mikesell) (12/16/89)

In article <6572@pbhyf.PacBell.COM> jrt@PacBell.COM (John Trinterud) writes:

>Now, type 'p' for print, and I get two lines:

>From: root
>Date: Thu Dec 14 01:00 PST 1989
>
>and no message!!
>

I complained about this a long time ago, and I'm sure everyone who tries
to print things sent from stock sysV mail has had the same thing happen
to them.  The problem is that (a) standard sysV mail doesn't use or
require any header lines, and (b) Elm and readmsg (which is used to
print) use a different method to determine the end of the headers.
Thus, readmsg decides that there is nothing below the headers that
it is supposed to remove (i.e. no blank line separating header an
body), and tosses the whole thing.  Of course by the time you notice
that there is nothing on the printout, you have deleted the message.
Personally, I think Elm should generate the printout directly, so that
you would be assured of getting the same thing as the screen display.

Les Mikesell
  les@chinet.chi.il.us

syd@DSI.COM (Syd Weinstein) (12/16/89)

jrt@PacBell.COM (John Trinterud) writes:
>Calendar (calendar -) runs via root's cron every night, resulting in mail
>that looks like (when displayed)

>From root Thurs Dec 14 01:00 PST 1989
>[one blank line]
>12/14/89	Meeting on MSAP at 1000

>Now, type 'p' for print, and I get two lines:
>From: root
>Date: Thu Dec 14 01:00 PST 1989

The problem is in that version of /bin/mail.  It is not putting
the proper blank line after the headers.  I workaround was done
in 2.2 to solve that problem.  If you are still running 2.1, upgrade
to 2.2, if this is occurring in 2.2, send me the mailbox to see.
-- 
=====================================================================
Sydney S. Weinstein, CDP, CCP                   Elm Coordinator
Datacomp Systems, Inc.				Voice: (215) 947-9900
syd@DSI.COM or {bpa,vu-vlsi}!dsinc!syd	        FAX:   (215) 938-0235

tim@comcon.UUCP (Tim Brown) (12/17/89)

Why not just press '|' and then enter "lp -dwherever"?

Tim Brown                           |
Computer Connection                 |
(attmail or uunet)!comcon!tim       |