I'm way too tired to include the explanation, so here's an answer for Greg:
| I ended this mail loop by trying things like:
|
| :0
| | cat Mail/$GROUP/$PARTNER_ID | formail -s formail -k
| -XSubject: -I "X-Loop: penpals-anonymous" -XX-Loop: -I
| "From: penpals-anonymous" -XFrom: -I "To: $SENDER_ADDRESS"
| -XTo: | $SENDMAIL $SENDMAILFLAGS $SENDER_ADDRESS
|
| :0
| | formail -s formail -k -XSubject: -I "X-Loop:
| penpals-anonymous" -XX-Loop: -I "From: penpals-anonymous"
| -XFrom: -I "To: $SENDER_ADDRESS" -XTo: | $SENDMAIL
| $SENDMAILFLAGS $SENDER_ADDRESS < Mail/$GROUP/$PARTNER_ID
|
|
| These are sending out the mail in the folder, but all as one
| mail. That is, the formail -s flag does not seem to be dividing
| up the emails in Mail/$GROUP/$PARTNER_ID being sent out on STDIN
| by cat or the redirection operator. They are all being sent
| as one mail.
It is, but you're undoing it by piping the output to $SENDMAIL instead of
letting formail -s invoke $SENDMAIL, and you don't need the double formail
call either, because formail -s can change header lines on every component
message that it splits out.
One other thing: X-Loop: headers should be added with -A, not with -I nor -i.
You can't predict what other people's loop detectors the message may have
gone through before it reaches you, and it is rude to clobber others' X-Loop:
headers in case somehow the message gets back to a previous recipient yet
again. Consider the case where two autoresponders are in a loop: if each
removes the other's X-Loop:, the loop will never end, but if each respects
the other's X-Loop:, the loop will be stopped before it causes trouble.
:0
| formail -k -XSubject: -A "X-Loop: penpals-anonymous" -XX-Loop: \
-I "From: penpals-anonymous" -XFrom: -I "To: $SENDER_ADDRESS" -XTo: -ds \
$SENDMAIL $SENDMAILFLAGS "$SENDER_ADDRESS" < Mail/$GROUP/$PARTNER_ID
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail