home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / mail / mh / 1490 < prev    next >
Encoding:
Internet Message Format  |  1993-01-11  |  2.1 KB

  1. Path: sparky!uunet!autodesk!dansmith
  2. From: dansmith@Autodesk.COM (Daniel Louis Smith)
  3. Newsgroups: comp.mail.mh
  4. Subject: linking Fcc: files?
  5. Summary: saving to more than one file, can I link?
  6. Message-ID: <18363@autodesk.COM>
  7. Date: 12 Jan 93 01:09:34 GMT
  8. Organization: Autodesk Inc., Sausalito CA, USA
  9. Lines: 69
  10.  
  11.  
  12.     Hi, I've figured out how I may have a new Fcc: file each day
  13. (see script) below.  I'll generate new components and replcomps
  14. files each night.  I have two questions:
  15.  
  16.     * If I am replying to joe@somewhere.com, how can I strip
  17.     the "@somewhere.com" so that I can Fcc: to "joe"?  In mush
  18.     this is "cmd sa  save -a +".
  19.  
  20.     * If I am Fcc'ing more than one file (chronologically and by person),
  21.     how may I have them be links instead of two files (inodes...)?
  22.  
  23.     Here's my script that I'll be running nightly:
  24.  
  25.  
  26. #!/usr/bin/perl
  27. #
  28. #    makecomp - update my mh comp file template
  29. #    dansmith@autodesk.com, January 1993
  30.  
  31. require <ctime.pl>;
  32. $Date = &ctime(time);
  33.  
  34. ($i, $month, $day, $i, $year) = split(' ', &ctime(time));
  35.  
  36. open (COMP_FILE, "> /home/dansmith/text/Mail/components") ||
  37.     die "gee..can't update components file!\n";
  38.  
  39. #    updates go here...
  40. print COMP_FILE <<"EOF";
  41. To: 
  42. cc:
  43. Subject:
  44. X-Organization: Autodesk, Sausalito, CA
  45. Fcc: $year/$month/$day
  46. --------
  47.  
  48. EOF
  49.  
  50. close COMP_FILE;
  51.  
  52. #    and now, generate a custom replcomps file...
  53.  
  54.  
  55. open (COMP_FILE, "> /home/dansmith/text/Mail/replcomps") ||
  56.     die "gee..can't update replcomps file!\n";
  57.  
  58. #    updates go here... (this is just the standard replcomp with added '\'s)
  59. print COMP_FILE <<"EOF";
  60. %(lit)%(formataddr %<{reply-to}%|%<{from}%|%<{sender}%|%<{return-path}%>%>%>%>)\\
  61. %<(nonnull)%(void(width))%(putaddr To: )\\n%>\\
  62. %(lit)%(formataddr{to})%(formataddr{cc})%(formataddr(me))\\
  63. %<(nonnull)%(void(width))%(putaddr cc: )\\n%>\\
  64. Fcc: $year/$month/$day %{from} \\n\\
  65. %<{subject}Subject: Re: %{subject}\\n%>\\
  66. %<{date}In-reply-to: Your message of "\\
  67. %<(nodate{date})%{date}%|%(pretty{date})%>."%<{message-id}
  68.              %{message-id}%>\\n%>\\
  69. --------
  70.  
  71. EOF
  72.  
  73. close COMP_FILE
  74.  
  75.  
  76.                 Daniel
  77. -- 
  78.  dansmith@autodesk.com       daniel@world.std.com       dansmith@well.sf.ca.us
  79.         Daniel Smith, Autodesk, Sausalito, California, (415) 332-2344 x 2580
  80.