|Tue 1998-10-13 joliden(_at_)cedetel(_dot_)com(_dot_)mx (Jesus Alberto Oliden
Gonzalez) list.procmail
|
| ..pager in our cellular phones. I want to receive:
| "You have new mail"
| "From: SENDER"
| "E-mail address: SENDER's EMAIL ADDRESS"
| "Subject: E-MAIL's SUBJECT"
|
| * Keep my users receiving their "normal" messages.
Do yu mean the c flag? (copy of the message)
| * Filter a copy of that messages cutting its body and sending only the
| fields that I want to the pager.
Use B flag to retreive information from the body
:0 B
* match-that-body\/.*
{
somethingGrabbed = $MATCH
}
| * Filter outgoing notify message to be just a generic message, pasting
| there Sender's name. e-mail address, and the subject of message (of course
| I mean of the "normal" mail message), what I mean is
| how can I do this without showing another user as the sender of the
| notification message?
You need to extyract the fields that you want to send
RC_EMAIL = $PMSRC/pm-jaaddr.rc
:0
* ^From\/.*
{
INPUT = $MATCH
INCLUDERC = $RC_EMAIL # explode to address components
}
Then contruct the message to pager. pm-jaaddr.rc module can e found from
my procmail module kit pm-code.shar. See X-info header and mail server.
You might also be interested in Era's Pager recipe found from pm-tips
(.html in ftp site, .txt in mail server)
16.4 Sending message to pager in chunks
If you would like to pack as much information as possible to tight space
(pagers typically 200 chars, Cellular phones 160), see my just released
Perl Module from CPAN. I updated new version today, so the 1998.1008 version
should show up afternoon (funet claims to mirror every hour but I doubt that).
See Squeeze.pm
ftp://ftp.funet.fi/pub/languages/perl/CPAN//modules/by-module/Lingua/
I use it with my Cellular phone where I redirect important mail.
jari
NAME
Squeeze.pm - Shorten text to minimum syllables by using hash and vowel
deletion
REVISION
$Id: Squeeze.pm,v 1.24 1998/10/08 14:58:15 jaalto Exp $
SYNOPSIS
use Squeeze.pm; # imnport only function
use Squeeze qw( :ALL ); # import all functions and variables
use English;
while (<>)
{
print SqueezeText $ARG;
}
DESCRIPTION
Squeeze text (English) to most compact format possibly so that it is
barely readable. You shold convert all text to lowercase for maximum
compression, because optimisations have been designed mostly fr
unpapitalised letters.
`Warning: Each line is processed multiple times, so prepare for slow
conversion time'
You can use this module eg to preprocess text before it is sent to
electronic media that has maximum text size limit. For example Pagers
have some arbitrary text size limit, say 200 characters, which you want
to fill as much as possible. Alternatively you may have GSM Cellular
phone wich is capable of receiving Short Messages (SMS), whose text
limit is 160 characters. To your amusement, the description text of this
paragraph has been converted below using this library's SqueezeText()
function . See yourself if it's readable (Yes, it takes some time to get
used to). The compress ratio is typically 30-40%
u _n use thi mod to prprce txt bfre i_s snt to
elrnic mda t_hs max txt siz lim. f_xmple Pag hv
som abitry txt siz lim, say 200 chr, W/ u wnt to fll
as mch as psbleAlternatvly u may hv GSM Cllar PH wch is
cpble of rcivng Short msg (SMS), WS/ txt lim is 160
chrTo u/ amsment, dsc txt of thi prgra has
ben cnv_ blow usng thi lbrrys SquezText() fnc See
uself if i_s redble (Yes, it tak som T to get usdto
compr rati is typcly 30-40
There are few grammar rules which are used to shorten some English
tokens very much:
Word that has _ is usually a verb
Word that has / is usually a substantive, noun,
pronomine or other non-verb
For example, these tokens must be understood before text can be read.
This is not yet like Geek code, because you don't need external parser
to understand this, but just some common sense and time to adapt
yourself to this text. *For a complete up to date list, you have to peek
the source code*
automatically => 'acly_'
for => 4
for him => 4h
for her => 4h
for them => 4t
for those => 4t
can => _n
does => _s
it is => i_s
that is => t_s
which is => w_s
that are => t_r
which are => w_r
less => -/
more => +/
most => ++
however => h/ver
think => thk_
useful => usful
you => u
your => u/
you'd => u/d
you'll => u/l
they => t/
their => t/r
will => /w
would => /d
with => w/
without => w/o
which => W/
whose => WS/
Time is expressed with big letters
time => T
minute => MIN
second => SEC
hour => HH
day => DD
month => MM
year => YY
Other Big letter acronyms
phone => PH
[..zap..]