procmail
[Top] [All Lists]

Re: remotely add text to a file

2001-08-14 05:04:08
* Luka Kladaric <lkladar(_at_)komoseva(_dot_)globalnet(_dot_)hr> [010814 06:35]:
Hi all y'all :))

I use a few variations of the following filter to perform spam filtering.

:1
? /bin/fgrep -i -f $PMDIR/crap-b.lst
{
        # EXITCODE = 77
        :0:$PMDIR/lock
        | /usr/bin/formail -A "X-Spam: yes - bounced - permission denied" >>
$DEFAULT
}

I was wondering if there was a way (or someone has a ready solution) to
remotely add a line into the files that the filters grep?

I often go on vacation where I don't have the ability to login to my account
where I run procmail (it requires SSH), but I recieve mails on my cell
phone. I can also send mails from my cell phone so it would be great if I
could filter out an email address, or any other marker by simply sending an
email to myself with the proper contents.

Sounds risky, but here's an idea.  Say you send yourself an email that
looks sort of like this:

    From: Me <me(_at_)some(_dot_)address>
    Subject: add to spam list
    [... other headers ...]

    spam_line_here

The recipe could work like this:

# add the first line from the body to spam word list
:0b:$PMDIR/lock
* ^From: Me <me(_at_)some\(_dot_)address>
* ^Subject: add to spam list
| sed -n 1p >>$PMDIR/crap-b.lst

Just an idea, untested..

-- 
- Matt Dunford <> zoot(_at_)zotikos(_dot_)com ..
-. www.zotikos.com -- o,;-
        
"I practice management by assumption."
  -- Landon Bradshaw, www.clanbradshaw.org
--
_______________________________________________
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>