Home » Questions » Computers [ Ask a new question ]

How can I setup a reminder email tool via procmail?

How can I setup a reminder email tool via procmail?

I would like to be able to setup a reminder 'service' for myself so that I can schedule emails or text messages to be sent to my handheld when I can't get to an ssh client.

Asked by: Guest | Views: 158
Total answers/comments: 1
bert [Entry]

"Something like this in .procmailrc:

* ^From: me@example.com
* ^To: mycalendarservice@example.com
| somescript.pl

somescript.pl will get the mail on standard input, so you could parse it apart like this:

while (<>) {
/^Subject: (.*)/ and $cmd = $1;
/^./ and $body .= $_;
}
chmod $cmd;
open(OUT, ""| $cmd"") or die;
print OUT $body;
close OUT;

Be sure to make this safe from abuse."