Location: PHPKode > scripts > PHPwebmail > phpwebmail/README.TXT
README for PHPwebmail 2.3.2, Apr 2003

by Bernard M. Piller <hide@address.com>, http://www.bmpsystems.com


Overview:

    1) What it does
    2) What you need
    3) Installation
    4) What to know
    5) Version history
    6) Still to do
    7) Credits

1) What does PHPwebmail do?

PHPwebmail is a web-based IMAP and SMTP mail client. Often it is not possible 
to make outside mailconnections from networks behind strict firewalls. Or it is
not possible to configure a regular mail client (for example in an Internet 
cafe). With PHPwebmail a mail client only needs a WWW connection to the 
mailserver. Specifically it only needs a connection to the webserver hosting 
PHPwebmail. Most of the times the web and mail server will be the same machine
but PHPwebmail can connect to other mailservers as well as long as an IMAP 
connection between these two machines is allowed. 

PHPwebmail is distributed under the GNU General Public License, please see 
the GNU-GPL.TXT file coming with this distribution.


2) What do you need? Requirements.

To run PHPwebmail you need a web server which supports PHP4 server based 
scripting. The mailserver must be an IMAP server. You also need MySQL.
To send mail, you also need an SMTP server running on the web server hosting
PHPwebmail. For most installations, the web and IMAP server will be the same 
computer also.

The user can then connect to PHPwebmail (and to his mailbox) from every computer
in the world that has an Internet connection and a web browser.


3) Installation

I will only cover the procedure for getting PHPwebmail running on a Unix
(Linux) machine. 
If you are installing on Win32, you will need MS Visual C++ to compile the
PHP source with the IMAP C client library. You also will need an STMP server 
for your Windows box.

a) Webserver
I am using the Apache webserver from http://www.apache.org with the PHP4 module
from http://www.php.net
It is important to compile PHP4 with IMAP support (c-client from Washington
University): ./configure --with-imap=$IMAP_DIR
Be sure that your imapd uses the same password encryption as your imap source
code used in compiling PHP4.
You will also need MySQL running on some server.

b) Copy this folder (webmail) to a web server accessible directory on your
web server machine. 

Be sure to have a link to /tmp in webmail
cd <webmail>
ln -s /tmp tmp

Create the database
When you are performing a new installation just type this:
mysql -u YOURUSERNAME -pYOURPASSWORD <webmail.sql
If you are updating, look at the file webmail.sql and decide which fields may
be new with the current version of PHPwebmail.

d) Be sure your mail server is an IMAP server. If your IMAP Server uses the 
"mbox" format (the WU imapd does), be sure that your user accounts have home 
directories and in there a file .mailboxlist (containing in the beginning 
just the word INBOX).

e) Edit <webmail>/mail.inc.php
Enter your domain name and mailserver in mail.inc.php
Leaving the defaults should be fine for most installation, but to
beautify sent addressees you should at least set $server to your domain name.
The login information for your MySQL server is also required.
You can also change colors and a site wide signature line.

f) You are ready to run! Connect to PHPwebmail form a web browser e.g. to 
http://www.yoursite.com/webmail and login to your mailbox.

g) If you get "WARNING" messages in your mailfolders, please reduce the error
level in your php.ini

h) see the "Help" menu for working with PHPwebmail and the comments in the
source code for details. Tell your users to look at the help screen ;-)


4) What you need to know. Things that don't work yet.

a) Security
If you want your user information (login, password) to travel safely over the
web you will need to set up an SSL connection to your webserver. I did this
on mine.	

b) Sending mail
Sending mail is only possible, if the web server machine on which PHPwebmail is
installed, has a configured SMTP server running.
Only the login name of the user will show up in the "From" header field when
sending messages. 
Example: User "John Doe" has the e-mail address "hide@address.com", and his
login is "jdoe" he will be sending messages as "hide@address.com" by default.
Every user can edit her sending address in the "From" field for cosmetical
reasons. She can send as "hide@address.com" if she wants :-)
The user can now change this via "Preferences".

c) Attachments
Attachments should now work pretty well. The only ones the don't work are
"rich text" mails from MS Outlock ;-)
Also inline images (GIF, JPG in HTML Mail) are not displayed nor cannot be 
downloaded correctly.
When you are replying or forwarding messages, please note that attachments are
not sent. They also don't get saved in the MySQL database for sent messages.
Maybe I will fix this sometime. For now you can save attachments
and attach them to new messages.
If your are sending a new message with an attachment you can only attach one
file. ZIP multiple files or send seperate messages.
If you would like to allow attachments larger than 1MB, you can easily change
this in the file send_mail.php. Just search for "1048"...


5) Version history, changes

2.3.2 Apr 2003
Bugfix: When using IMAP folders in a subdirectory, "Move mail to" always showed
INBOX selected not the name of the actual folder.


2.3.1 Feb 2003
Security update: send_mail.php now uses the move_uploaded_file() function
instead of copy(). On some systems a vulnerability might have made it 
possible for a user to attach system files of the machine running PHPwebmail.
Thanks for the hint to Nasir Simbolon <hide@address.com>.


2.3 Jan 2003
Jan C. Wynholds had the good idea to show only a limited number of messages
in the message pane. He sent me the code and I implemented his ideas.
UPGRADES, check webmail.sql for the new field "nummsgs" in the prefs
table.


2.2 Jan 2003

