procmail
[Top] [All Lists]

Re: sending mails to all members of a file except person who really send it

2001-08-31 09:12:15
On Wed, Aug 15, 2001 at 07:50:08AM -0700, niraj dave wrote:
Hi All there

what i exactly want is to sent bulk mail without usage
of alias file of sendmail

###########my .procmailrc ##########along with other
variables which are  not mentioned over
here################


TOADR=`formail -zx"To:"`
FRMADR=`formail -zx"From:"`
GFILE=/www/web1/mails/$TOADR

[...] *snip*

say i am mailing as

 To:  guys(_at_)group(_dot_)com   (name of one the $GFILE )
 From: 1(_at_)abc(_dot_)com        ( one the mail member under
/www/web1/mails/$GFILE)
 Subject: message from 1(_at_)abc(_dot_)com
 
 Message: this message should be forwarded to all
members
          of /www/web1/mails/guys(_at_)group(_dot_)com except to
1(_at_)abc(_dot_)com
          as he is the sender

If I'm understanding you correctly... (very untested)

TOADDR=`formail -zx"To:"`
GFILE=/www/web1/mails

# get all email addresses (which seem to be in a directory
# as filenames) and forward them.  But exclude the sender.
LIST=`ls $GFILE | sed "/$TOADDR/d"`
:0
! $LIST

-- 
- Matt Dunford <> zoot(_at_)zotikos(_dot_)com ..
-. www.zotikos.com -- o,;-
        
Dubya in his own words:
"Unfairly but truthfully, our party has been tagged as being against things.
Anti-immigrant, for example. And we're not a party of anti-immigrants.
Quite the opposite. We're a party that welcomes people."
   -Cleveland, July 1, 2000
--
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

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