#!/usr/ug/bin/perl5 # vim:fo=croql:cin:com=\:# # # Store a puff in an MH folder, whose name is passed in as the first # argument. # # Can be called from a gsubrc as follows: # # #!/bin/sh # # sample gsubrc for MH-style logging # # grcvstore gale # use POSIX; open(RCV, "| rcvstore +$ARGV[0]") || die "can't rcvstore +$ARGV[0]"; print RCV "Date: ", strftime("%x %X", localtime($ENV{'HEADER_TIME'})), "\n"; print RCV "From: ", $ENV{'GALE_SIGNED'}, "\n" if defined($ENV{'GALE_SIGNED'}); print RCV "To: ", $ENV{'GALE_ENCRYPTED'}, "\n" if defined($ENV{'GALE_ENCRYPTED'}); print RCV "Category: ", $ENV{'GALE_CATEGORY'}, "\n\n"; while () { print RCV $_; } close(RCV);