procmail
[Top] [All Lists]

RE: --> reading multiple TO addresses from a file.

2000-09-15 10:51:22
I added $ and it works.  But it won't read from multiple line that I got in
myaddress.
 * $ ^TO`cat /etc/myaddress.txt`

It only works for the first line.

I also tried the entry in myaddress as
A B C
instead of
A
B
C

Actually, this is just my beginning testing as I'm new to procmail.  What
I'm trying to accomplish is to only allow mail FROM certain my domain to be
able to send to my "myaddress.txt" global lists (kind of for internal list
only without getting spam or mail from outsiders).  So if the mail is sent
to my list not from mydomain, then the mail will be either rejected or move
to a IN.junk folder.

This is what I got in mind in my /etc/procmailrc file?  And have my
.qmail-XX file to filter with | preline procmail

:0
* $ ^TO`cat /etc/myaddress.txt`
* ^From.*mydomain.com
$DEFAULT/IN.junk     #I set DEFAULT env for my default Maildir

What's the best way of implementing this?
I'm running Qmail with maildir on i386 Linux machine and procmail.

-WKrisman









-----Original Message-----
From: procmail-admin(_at_)Lists(_dot_)RWTH-Aachen(_dot_)DE
[mailto:procmail-admin(_at_)Lists(_dot_)RWTH-Aachen(_dot_)DE]On Behalf Of David 
W. Tamkin
Sent: Thursday, September 14, 2000 8:36 PM
To: procmail(_at_)Lists(_dot_)RWTH-Aachen(_dot_)DE
Subject: Re: --> reading multiple TO addresses from a file.


Widodo Krisman had this condition on a recipe:

K> * ^TO`cat /etc/myaddress.txt`

and Sean Straw wrote,

S> Further, this regexp should (unless I'm mistaken) be
S> preceded by $ so that the results are expanded and then interpreted (but
S> as I've not tried doing this, I don't know that for sure - I use $ for
S> variable expansions).

You weren't mistaken about that, Sean, and you can be sure.  The "$"
modifier
is necessary to get backquote expansion in a regular expression.  The
expres-
sion should be

 * $ ^TO`cat /etc/myaddress.txt`

or perhaps the same with ^TO_ instead of ^TO.


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


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