1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214
|
# pm-janetmind.rc -- handle http://minder.netmind.com/ messages
#
# File id
#
# Copyright (C) 1997-2010 Jari Aalto
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 2 of the
# License, or (at your option) any later version
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details at
# <http://www.gnu.org/copyleft/gpl.html>.
#
# Description
#
# ** THIS MODULE IS OBSOLETE. THE NETMIND SERVICE NO LONGER EXISTS **
#
# http://minder.netmind.com/
#
# ...Netmind, or The URL-minder is a free, automatic Web-surfing robot
# that keeps track of changes to Web pages that are important to you.
# When the URL-minder detects changes in any of the Web pages you
# have registered, it sends you e-mail. an effective way to test if
# the address is known to Internet. You could use this information to
# see if some automated reply to a address can be sent.
#
#
# In another words, if you're interested in some URL; say an FAQ page
# and any updates to them, you can tell Netmind to monitor the page
# changes for you and it send a message back every time page changes.
#
# This recipe "pretty formats" the announcement sent by Netmind
# by stripping the message to bare minimum. You usually aren't interested
# in 4k message which includes "Note from our sponsors", "Try the free
# online demo" etc. The things saved from the announcement message are:
#
# o The changed url, which is moved to subject
# o Cancellation url pointer
# o url to the lists of your monitored urls
# o your id number
#
# [Note]
#
# Please let Netmind send you one "pure" message first so that you
# have a huch what it originally looks like. Then plug int his module
# and see how the original message is reduced.
#
# [Thank you]
#
# The Doctor What <docwhat@holtje-christian-isdn.mis.tandem.com>
# 1998-03-12 send me a patch, where a)body message is more informative
# b) URL is now included in the body for auto-click browsers c)
# mime headers were removed.
#
# Required settings
#
# PMSRC must point to source directory of procmail code. This subroutine
# will include
#
# o pm-javar.rc
# o If you se variable JA_NETMIND_SUBJECT to "yes", then the changed
# url http pointer is put to subject line.
#
# Usage example
#
# INCLUDERC = $PMSRC/pm-janetmind.rc # reformat the message
#
# :0: # drop to folder
# * netmind
# url.mbox
#
# Change Log (none)
# .................................................... &initialising ...
id = "pm-janetmind.rc"
dummy = "
========================================================================
$id: init:
"
:0
* ! WSPC ?? ( )
{
INCLUDERC = $PMSRC/pm-javar.rc
}
# Are we allowed to change the Subject?
JA_NETMIND_SUBJECT = ${JA_NETMIND_SUBJECT:-"no"}
# ........................................................... &do-it ...
# catch both "From" and "From:" header lines
:0
* ^From.*netmind\.
{
# ............................................... change subject ...
# Get the changed page and put it into subject line: you see immediate
# what page has changed when you browse your mailbox summary.
subject = ""
:0
*$ ^Subject:\/.*
*$ MATCH ?? ()\/$a.*
{
subject = $MATCH
}
:0
*$ 1^1 B ?? new changes in:$SPCL+\/.*
*$ 1^1 B ?? changed page, +visit:($)\/.*
*$ MATCH ?? ()\/$a.*
{
TheUrl = $MATCH
:0 fhw
* JA_NETMIND_SUBJECT ?? yes
| $FORMAIL -I "Subject: $MATCH"
}
# .................................................. change body ...
# The message from URL-minder is roughly 4k and lot of the information
# is useless. There is "note from out sponsor", how to stop requesting
# messages etc.
# To retrieve the password
pass = ""
:0
* B ?? ()\/http.*netmind.*responder.*
{
pass = $MATCH
}
# To update your account visit
update = ""
:0
*$ B ?? ().*update.*account.*($)\/.*
{
update = $MATCH
}
# Save the cancel information
cancel = ""
:0
*$ B ?? ^To$s+cancel.*this.*($)\/.*
{
cancel = $MATCH
}
# Save "NetMind List" pointer: list of monitored urls
cancelAll = ""
:0
*$ B ?? ^To$s+cancel.*all.*($)\/.*
{
cancelAll = $MATCH
}
# .......................................................... body ...
# modify the body only if we got enough matches
dummy = "$id: changing message contents"
:0
* update ?? [a-z]
* cancel ?? [a-z]
* cancelAll ?? [a-z]
{
# Remove the mime headers, the message is no longer MIME.
:0 fhw
| $FORMAIL -I "Content-Type:" -I "Mime-Version:"
# Avoid multiple echo commands and put message into one string
msg = "Subject : $subject${NL}Changed : $TheUrl${NL}Update : $update"
msg = "$msg${NL}${NL}Cancel this: $cancel${NL}Cancel all : $cancelAll"
:0 fbw
| echo "$msg$NL"
}
:0 E #else statement
{
dummy = "$id: $JA_MSG_ERROR the message format has changed"
dummy = "$id: $JA_MSG_ERROR send copy to maintainer of the module"
}
}
dummy = "$id: end:"
# end of file pm-jadate.rc
|