[REBOL] Re: [rebmail] repost and pointless mumblings
From: mario::cassani::icl::com at: 23-Aug-2001 17:32
Hi Cal and all,
I have CC-ed to the main list if someone wants to join us...
CD> In case any of you missed it on the rebol list, I thought
CD> I should repost this in here.
Good idea.
Maybe we should start to put our code on Yahoo! otherwise
the poll asking to select between Yahoo! and SourceForge was
not useful and we can move back to the main Rebol/ML.
CD> I may not get back to working on this thing for a bit (too
CD> many projects at once), but I'll try to produce some other
CD> useful bits of email related code and give them to the
CD> rebmail project as I get time...
CD>
What about helping with thread detection?
Does anyone know how to handle threads? With newsgroups
there's the Message-ID field and with mail? What if someone
changes the Subject field like this:
Subject: RE: [rebmail] This is a test
Subject: RE: [rebmail] Same thread (WAS: This is a test)
CD> This is still a work in progress (no error checking to speak
CD> of, a couple of missing features, and no docs which is bad
CD> since it's kinda weird), but it seems to be mostly working,
CD> so I thought maybe the other folks on the list working on
CD> mail programs would find it useful to study/borrow from.
CD>
CD> http://flyingparty.com/deadzaphod/rebolscripts/gui-config.r
CD> http://flyingparty.com/deadzaphod/rebolscripts/mail.r
CD>
CD> Features:
CD>
CD> Multiple accounts
CD> POP3 and IMAP (IMAP is untested)
CD> send and receive attachments
CD> optionally keep messages on server
CD> can save to a standard mailbox file
CD>
I tried the gui-config.r but this can't handle parametric
directories.
I mean: if I have multiple mailboxes and I want messages
downloaded from them to be kept in different directories or
if I have multiple users with different working dir or, as
in my scripts, I keep mail in directories changing every
day (the name of the dir is the date) what can I do?
I have also read the new mail of Cal who includes some
exportable
mail functions.
One voice in my mind asked: "What about defining a list
of functions names/purposes to be developed based on the
wanted features list?".
This helps with GUI: not everyone likes the same "skins":
someone wants it transparent, others want it metal while
someone else likes PhilB simple and clean GUI style.
If the names of the functions are defined from the
beginning the GUI programmer will know what func should be
called.
CD> ; this one requires the code from %demime.r (Brett Handley/Mario
Cassani)
CD>
CD> import-with-attachments: func [
...
CD> ]
Be careful! I sent a modified demime.r script on the main
ML, the standard one has a little bug in filenames handling.
IMO:
- A password should be asked (if wanted), somewhere in one of
the programs (more likely it will be the GUI), to avoid
unsafe access by "unknown" people.
- The GUI should be able to read mail (and news) offline too,
knowing only the directory structure: the download script
should be kept separated (so it can be run from shell or
batch in non interactive mode).
- Contacts and filtering rules should be kept under some
relationship and mail addresses be automatically
extracted from the messages and kept in a text file.
- A function to import adresses from a text file to the
contacts should be provided.
- The download script should sequentially open the given
mail accounts boxes (POP3 or IMAP) reading the messages
and processing them (filters, demime, recognise ML msgs..)
- Messages processing should decide if the message must be
saved (and where), deleted...
The most difficult thing to standardise is the last one.
I'm working on splitting each processing phase as Cal.
Can PhilB give me a short explanation of the way his
mailer works (to download only), please? There are actually
3 different and "incompatible" download methods: Cal's,
Phil's and mine.
AWhat about the three of us working together on the
download/filter piece of code?
My script misses your GUI, IMAP, attachments, and send
features while yours hasn't news and filtering.
If we go on with doubled, similar but incompatible 'func
we will not easily merge each other's missing features.
Here follows the info about my Rebol mailer.
The main program MailRebol.r calls the other libraries
(message-DL.r is not a real library beacause is kept
separated to easily debug the unfinished functions).
It simply opens the POP3 mailbox(es), calls message-DL to
download and filters the messages using the following libs:
msg-filter-pro.r Programmable filters
msg-filter-simple.r Simple filters
Messages are saved in a directory with the date as name:
2001/08/23/Mail/AccountName1/0001.txt
2001/08/23/Mail/AccountName1/0002.txt
2001/08/23/Mail/AccountName2/0001.txt
2001/08/23/Mail/AccountName2/0002.txt
2001/08/23/Mail/AccountName2/0003.txt
while mailing list messages are kept in a different
directory:
ML/MailingListName1/000000001.txt
ML/MailingListName1/000000002.txt
ML/MailingListName2/000000001.txt
ML/MailingListName2/000000002.txt
ML/MailingListName2/000000003.txt
but the index of downloaded messages is kept in the same
file as the "normal" messages:
2001/08/23/Mail/AccountName1-txt
2001/08/23/Mail/AccountName2-txt
I am working on a way to download USENET news too:
nntp.r
nntp-test.r
with the same directory structure:
2001/08/23/News/ServerName1/rec.food.drink.tea/000001.txt
2001/08/23/News/ServerName1/rec.food.drink.tea/000002.txt
2001/08/23/News/ServerName1/alt.ascii-art/000001.txt
2001/08/23/News/ServerName2/rec.food.recipes/000001.txt
2001/08/23/News/ServerName2/comp.rebol/000001.txt
2001/08/23/News/ServerName2/comp.rebol/000002.txt
2001/08/23/News/ServerName2/comp.rebol/000003.txt
I should save somewhere (%Config/ ?) the last
downloaded message from each server/newsgroup.
I also have a comics strips downloader that saves with
the same directory tree:
2001/08/23/Strips/bc.gif
2001/08/23/Strips/dilbert.gif
2001/08/23/Strips/lupoalberto.gif
so the directory structure, to me, is important
In the Config/ directory filtering rules, mailboxes
and news "URL"s are kept in an easily readable format.
To easily understand how filter libraries work take a
look to:
msg-filter-demo.r
it uses a saved message in order to fake reading it from
the server.
The msg-qp-convert.r library (Gabriele again ;))
converts quoted printable chars back to binary (it doesn't
handle UNICODE conversions or different char sets
translations). Actually it's not (yet) used.
In case you miss the information quoted-printable
chars are those queer =20 like "things":
8<----------------------------------------------------------
==========================
==========================
==========
Mario=A0Cassani
PGP=A0Key=A0fingerprint:=A09929=A074CF=A062E9=A0A7A4=A060D6=A005DC=A08034=A0F354
8<----------------------------------------------------------
the above is the Q-P version of the first 3 lines of the
signature found on the bottom of this mail.
Options.r The names tells it all. Must be changed
Nimenhao
Mario
============================================================
Mario Cassani
PGP Key fingerprint: 9929 74CF 62E9 A7A4 60D6 05DC 8034 F354
------------------------------------------------------------
RebMail: http://groups.yahoo.com/group/rebmail