


RFL(1)                                                     RFL(1)


NNAAMMEE
       rfl - add messages to a storage digest

SSYYNNOOPPSSIISS
       rfl  [+dest-folder]  [msgs]  [-add  component [-add compo-
            nent...]]  [-inplace] [-noinplace] [-keep]  [-nokeep]
            [-query]  [-noquery]  [[-range  msgs]  OR  [-to msg]]
            [-src +src-folder] [-verbose] [-noverbose] [-help]

DDEESSCCRRIIPPTTIIOONN
       _r_f_l is a Perl script.  It reads the  message(s)  (default:
       current  message)  named on the command line from the cur-
       rent folder (or  another  folder,  if  you  name  it  with
       `-src').   _r_f_l  appends the message(s) to the last message
       with the same `Subject:' in the destination  folder.   The
       destination message will be changed into an RFC934-compat-
       ible digest format (if it isn't already) that you can feed
       to  _b_u_r_s_t(1) to get the individual messages back.  You can
       add more messages to the digest by  using  _r_f_l  again.   A
       special  `X-mhglue:' field is added to mark the digest; if
       you delete this field, _r_f_l won't recognize the digest.

       For example, this command:
              rfl 23 24 +foobar
       would read message 23 from the current  folder,  find  the
       last  message  with  the  same `Subject:' in the `+foobar'
       folder, and add it to the end.  Then, it will do the  same
       thing  for  message  24  (find  message with same subject,
       append message 24 to it).

       _r_f_l will edit the destination message  in  place,  so  any
       links  to it won't be broken.  If you use the `-noinplace'
       switch, _r_f_l will create a new message from a copy  of  the
       destination message.

       _r_f_l  always  tells  you  which  message  is being added to
       which.  The `-verbose' switch makes _r_f_l tell you more.

       The `-query' switch shows you a _s_c_a_n(1) list  of  messages
       in  the  destination  folder  and asks which one to append
       each message to.

       The program searches the destination  folder  starting  at
       the  last  (highest-numbered)  message.   By  default, _r_f_l
       checks the last 998 messages in  the  destination  folder.
       If  the  folder  has  a  lot  of messages, that can take a
       while.  So, if you use the `-range' switch (typically,  in
       your  MH  profile),  _r_f_l will only search those particular
       messages.  For example:
              rfl @sub -range last:20
       would check the last 20 messages in the  `@sub'  subfolder
       and add the current message from the current folder to the
       last     message that matches.  To give a  range  of  spe-
       cific  numbers, quote the argument (so the shell will pass



                              [mh.6]                            1





RFL(1)                                                     RFL(1)


       all of it as one argument).  For  instance,  to  make  _r_f_l
       search the previous 50 and next 50 messages:
              rfl -range "prev:50 next:50" ...
       If  _r_f_l  can't  find  a  matching  message (unless you use
       -query, of course), it skips the  message  and  tries  the
       next one (if any).

       You  can  also use `-to msg' to specify the exact destina-
       tion message (no subject searching).  This  is  handy  for
       adding  other  messages  to the current message (`cur') or
       when you know the exact message number (like `last').  For
       example,  to  add  the  last  2  messages from the current
       folder to the last message in `+reports':
              rfl -to last +reports last:2
       To add messages 1 and 5 from `+junk' to the  current  mes-
       sage in the current folder, type:
              rfl 1 5 -src +junk -to cur

       By default, _r_f_l copies all message headers into the digest
       body.  If you have a file  named  `rfl.skiphdrs'  in  your
       top-level  mail  directory,  _r_f_l  will not copy the fields
       listed there.  List the fields to skip, one per  line,  in
       the file.  You can also use _p_e_r_l-type (basically, _e_d-type)
       regular expressions in the file.  For  instance,  to  omit
       `Received:',  `Sender:',  and  any  `X-' fields, use these
       three lines (not indented):
              received
              sender
              x-.*

       By default, _r_f_l copies the `From:', `To:', and  `Subject:'
       fields  to  the  header  of  the  digest.  (It also adds a
       `Date:' field with the time the digest was  edited.)   The
       `-add'  switch names other fields to add.  For example, to
       add `Message-ID:' and `cc:' fields, use:
              rfl -add message-id -add cc ...
       Note: the same `-add' switches must be used every time you
       append  more messages to the digest.  Otherwise, the extra
       fields you `-add'ed before won't  be  copied  to  the  new
       digest.

       By default, _r_f_l uses _r_m_m(1) on the source message(s) after
       copying.  If you use the `-keep'  switch,  _r_f_l  won't  use
       _r_m_m.

       You  can  put  an  `rfl:'  field  in  your MH profile with
       default switches you want (like `-verbose').  And, as with
       most  MH  commands, you can make _r_f_l versions (links) with
       other names.  For  example,  to  simulate  the  old  _m_h_a_d_d
       script I used to have that adds other messages to the cur-
       rent message, I made a symbolic link named _m_h_a_d_d  pointing
       to _r_f_l.  Then I put this line in my MH profile:
              mhadd: -to cur
       Then I can use:



                              [mh.6]                            2





RFL(1)                                                     RFL(1)


              mhadd 23
       to  add  message  23  to  the current message.  (Note: the
       _r_f_l_._s_k_i_p_h_d_r_s file won't be used when you  call  _r_f_l  by  a
       different  name.   This is a feature.  Create another file
       -- here, for example, _m_h_a_d_d_._s_k_i_p_h_d_r_s -- or just  link  the
       other file to your original _r_f_l_._s_k_i_p_h_d_r_s.

DDIISSCCLLAAIIMMEERR ((SSIIGGHH))
       USE  THIS  CODE AT YOUR OWN RISK.  THE AUTHOR(S) CANNOT BE
       RESPONSIBLE FOR ANY PROBLEMS YOU HAVE WITH THE  SCRIPT  OR
       LIABLE  FOR  ANY DAMAGES THAT THIS SCRIPT CAUSES, DIRECTLY
       OR INDIRECTLY.  THE USER IS ASSUMED TO UNDERSTAND  MH  AND
       PERL  WELL  ENOUGH TO DECIDE WHETHER OR NOT THIS SCRIPT IS
       SUITABLE AND WILL WORK CORRECTLY.  ETC. ETC.

       This program is in the public domain.  If you  modify  it,
       please  add  comments to the code that mark your revisions
       clearly (so people will know that it  isn't  the  original
       _r_f_l).   Please also send me a copy of any changes you make
       so that I can think about folding them into a new release.

FFIILLEESS
       $MH or $HOME/.mh_profile      The user profile
       <mh-dir>/<prog>.skiphdrs      Header fields not to copy

PPRROOFFIILLEE CCOOMMPPOONNEENNTTSS
       Path:                 To determine the user's MH directory
       Current-Folder:       To find the default current folder

SSEEEE AALLSSOO
       _P_r_o_p_o_s_e_d _S_t_a_n_d_a_r_d _f_o_r _M_e_s_s_a_g_e _E_n_c_a_p_s_u_l_a_t_i_o_n (aka RFC-934),
       _p_e_r_l(1), _r_e_f_i_l_e(1), _b_u_r_s_t(1), _s_c_a_n(1), _r_m_m(1), _m_h_-_m_a_i_l(5).

CCOONNTTEEXXTT
       If `-src +folder' is given, it  will  become  the  current
       folder.

BBUUGGSS
       _m_h_p_a_t_h(1)  refuses  to  handle  folders with more than 998
       messages, so _r_f_l can't use a destination `-range' of  more
       than 998 messages.

       _r_f_l can't add an _r_f_l digest to another _r_f_l digest and keep
       the same digest format.

       With a command like `rfl 19 20', you can accidentally  add
       the  first message (19) to the second message (20) if they
       both have the same subject.  Then the second message can't
       be   added   to  anything  because  it's  an  _r_f_l  digest.
       Workaround (until _r_f_l can add  digests  to  digests):  use
       `-range "1-18 21-last"'.

       _r_f_l does lots of work to make the digest header have `Sub-
       ject:' fields without newlines or multiple spaces.  That's



                              [mh.6]                            3





RFL(1)                                                     RFL(1)


       because  _r_e_p_l(1)  formats  the  subjects  of  messages  it
       replies to in the same way.

       _r_f_l checks pathnames to be sure a message isn't  added  to
       itself.   But  that doesn't stop _r_f_l from adding a message
       to the message's own _l_i_n_k.

       Some coding is kind of ugly or inefficient.  (This  is  my
       first Perl script.)

       Prints informative messages without the `-verbose' switch.
       This is actually a feature...

AAUUTTHHOORR
       Jerry Peek.  I can't promise to support the  program,  but
       please  report  bugs to me, jpeek@jpeek.com... I'll fix them
       as soon as possible, with thanks.   Suggestions  are  wel-
       come, too!







































                              [mh.6]                            4


