www4mail-lite

Home

Download

SourceForge homepage

ReadMe

SourceForge.net Logo


www4mail-lite ReadMe

Project Information
-------------------
www4mail-lite was written by barywhite ( barywhite@gmail.com )

Project Name: www4mail-lite v 0.5

License: GNU General Public License (GPL)

Thanks:
- Incoming mail handled by moulding a script from here: http://gvtulder.f2o.org/articles/incoming-mail/
- Nick for some regex magic.

Project Description:

This script receives URL requests via email, downloads the web page and emails the web page back to the requesting
address.

It is written in PHP. The web pages are downloaded using lynx.

To see what the output looks like run 'lynx http://google.com -dump'

I wrote it as I was unable to get the real www4mail (http://www4mail.org/) program to run properly. What I have
written is a very basic in comparison.

Fetchmail is used to download the email requests and pipe it to the script.

There is some basic security on the requesting addresses in that you have to be in the list of addresses allowed to
request otherwise you will get an 'access is denied' error email back. There is currently no measure to stop
someone on the allowed list to request a 600meg ISO...

The script does not handle binary files eg jpg, pdf. They will be downloaded and returned as plain text.

The script was created to get around company internet access policy. Where I work I don't have full internet
access but I do have access to web mail.

Requirements:

- some kind of unix, although it's probably possible to get working on windows..
- fetchmail (for interactivity)
- some kind of mail box eg a gmail POP3 account (for interactivity)
- lynx
- php (created on ver 4.1.2)
- cron

Installation:

1. Untar the files into a users directory. Maybe create a new user www4mail.

2. The .forward file will need to be in the users home directory eg '/home/www4mail/.forward'

3. Check the .forward file points to the right place. eg ' "| php -q /home/www4mail/www4mail-lite.php" '

4a. Setup fetchmail to check a mail box every how often you want. eg 5mins. Webmin has a module to handle this..
Alternatively setup a cron job as the user to run the fetchmail program manually. I do this as it's easier to
change the hours of operation and frequency of the checks. eg 'fetchmail > /dev/null'

4b. You only really need fetchmail if you want to be able to send requests; if you just want to receive a copy of a
web page every hour eg slashdot it is not needed. In this case setup a cronjob to run as often as you want piping
an email to the www4mail script.
eg 'cat /home/www4mail/email | home/www4mail/www4mail-lite.php > /dev/null'.

5. Edit the email addresses you want to allow to send/receive request by editing www4mail-lite.php

6. Test!

To send a request:
Send an email to the mail account you are using with the URL in the body. Blank subject is ok.
All email coming from the script has [w4m] and the URL requested in the subject to allow for easy filtering and
reading.
You can only send one URL request per email at this stage. Anything after the first linefeed is ignored.




















© Copyright 2005, All Rights Reserved.
Free web templates