procmail
[Top] [All Lists]

Re: Piping is not working properly

1998-05-28 12:05:58
On Wed, 27 May 1998, Paul Tomko wrote:


Hi,
      I have the following recipe setup for spam:

CONDITIONS
{
        :0ci:
        | /usr/lib/sendmail $FROM < /home/hurricane/tomko/spammers.txt

        :0ci:spammers.dat.lock
        | echo $FROM >> /usr1/digirati/www.tomkoinc.com/spammers.dat

        :0:
        spam
}

The idea being to throw an email back at them complaining about the
spam, write the sender into a killfile and throw the letter into
the spam folder (later /dev/null).


I removed the lock on the sendmail portion and now that appears to be
working. However, I still am having trouble getting the $FROM variable to
echo into my spammers data file. I am now getting a different error
though:

procmail: Executing " echo $FROM >>
/usr1/digirati/www.tomkoinc.com/spammers.dat"

/bin/sh: /usr1/digirati/www.tomkoinc.com/spammers.dat: cannot create

procmail: Program failure (1) of " echo $FROM >> 
/usr1/digirati/www.tomkoinc.com/spammers.dat"

Once again, this file is world readable and writeable, so this is a 
bizarre response.

Furthermore, in another recipe, I attempt to read this file to match on
spammer from lines using the following recipe:

:0:
* ? (formail -xFrom:) | fgrep -i -f $SPAMMERS
spam

Where $SPAMMERS is the spammer data file. I get an error saying that 
fgrep failed because it could not open the file. Why not? It's world
readable and writeable.

All of this works when I run procmail from the command line, but not on
actual mail.

Thanks for any help,
        Paul


| Paul Tomko                     | P.O. Box 1382               |
| President                      | Bolingbrook, Illinois 60440 |
| Tomko Consulting, Incorporated | (630) 759-8799              |
| tomko(_at_)xnet(_dot_)com                 | http://www.tomkoinc.com     |

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