procmail
[Top] [All Lists]

forwarding message to multiple recipients

2000-08-09 15:36:40
Greetings,

I'm new to the list and new to Procmail, so please excuse my simple problem.
I currently have an address in one of the domains that my company owns that
uses a .forward file to forward email to a list of recipients. I've been
concerned about the fact that there was no limitation as to who could send a
message to this address. Procmail, I discovered is one way to handle this.

I have a very simple recipe which I'll post in its entirety:

:0
* !^From.*(domain1|domain2|domain3).com
* !^X-Loop: myaddress(_at_)domain1
| (formail -rk \
-A "X-Loop: myaddress(_at_)domain1"; \
echo "Bug off!" ) | $SENDMAIL -oi -t

:0
! anotheraddress(_at_)domain1

Which, of course, replies with "Bug off!" to any sender outside of
domain1/2/3 (I know I'm just checking the From header field... more robust
verification is the next stage of the project, so I'm open to suggestions).
If the sender is in domain1, 2 or 3 then the message is forwarded to
anotheraddress(_at_)domain1(_dot_) What I'd like to do is replace the last line 
of this
recipe with a command that would feed a list of addresses from a text file
to the forward command.

According to the Procmail FAQ I can do this as follows:

! `address_list`

However, when I tried it with a text file containing the single
anotheraddress(_at_)domain residing in the same location as the .procmailrc file
it did not work. In the example in the FAQ the first line is a comment that
reads:

# The file $MAILDIR/addresses.txt contains the recipients, one per line

What path does the variable $MAILDIR point to? I haven't been able to find
where that variable is defined. What is this poor newbie missing?

Thank you in advance for any help.

-- 
Remo Del Bello


_______________________________________________
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>