Mirko Holler made the following additions:
JavaScript "click & add" feature for addressing in send_mail.php. 
Patch in mime.php to mark sent messages in IMAP folders "read".


2.1p Jan 2003

The sender info for sendmail is now set to the sender address instead of the 
username under which the webserver is running. This is important to be able 
to send mails through some relaying mailserver. Thanks to Mirko Holler. 
On some sendmail systems you may need to add the username under which the
webserver is running to the trusted users in your sendmail.cf
  
  
2.1o May 2002

Some minor code clean up and bug fixes.


2.1n March 2002

Fixed logout.php, which caused a "could not display page" error in Internet
Explorer when PHPwebmail is running on a PHP 4.1 server.
Cleaned up a little bit of code added a few things to this README file.


2.1m January 2002

Security update! mail.inc renamed to mail.inc.php
Before one could read the mail.inc file in the webbrowser and see the 
MySQL login information.


2.1l December 2001

For low bandwith connections, the user can now switch to a text only version
of PHPwebmail via the preferences.
In the setup file (mail.inc.php) the administrator can now also set the color 
for links to make "textmode" a little more colorful.
Cleaned up this README file.


2.1k June 2001

An error is now displayed, if an uploaded attachment exceeds the 1MB limit.


2.1j May 2001

IMAP mail folders can have a sub directory prefix.
Fixed an error with the version numbers. The April 2001 version was wrongly
numbered 2.1g again, instead of 2.1i.


2.1i April 2001

MySQL can now run on a different server than the webserver.


2.1h February 2001

Fixed a bug with the headers of messages saved in the new "Sent" folder.


2.1g February 2001

Sent messages can now be either stored in the db or in a "Sent" IMAP folder.
Messagebodies are now word wrapped.
Fixes a bug introduced in 2.1f, when replying, the original message body was
not copied into the reply.


2.1f February 2001

Bug fixes: Fonts, Layout and "Reply"-Flag.


2.1e February 2001

When replying/forwarding a message the headers are displayed as well.


2.1d February 2001

Changes to the frame layout, new icons.
"Preferences" function for setting username and return e-mail address.
The problem with escaped quotes in subject and body resolved.


2.1c February 2001

Problem with special characters in email address solved when replying. 
You can now "reply to all".


2.1b February 2001

MySQL integration for a history of sent mails and an address book.
A few bugs with mail folders and bcc  were also removed.
I decided to go with an SQL archive of sent mails instead of an IMAP folder
because on many installations the folder IMAP folders will not be possible 
For example when you have the WU-imapd running on a Unix/Linux box where 
people don't have regular logins with home directories. In this case simply
remove the link to folder_ops.php in iconbar.php


2.0c January 2001 

Fixed a lot of problems with HTML mail and Outlook attachments.
Fixed "delete folder" function.
Cleaned up files and unneeded lines of code.
Some cosmetic changes to the mail index frame. Dates are displayed nicely and 
headers in IMAP folders are checked for From/To fields.


2.0b January 2001 

If a message had no subject it was not possible to read it. Now in such cases
"(no subject)" is shown in the mail index.


2.0a January 2001 

An error in logout.php was fixed. A user was not logged out unless the 
web browser was quit.


2.0 January 2001 (major release!)

Scott Price <hide@address.com> took PHPwebmail 1.x to new heights with his 
DragonFlyMail (http://www.dflytech.com/products/dragonflymail/).
I took advantage of his code and e-mailed him about new features.
For short now the list of the bunch of new features in PHPwebmail

Scott made the following changes (DragonFlyMail 0.9):
* Frame layout, everything in one window
* multiple recipients, CC, BCC works
* default help message
* php4 session support
* central config file (mail.inc.php)

I added the following for PHPwebmail 2.0
* attachments work (both for sending and receiving)
* HTML formatted mail is displayed nicely
* create, delete and rename IMAP mail folders
* messages can be moved between IMAP mail folders
* all co recipients ("To" and "CC") are shown
* nice icons

PHPwapmail is still included but not worked on anymore (see subfolder).


1.2 May 2000
There is now a line on top of the inbox telling the user if (s)he has any
new messages.
Caching of the pages is disabled so that nobody can sneak into a Webmail
users acount using his browser.
Wapmail (read only) is now included, see the seperate folder.

1.0 February 2000


6) Still to do. Work for the future.

* Make inline images in HTML mail work

Having ideas? E-mail me!


7) Credits

A big "THANK YOU" to the following persons:

* Jan C. Wynholds <hide@address.com> for limiting the number of messages in
  the message pane.
* Mirko Holler <hide@address.com> for many cool additons for the 
  2.2 version.
* Herminio Jorquera <hide@address.com> for the bug reports leading to
  version 2.1o
* Scott Price <hide@address.com> for doing a great job with 
  DragonFlyMail and for his ideas.
* Bill Adams and Dan Potter for the MailFile class to send attachments.
* Jordan <hide@address.com> for his idea of storing sent mail 
  on the IMAP server.
* hide@address.com for the DisectThisPart function to receive attachments.
* Chuck Hagenbuch for the MIME de-/enconding functions.
* Brian Schneider for fixing the logout script.
* Richard Greenwood <hide@address.com> for suggesting the ability to
  use a different MySQL server than localhost.
* Rasmus Lerdorf and his team for bringing us php.
Return current item: PHPwebmail