Internet, Projekte, Hard- und Software aus einer Hand

cWebMail 2001

Register.com 200x125-11

! FREE FOR NOW ON !

last update 20.04.2001

ComneX - Commercial Internet Business

Receive and send mails using your web browser

Current Version 0.96

Introduction

Our company wanted to write a simple webmail script. We did all by ourself. So all SMTP and POP3 message work is done by our script and not by third-party modules. Thats perhapes a bit silly, but it made fun. Perhapes once a Version 2 will come up. But thats not sure. I have to finish my master thesis.

Martin Boeck

Abstract

cWebMail is a Perl script for UNIX to send and receive emails using your web browser. You can read normal messages as easy as reading MIME messages and extracting attached files. You can send emails only using text mails, or attaching one file to the mail. It is very flexible in configuration, though each output screen is created using a special template, so you donīt have to touch the perl script itsself. You can also use more languages.

Content

cWebMail at work

There is a running version of cWebMail on our servers. You can use your standard POP account and POP host.

To proced follow cWebMail !

How to get cWebMail

Though no more development will take place, its free for your pleasure.

Download the tar.gz

Browse the tree

First Time Installation

If you get the package you have to unpack it

sh> tar -xvzf cwebmail.tar.gz

After you unpacked it you have to check, wheter you have installed the required PERL 5.004 and the packages libnet-1.0605 or above, CGI-pm 2.42 or above, MIME-Base64 2.05 or above.

All except Perl we have included in the subdirectory "perllib". You only have to go into the library directory you want to install an call

sh> perl Makefile.PL
sh> make
sh> make test
sh> make install

If you have all required packages, you have to install cWebmail itsself. First you find a directory, you declare as non webaccessible and the web browser has full rights to it. Thatīs the configuration and data directory for cWebMail. Copy all data out of the sub "templates" in there.

Example:

sh> mkdir /var/webmail
sh> cp -R ./templates/* /var/webmail
sh> chown -R www /var/webmail
sh> chgrp -R www /var/webmail

Now you have installed the templates and the directory. You can install the script now. Put it in a CGI-directory of your web. To do so, please refere to your server manual.

Example:

sh> cp ./script/cwebmail.cgi /var/httpd/www/cgi-bin

Now we need a directory, a picture can be stored. It must be webaccessible. So perhapes you just do

sh> mkdir /var/httpd/www/webout
sh> chown www /var/httpd/www/webout
sh> chgrp www /var/httpd/www/webout

Thatīs it. You now have to configure the script. To do so, please edit the file cwebmail.cgi. Change every parameter you find in to of the script to fit your wishes and directories. Its well commented.

IMPORTANT ! Change the allowed Hosts, the directories and the links !!!

You are ready to use your cWebMail. Call it, and see, what you can do with it !

Fine Tuning - Templates

Though you want to have a special appearance you can change the templates supplied. Also you want to have new languages supported and so on.

To do so, please edit all templates in the "cfg" directory. Each subdirectory here defines a language. You can use each String for a language you want as long as you make the selection possible in the "ucfg.t" template. To have a standard language, please link all files in the standard language directory (now it is "en"), to the "cfg" directory itsself.

Template error.msg

Each line represents an Error Message. You can change them or translate them.

Template gen_err.t, logon_err.t, sec_err.t

It is supplied with the field [error] and display an error.

Template listentry.t

Thats an entry in the POP list we get from the host. You can use each field, an email header contains. So you can use [to], [from], [subject], etc, but also [Content-Type] or [Status].

Template listfoot.t

Thatīs the foot of the POP list, so you can use each field of localWebmail (see head of script).

Template listhead.t

Thatīs the head of the POP list, please use each field of CurrentInfo, thatīs [RealName], [user], [box], [Adress], [email], [SMTP] and [pass]. But I wonīt use password here.

Template mailsent.t

After a mail was sent, this is displayed. You can use the same fields, as listhead.t.

Template msgfilestart.t, msgprintstart.t, msgshowstart.t, msgsusstart.t

Start of a message part to display. Either a file, a printable message, a showable picture or an unrecognized part.

Template msgfilestop.t, msgprintstop.t, msgshowstop.t, msgsusstop.t

Stop of a message part.

Template msghead.t

Head of a message, please use the same as listentry.t.

Template msgfoot.t

Foot of a message, the same fields as listfoot.t

Template sendmail.t

To send a mail, use currentInfo ! And you can use [TO], [SUBJECT] and [MESSAGE] as reply default value !

Template ucfg.t

To configure a user, use currentInfo !

Template ucfgproc.t

After configuration, use currentInfo !

Switches for the script you can use in the Templates and special variables

[!ELINK!] is a link to the script without parameters
[!LINK!] is a link, including the user, the key and the users box
[!SORT!] the actual sorting
[[] a open bracket
[]] a close bracket

The script take the following from the argument line:

user user of the POP account
box POP 3 box of the user
action action (deletemsg, sort, deletemult, logout, listmsg, msg, relistmsg, usercfgp, usercfg, sendmail, dosend)
num Message number action is to be done on
key Security key given by [!LINK!]

All other parameters are taken form POST. So look at the templates, they use all possibilities.

If you have questions mail to Martin Boeck.