Updates to b2mail-rt.php OK, I
Updates to b2mail-rt.php
OK, I did some quick hacks to get b2mail to accept any email and this is now running on Geek Fishing. In looking at the code, it is pretty clear that it doesn’t follow the RFC822 standard super well, for instance, if you have multiple mail imbedded, it doesn’t quite work, so I need to get a structured header, body and attachment reader into the code. Here are the changes I’m going to make:
- Proper Header handling. SquirrelMail – Webmail for Nuts!. This is a nice freeware POP3 mail reader based on PHP. This is where the base code for POP3 retrieval was taken for B2, so I’m looking at it now to see what it does. Seems to have a nice plug-in architecture and also a place to get structured mail reading.
- Signatures. It is really amazing how much junk is at the bottom of email. I’m going to change the way the thing looks to cut the bottom off to allow an array of possible things to blow away in the form of string1:string2:string3 that is set in b2config.php. To do the former, I’m going to have to learn how to use arrays and the cool explode and implode commands that PHP has. There is a basic tutorial in ONLamp.com: Arrays in PHP: Part 1 [Jun. 07, 2001] that I”m going to study.
- Concatenated mail. I’m going to detect all the mail that is stuck together and unglue it and put each into its own blog entry so you can see the mail separately.
- MIME types. I’m going to process complex types like MIME, so rather than just sticking it into stuff, it will recreate the JPG or whatever and upload it
- Another thing to work on is the encryption of passwords in b2. It isn’t all that secure and I need to think about this. Using md5 function seems like one choice. I also need to post to the b2 forums since I’m sure other people have notice this.