procmail
[Top] [All Lists]

.procmail as a gateway!

1999-09-03 14:07:02

I have this procmailrc file running for user cgate:

SHELL=/bin/sh
PATH=$HOME/bin:/bin:/usr/bin:/usr/local/bin
VERBOSE=on
MAILDIR=$HOME/mail
DEFAULT=/var/spool/mail/cgate
FORMAIL=/usr/bin/formail
LOGFILE=/home/cgate/proc_log
SENDMAIL=/usr/sbin/sendmail
FROM=`$FORMAIL -rt -xFrom:`

:0 Wh: msgid.lock
| $FORMAIL -D 8192 $MAILDIR/msgid.cache

:0 fhw
| $FORMAIL -I "From " -a "From " 

:0
* ^Reply-To:(_dot_)*c(_at_)lunar-penguin(_dot_)com
{
:0 c
| $FORMAIL -i "From: cgate(_at_)moongroup(_dot_)com" -i "Reply-To: 
cgate(_at_)moongroup(_dot_)com "\
-a "X-Reply-To: $FROM"|\
$SENDMAIL -oi linuxCprogramming(_at_)listbot(_dot_)com 

:0
/dev/null
}

:0
* ^Reply-To(_dot_)*linuxCprogramming(_at_)listbot(_dot_)com
{
:0 c
| $FORMAIL -i "From: cgate(_at_)moongroup(_dot_)com" -i "Reply-To: 
cgate(_at_)moongroup(_dot_)com "\ 
-a "X-Reply-To: $FROM"|\
$SENDMAIL -oi c(_at_)lunar-penguin(_dot_)com 

:0
/dev/null
}

:0:
* ^.*
! chuck(_at_)moongroup(_dot_)com

There are two mailing lists we wanted to gate together so we used a "dummy"
account and this script... cgate is sub'd to both lists and this hack is indeed
working but I'd really like to improve it a bit without breaking it in the
process. Sadly... I haven't a clue where to start (and yes I've read the doc's
on formail, and man procmailex, man procmail, etc. etc. but when I try something
new it breaks the script and as it is in operation I'd rather not).

What I'd like to do is pass the original sender's From: address going either way
so that people will have a clue who sent the mail if it happened to come from
the gated list rather than from their "local" list. As it is now both lists can
only see a From: address of cgate(_at_)moongroup(_dot_)com if it's passed 
through the
gateway. It may be that we have to convert it to an X-Sender: or something like
that to keep mail from bouncing from the lists but if somebody has a
recommendation I'm all ears.

I'll appreciate any help greater than an RTFM... thanx! 

-- 
Chuck Mead, CTO, MoonGroup Consulting, Inc. <http://moongroup.com> 
Mail problems? Send "s-u-b-s-c-r-i-b-e mailhelp" (no quotes and no
hyphens) in the body of a message to 
mailhelp-request(_at_)moongroup(_dot_)com(_dot_)
                              


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