Hello All,
This isn't so much as problem, as just asking for advice on
how to do something better.
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).
I've determined that it's "impossible" to use sed to do (2) within the
.procmailrc
Is there to some way to make 'formail' do (1) ?
I'm running procmail 3.10 on SunOS 4.1.x, and here is
# ~rpbs/.procmailrc file
#
# All e-mail to rpbs will have it's subject changed to:
#
# Subject: RPBS: <old_subject>
#
PATH=/bin:/usr/bin:/apps/cad/bin
LOGFILE=$HOME/procmail-log
RPBS_USERS=`ypcat group | gawk -F: '/^rpbs:/ {print $4}'`
:0 fhw
| sed -e 's(_at_)^Subject: @Subject: RPBS: @' | formail -i "Resent-To:
$RPBS_USERS"
:0
!$RPBS_USERS
######################################################################
Regards,
George Hansper
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
.__.
*--// \ Phone: +61-3 - 9301 2001 (Business Hours)
===== 9338 4831 (After Hours)
===== (+61) 015 826 905 (Mobile)
)--| \
o o o o -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
o o o o
o o o o e-mail: epagah(_at_)epa(_dot_)ericsson(_dot_)se memo:
EPA.EPAGAH
o o o o George_Hansper(_at_)apana(_dot_)org(_dot_)au
--------- WWW: http://daemon.apana.org.au/~ghansper/
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-