procmail
[Top] [All Lists]

Re: bouncing to a bunch of people . . .

2003-03-16 09:33:06
On 03/15/03 10:25 PM, David W. Tamkin sat at the `puter and typed:
Louis followed up,

| One question.  Sean, you recommended using a flat file to list the
| addresses, then use a
| ! `cat list.txt`
| mechanism to do the actual forward.  Will procmail care if the file is
| set up with one address per line?

I'm thinking no, but it will care about unquoted spaces in the middles of
addresses (such as if you include formal names).  Best thing is to try it out
for yourself.

If it turns out that having newlines between addresses causes a problem, you
can always end every line with <space><backslash> except the last, or to make
it easier to add or remove addresses, have <space><backslash> after every
address in the file and a blank line at the bottom.

Ok, this is what I came up with:

The .list file is formatted as follows:
address1(_at_)domain(_dot_)com \
address2(_at_)domain(_dot_)com \
address3(_at_)domain(_dot_)com

no trailing blank line.

The recipe is as folows:

:0
* FOLDER ?? ^^listfolder^^
{
  :0fhwc
  * ? formail -x From: -x Sender: -x Reply-To: -x Return-Path: -x \
      To: | grep -i -f /home/leblanc/.list
  ! `cat .list`
  :0E
  | formail -Y -f -A "X-Listproblem: Sender not in list"
}

Presumably, if the folder matches, the list is checked to see if the
senders address is in it.  If so, it should forward the message to the
whole list.

I've goofed something up here.  The problem is that I'm not in the
list, since I'm just allowing the original copy of the message to be
delivered to the listfolder mailbox.

Here comes a chicken and egg problem.  If I put my address in with the
+listfolder extension, it will continually loop, filling up the
mailbox of everyone in the list, but never getting to me.  If I simply
put my address without the extension, I need to use the c flag on the
recipe, but I'm closed out of the list and can't send to it.

Any ideas how I can fix this?

Thanks
Lou
-- 
Louis LeBlanc               leblanc(_at_)keyslapper(_dot_)org
Fully Funded Hobbyist, KeySlapper Extrordinaire :)
http://www.keyslapper.org                     ԿԬ

A transistor protected by a fast-acting fuse will protect the fuse by
blowing first.

_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail