procmail
[Top] [All Lists]

Split up outgoing autoreply file into separate emails?

1996-10-24 17:22:37
Hi, 

I've spent a few hours trying to find an archived message about this
particular problem.  The file that I've been sending out via autoreply has
grown considerably.  I've split the file up into chunks of about 50-60K,
and for folks whose mailboxes can handle large messages, I have set my
autoreply to cat the parts together and then send it out.

But some folks have mailboxes with message limits on them.  Is there any
way to send the parts out as separate messages, each labeled in the
Subject line as to what part it is, without requiring them to send
separate request messages?

Here is part of my .procmailrc file, which doesn't work:

:0 hfw
* ^Subject: .*send parts
* !^X-Loop: gaunt(_at_)emcee(_dot_)com
* !^Subject:.*Re:N
* !^Subject: send .*[/.]\.

{
  PATHNAME=$HOME/file_server/gresinet
  WHOFROM=`formail -xFrom:`

   IN.gresinet.txt
   
  : A
  | (/usr/local/bin/formail -ri "To: $WHOFROM" ;\
    -i "From: gresinet(_dot_)txt(_at_)emcee(_dot_)com" ;\
    -i "Subject: gresinet.txt, Part 1 of 13" ;\
    cat $PATHNAME/part.01  | $SENDMAIL -oi -t

  : A
  | (/usr/local/bin/formail -ri "To: $WHOFROM" ;\
    -i "From: gresinet(_dot_)txt(_at_)emcee(_dot_)com" ;\
    -i "Subject: gresinet.txt, Part 2 of 13" ;\
    cat $PATHNAME/part.02  | $SENDMAIL -oi -t
}  

I have about 12 or so parts to the file, so if there is a way to loop
through them, that would probably work better than hard-coding them.

The recipe that sends the whole file is at the end of my .procmailrc
file, and does work:

:0 c
* ^TOgresinet.txt
IN.gresinet.txt
: A
| (/usr/local/bin/formail -ri "From: gresinet(_dot_)txt(_at_)emcee(_dot_)com" ;\
 cat ~/file_server/gresinet/part.*) | \
$SENDMAIL -oi -t

I'm not on the procmail list, so please send replies to 
cgaunt(_at_)umich(_dot_)edu

Thanks!!
Chris

Christine Gaunt, cgaunt(_at_)umich(_dot_)edu
Campbell-L listowner (campbell-l(_at_)genealogy(_dot_)emcee(_dot_)com)
Co-compiler of Genealogy Resources on the Internet (web pages and file)
       Web:  http://www-personal.umich.edu/~cgaunt/gen_int1.html
       File (550K):  via autoreply from 
gresinet(_dot_)txt(_at_)genealogy(_dot_)emcee(_dot_)com




<Prev in Thread] Current Thread [Next in Thread>