George Hansper asked,
| I've created a very simple mail-forwarder using procmail, with just
| two requirements:
|
| 1) The subject field should be modified to include a mailing-list tag
| ie:
| Subject: this is my subject -> Subject: TAG: this is my subject
|
| 2) There should be some indication to the recipients as to who's on
| the list. I know this is contrary to policy on 'public' mailing lists,
| but this is an internal mailing list.
| I'm currently using 'sed' to do (1) and 'formail' to do (2).
Either could do both.
| I've determined that it's "impossible" to use sed to do (2) within the
| .procmailrc
No, it isn't, but it's a pain in the rump, and it's much easier to do #1
with formail (even easier within a procmail rcfile) than to do #2 with sed
(inside or outside a procmail rcfile).
| Is there to some way to make 'formail' do (1) ?
Yes, since ...
| I'm running procmail 3.10 on SunOS 4.1.x, and here is
... your version of procmail is recent enough to include extraction.
| :0 fhw
| | sed -e 's(_at_)^Subject: @Subject: RPBS: @' | formail -i "Resent-To:
$RPBS_USERS"
:0fhw # Don't let multiple tags build up if "RPBS:" is already in there.
* ^Subject:(.*\>)?RPBS:
| formail -i "Resent-To: $RPBS_USERS"
:0Efhw # If there is a subject but it doesn't contain "RPBS:", add it.
* ^Subject:\/.*
| formail -I "Subject: RPBS: $MATCH" -i "Resent-To: $RPBS_USERS"
:0Efhw # If there is no subject line at all, put one in.
| formail -I "Subject: RBPS: (no incoming subject)" \
-i "Resent-To: $RPBS_USERS"