procmail
[Top] [All Lists]

RE: remotely add text to a file

2001-08-14 08:44:20
| -----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: Tuesday, August 14, 2001 3:09 PM
| To: procmail-users(_at_)procmail(_dot_)org
| Subject: Re: remotely add text to a file
|
|
| Matt suggested to Luka,
|
| | # 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..
|
| Looks good; I'd modify it, though, to allow more than one new address per
| message and to let sed exit when the lines to be added end.
|
|   # add lines from top of body to spam word list
|   :0bi: # let procmail name the local lockfile; `i' to let sed exit early
|   * ^From: Me <me(_at_)some\(_dot_)address>
|   * ^Subject: add to spam list
|   | sed -ne/^$/q -ep >> $PMDIR/crap-b.lst
|
| There is a risk that someone else will fake a message from you to
| mess with
| your word list, but you are just marking such messages and not discarding
| them, so no damage could result from that.  Even so, you might want to
| consider adding a password to the conditions.

I was thinking along the lines of having a file called 'passwd' in $PMDIR,
then replacing your
* ^From: Me <me(_at_)some\(_dot_)address>
with
* ^TO_<me>+`cat $PMDIR/passwd`@<localhost>

And adding another rule thet lets you remotely change the password (provided
you know the current password).

I really want to be able to send commands to this thingie from EVERYWHERE...
I can change the password from my cellphone to preserve some level of
security.

Thanks to everyone who sent their suggestions, I will have a whack at it and
send in the results. Comments are still welcome.

Luka

* Luka Kladaric * mailto:lkladar+mail(_at_)komoseva(_dot_)globalnet(_dot_)hr *
* http://luka.kladaric.net * ICQ: 100757909 *
* GSM: +38598473999 * Ph: +38516551701 *
* Too many freaks, not enough circuses *

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