procmail
[Top] [All Lists]

Problem with lists expansion

1997-04-29 04:28:00
Hello,
I whish to filter against a list of domains, using files founds on the
www.panix.com WEB server. Things are done this way:
- a file contains the list, one domain by line :
ispam.com
ispam.net
- a variable is initialised as 
CPDOM1=`cat $HOME/filters/cpdomains.1 | tr '\012' '|'`
whose output is (Solaris 2.5)
ispam.com|ispam.net|
(That is, the last character is also translated)

This is used within a rule :
:0: cyberpromo
* $^(From|To|Received|Reply-to|X-Sender|Sender):.*(${CPDOM1})
$TRASH
 
Doing the substitution, the last condition is empty, wich seems to matches
anything !
The procmail release is : v3.11pre3 1995/05/17
How could I avoid it ( I don't figure how to remove the last char from a
pipe) ? Does more recents version of procmail treat this last | followed
by nothing as something which could be ignored rather than a catchup 
rule ? 

Thanks in advance
Pascal A. Dupuis
--
K:      Cobalt's metal, hard and shining;
        Cobol's wordy and confining;
        KOBOLDS topple when you strike them;
        Don't feel bad, it's hard to like them.
                -- The Roguelet's ABC


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