Quick and Dirty Web Server Setup from Command Line

Sometimes you may just want to setup a web server in a particular directory on your system. Other times you may already be running a web server for general purposes but want an additional server running on a different port for a specific purpose or to server a particular separate directory or drive. There is a quick and dirty way to setup a web server on your Mac running OS X and python (this may also work on Linux/UNIX systems with python etc.) Just navigate to the directory you would like to become a web server from within Terminal and then type the following:

python -m SimpleHTTPServer 8000

You can change “8000” to any free port number you like. You may need to run this as root/super user if it failed to work for you.

sudo python -m SimpleHTTPServer 8000 


su python -m SimpleHTTPServer 8000

If you want to test that it is working, open your web browser to 


It should then show the contents of the directory that you setup the web server in. The terminal window should also spit out down the screen a whole bunch of useful diagnostic information about who’s accessing what on your newly created server.

$ python -m SimpleHTTPServer 8000
Serving HTTP on port 8000 ... - - [10/Mar/2014 15:59:01] "GET / HTTP/1.1" 200 - - - [10/Mar/2014 15:59:01] code 404, message File not found - - [10/Mar/2014 15:59:01] "GET /favicon.ico HTTP/1.1" 404 -




C++ Student Developer’s Notebook

For those Computer Science or IT students who want a C++ textbook that is made for them visit:

C++ Student Developer’s Notebook:

Unlike other textbooks you’ll find out there this text takes a student approach to C++ programming. Its aim is to give you all the concepts in the most straight forward and summarised form possible by remove all the time wasting waffle your likely to find in most other textbooks. I found in my experience that Students want a book that quickly teaches how to program C++, not one that shows you how much the author knows about obscure theories.

I’ve created a book that you can have by your side from start to finish. Hence I’ve included sections you don’t normally find covered in other textbooks such as “Linux crash course!” and “Debugging”. In essence this book contains what a real Computer Science or IT student needs to know to simply “get things done”.

I hope this book is just what students have been waiting for, a book created for you!

gps, patch, tracking

Turn your Tom Tom GPS into a data logger (tracking device)

I’ve come across a way to enable data logging on the tomtom…. it will allow the unit to log trips in the standard *.gpx* format… then you can open a *.xml* file (found on the device under the folder called “int”) in Internet Explorer that will show your trip overlayed on a google map, it also plots speeds on the map.. direction changes.. rest points etc… could have various uses…. e.g. mapping the boundaries of a farm (by driving around the borner)… it saves the exact gps locations as raw data that can be manually read… or opened into google maps… etc..

The official site can be found here although for those new to this kind of thing it my be a bit complex.

Event_Logger is a tracking and logging application enhancing TomTom GO as well as any all-in-one TomTom GPS device. It can log TomTom GO events to Itinerary files that are managed by TomTom GO like native Itinerary files created through the ordinary user interface; besides, Event_Logger can produce standard GPX XML files where events are represented as waypoints and the whole route is logged through a sequence of track points obtained by querying TomTom GO for location information at short periodical intervals; the produced tracking will result bound to the roads through the assistance of both the TomTom GO mapping and the ASN feature (if active) in order to normalize tracking even without proper GPS reception; other than this default process to produce snapped-to-road GPX tracks, an additional option allows retrieving raw GPS data not intermediated by TomTom GO, useful for off-road tracking and also including altitude; Itinerary records and GPX waypoints take account of boot, resume, suspend events and optionally other information generated by manually tapping on the available (and extensible) logging menu icons. Other than generating Itinerary and GPX files, Event_Logger can create POIs (Points of Interest) for each event (or for a configurable subset).”

Hence to make it easier to setup i’ve done the hard work for you… just download this zip file, then uncompress its contents straight into the main directory of the memory card of your Tom Tom.


# Author: amacri@tiscali.it
# Event_Logger 8.1 – http://web.tiscali.it/macri/Event_Logger

Download software at: http://web.tiscali.it/macri/Event_Logger/Event_Logger-8.1.zip
– TTGO: TomTom GO (any model)
– ‘H:': example of name of a TTGO file system when mounted to an external system via USB

Compatibility: NavCore v5.x, v6.x, v7.x for all-in-one TomTom devices (see instructions).

Event_Logger is not compatible with PDA or Symbian devices.

Installing Event_Logger does not compromise and does not degrade the performance of the
normal TomTom operation, even for untested models or versions. Event_Logger can be
deinstalled or deactivated when needed.

Installation files:
Place the following files in the TTGO SD card (or HD, depending on the models), respecting
cases for all file names and keeping the same directory tree (directories must be created
when not existing)

o    H:\cleanup.txt (notice that H:\ttn of any previous Event_Logger version must be deleted)
o    H:\Itn\gpx.xsl (should be also copied in all the directories including unzipped gpx files)
o    H:\Tracer\acal
o    H:\Tracer\bsh.bz2
o    H:\Tracer\bz2cat
o    H:\Tracer\Event_Logger.txt
(can be configured through any Windows editor, regardless of DOS or UNIX newlines)
o    H:\Tracer\mkel
o    H:\Tracer\toggledata
o    H:\Tracer\toggledmn
o    H:\Tracer\togglelog
o    H:\Tracer\top
o    H:\Tracer\zip
o    H:\Tracer\wd
o    H:\Tracer\gpsbabel (can be deleted if not needed)
o    H:\Tracer\zip3 (can be deleted if not needed)

Menu entries:
o    H:\SdkRegistry\acal.cap
o    H:\SdkRegistry\logpoi.cap
o    H:\SdkRegistry\logpos.cap
o    H:\SdkRegistry\toggledata.cap
o    H:\SdkRegistry\toggledmn.cap (can be deleted if “Toggle Event_Logger daemon” is unwanted)
o    H:\SdkRegistry\toggletrk.cap (can be deleted if “Toggle GPX Tracer” command is unwanted)
o    H:\SdkRegistry\togglelog.cap (can be deleted if “Toggle Debug Level” command is unwanted)
o    H:\SdkRegistry\top.cap (can be deleted if the “Top” command is unwanted)

Menu icons:
o    H:\SdkRegistry\acal.bmp
o    H:\SdkRegistry\logpoi.bmp
o    H:\SdkRegistry\logpos.bmp
o    H:\SdkRegistry\toggledata.bmp
o    H:\SdkRegistry\toggledmn.bmp
o    H:\SdkRegistry\togglelog.bmp
o    H:\SdkRegistry\toggletrk.bmp
o    H:\SdkRegistry\top.bmp

Notice that H:\Sources (useless on the TomTom) should be deleted from TomTom to save space.
Also Event_Logger.pdf and ReadMe.txt can be safely deleted from the TomTom SD (or HD).

INSTALLATION NOTES: copy all files (apart from “Sources“ directory, Event_Logger.pdf
and any ReadMe.txt). It is essential preserve the directory structure included in the
ZIP package. Edit Tracer\Event_Logger.txt with any editor (including notepad) and,
above all, check variables TIMEZONE and LANGUAGE. If the Tracer directory is missing
after the archive extraction, repeat the installation procedure preserving the directory
structure. See the Installation paragraph of the documentation for further information.

Verify that toggledmn.cap, toggletrk.cap, togglelog.cap and top.cap are really needed; if
not, remove them from the SdkRegistry directory.

Verify that \Tracer\gpsbabel and \Tracer\zip3 are really needed; if not, remove them
to save space.

UPGRADE NOTES: follow the same instructions of the INSTALLATION NOTES.
o remove H:\ttn (if existing) of any old Event_Logger version (important)
o rename _Logger.itn (if existing) to _Latest_Events.itn
o EventLogger.tgz and Event_Logger.tgz (if existing in “Itn” directory) can be moved in
Itn\Bkp directory (can be created if not existing, otherwise Event_Logger automatically
creates it).
o “Track” directory (inside “Tracer” directory) is no more used (can be archived and deleted)
o expr in the “Tracer” directory (if still existing) can be removed.
o    If using POIs, rename Tracker.ov2/Tracker.bmp (if existing) to POI_Tracker.ov2/POI_Tracker.bmp
See the Installation paragraph for further information.

o Notice that there is no specific switch for daylight saving, which must be managed changing
the TIMEZONE variable accordingly.
o    IMPORTANT WARNING: do not forget to copy the file named “cleanup.txt” to the root of the
SD or HD.
–    IMPORTANT WARNING: Do not exceed the maximum number of 10 “.cap” files in the “SdkRegistry”
o Verify that Debug is set to 0 inside Event_Logger.txt. If any of the files ttnlog-<date>.txt,
TtnLog.txt, TrxLog.txt, trxlog-<date>.txt are available in the Tracer directory, this means
that the Debug flag was not set to 0 in a previous Event_Logger version; all these files can
be safely deleted to save space; anyway, before deleting them, with the WordPad editor please
check the presence of the string _Event_Logger_Script_ERROR_ inside each of them; if this
string exists, email the files to amacri@tiscali.it in order to facilitate bug fixing.
o in case H:\cleanup.txt is already existing because a different SDK program is
installed, add the following line to the existing file instead of replacing it:
(NOTE: The H:\cleanup.txt file must only have one recurrence of the previous command)

In case there is a tomtom.mnu files available in the SdkRegistry directory of TTGO,
that file should be modified in order to include the new SDK entries (see Event_Logger.pdf
for further information). Notice that this file introduces limitations with NavCore 7.

Setting the owner’s preferences (a specific menu of TomTom) is discouraged with firmware version
6.210 (it might freeze SDK functions until the “Continue” button is pressed). Other v.6 versions
are untested against this issue.

A random menu reset to the initial menu page might happen while navigating into the menus
(typically after powering the device on; this is due to a small glitch in the TomTom
application while processing the Event_Logger command changing night/day colours).

Donations are more than happily accepted! Event_Logger took a lot of days of development
within two years, as well as large number of testing and user support; if you really like
this software, you are kindly invited to send donations; email to amacri@tiscali.it with
subject Donation to know how to perform this.



Yeah it is a bit Techy… take a bit of reading… but once you get it all loaded on its easy enough to use…

an example of what it can achieve (i.e. the files it produces in the “itn” directory) can be found below…

click the link (its hosted on my home server – which isn’t always online):


and it shows you one of the routes i took and plots it… (It only works with Internet Explorer… and you click yes to all the popups asking about “allowing” Active X scripts…)

Good luck!

Computers, Programming, Uncategorized

Eee PC 701 with a real linux distro that’s hardware native!

Further to my earler post “The coolest laptop ever” – more news has come to light in relation to the option of installing a fully fledged distro on the laptop.

Mandriva One is now a fully hardware native linux distro.. meaning that after installing all the hardware on the Eee PC is detected “out of the box” including wifi!!!!

Mandriva One on Eee PC!!!

Mandriva One on Eee PC!!!

Specs shown (uses the full 900mhz rather than just 600 odd)

Specs shown (uses the full 900mhz rather than just 600 odd)

So once you get the file from here –>


Then lets run through the steps to getting your system running smoothly.

Creating the install media for the Hard Disk Install

The Hard Disk install method requires an 8GB or larger USB key, SDHC card or USB hard disk; an extra small USB key will make things a lot simpler. The basic idea is to get the installer on the small USB key as described in the preceding section, and download the iso image for the Mandriva Free DVD to the large USB key, SDHC card or USB hard disk. Other iso image files (in particular those for the KDE One or Gnome One CDs) are not supported so don’t ask!

Then boot from the small USB key and when asked, choose the hard disk install method; next point the installer to the Mandriva Free DVD iso file on the install media and you are set.

In other words:

  1. Download the Mandriva Free DVD iso file to your 8GB or larger USB key, SDHC card or USB hard disk (the install media); note that this file is larger than 4GB and cannot be downloaded to a FAT partition. Reformat/repartition your install media accordingly.
  2. As described in the preceding section, download and write the all.img to a small USB key, and boot from it. The install media must also be accessible at this point.
  3. When asked, choose the hard disk install method; next point the installer to the Mandriva Free DVD iso file (full path).

Creating the install media for the CD/DVD Install

The CD/DVD install method requires an external USB CD or DVD drive. May not work with LG external DVD drives.

  • If you have a CD drive, download the 3 CD iso files for the Free Mandriva edition, burn them and boot from the first CD.
  • If you have a DVD drive, download the DVD iso file for the Free Mandriva edition, burn it and boot from it.

The Mandriva 2008.1 installer

Right, so you have prepared the install media following the instructions above, and by pressing the <ESC> key after turning on your eeePC, you have booted from it. The Linux kernel on the install media will load and after a few seconds you should be presented with the Mandriva 2008.1 Installer on the eeePC screen.

From this point on you are running the traditional, user-friendly, multi-language Mandriva Installer. Follow the normal installation steps, there is nothing eeePC-specific. Take your time to read carefully through all the options.

Screenshots will be added in time, but for now be advised of a few things to change from the default installer options:

  1. Choose the Standard security setting (do not use the default High as it is really not required on an eeePC).
  2. Choose Custom partitioning. If you are installing on the SSD, delete all the existing partitions before you try to create a new one; yes, you do have to understand what a partition is and how partitioning works. Create a single / partition on the Mandriva media. Choose “Journaling reiserfs” as the partition type. In the partition options set the ‘noatime’ option. This is important to avoid excessive wear on Flash media.
  3. Choose to manually select the packages to install, and when given the choice, choose whatever Desktop Environment(s) you want to have installed by default (Gnome, KDE, Xfce, etc). At login time you’ll be able to open a menu and choose the session type.
  4. Do not install any server software. Running Apache, MySQL and PHP on your eeePC is not recommended (although it can be done). ;)
  5. Do not, unless you know exactly what you are doing, trim down the number of packages to install; this will likely result in an incomplete setup – guaranteed headaches later. You can add packages, but keep at least 500MB free on your Mandriva media (the installer tells you how much space is used and how much you have total)
  6. Check and double-check (and triple-check, please) that you are installing Grub (the bootloader) to the correct device MBR. This is the most common mistake for first-time Mandriva users, and results in a Mandriva install that cannot be booted. :(
  7. Do not try to manually configure network, video, sound or any other option after downloading the packages, these get automatically configured by the installer.
  8. Wireless must be configured after the first reboot, see below.

READ this note if you are using the Hard disk Install method

There seems to be a bug in the Mandriva Installer that misidentifies the install media (the one that holds the Mandriva Free DVD iso image file). So when you are offered a choice between the various drives identified by the kernel, the correct one is not the one that has the right name! For example:

  • You wrote the DVD iso image file to your BrandX 8GB USB key. It shows up as drive sdc. When asked by the installer: “Select the disk containing the copy of the Mandriva Linux distribution install source”, if you answer sdc, the installer will not find the iso and will just loop asking the same question, or will give you a message saying “no partition found”. Try sdb, or sda, or sdd instead.

Post-Install Steps

OK, you have installed Mandriva 2008.1 and rebooted your eeePC successfully into Mandriva 2008.1 The following are some post-install steps required to get a smooth Mandriva 2008.1 eeePC “eXPerience”. Ha! :)

Configuring your software sources

Go to the Mandriva Control Center>Software>Software sources and follow the prompt to set up a full set (Free and Non-Free) of online sources. If you installed using the Hard Disk Install or CD/DVD Install methods, you’ll want to remove the original install media from the list of available sources.

Now using your software install GUI in MandrivaControlCentre>Software>SoftwareInstall/Remove, you can install packages from any of the defined sources. Some packages will appear twice. Once from a Mandriva repository, and once from a PLF repository. Choose the PLF version if you want the extended features.

Configuring your wireless connection

Check that the blue LED (WiFi) is on.

Go to the Mandriva Control Center>Network>Add Network Interface GUI and follow the prompt to set up the wireless connection (obviously you will still need to be Ethernet connected to the internet at that point). Choose the madwifi driver (the ndiswrapper option would force you to install the XP wireless drivers) and when prompted, enter the appropriate parameters for your WiFi connection.

Minimize disk writes to prevent flash memory wear

To do this edit /etc/fstab and add the following lines at the end:

tmpfs /tmp tmpfs noatime 0 0
tmpfs /var/log tmpfs noatime 0 0
tmpfs /var/tmp tmpfs noatime 0 0

Note that any files written to these directories will be erased on reboot (but are kept during suspend/resume). Also check that your fstab file has your SSD or SDHC partitions mounted with the ‘noatime’ option. For example:

# Entry for /dev/sdc5 :
UUID=0c0701d1-5dc3-4c9e-982d-53ee393f1fb8 / ext3 noatime 1 1

If you are using a reiserfs partition, the options are slightly different:

# Entry for /dev/sdc5 :
UUID=0c0701d1-5dc3-4c9e-982d-53ee393f1fb8 / reiserfs noatime,nodiratime,notail 1 1

Disable unneeded services

(Check the FAQ here)

Configure Power Management

You want to get the best possible performance while maximizing battery time.

  • Disable unneeded devices (in the BIOS or using hotkeys).
  • (Check the FAQ here)

Installing RealPlayer

RealPlayer 10 installed out of the box will segfault but there is an easy fix to get that to work. edit /usr/bin/replay and add the following lines


Those to lines also need to be added to hxplay

To get RealPlayer 11 to work add the following lines

export LANGUAGE=en_US.UTF-8

Also go to Tools, Preferences…, Hardware and change the hardware from ALSA to OSS

Computers, Uncategorized

The Coolest Laptop Ever

Last month i saw in the Myer catalogue an advertisement for a 7 inch Asus laptop for only $499!!.. so i rushed immediately to the store at 9:50pm (10 minutes before closing to get one). It was well worth it. This little Laptop comes pretty standard from the Asus factory, and is in stock form is very limited.. but with a little tweaks you’ll end up ditching your regular laptop and using it for every day tasks. I personally haven’t touched my macbook for about 1 week now.. and i’ve only picked it up now to write this blog post.

Although a lot of the specs are not officially listed on the box with some digging i’ve found out what the Eee PC 701’s specs really are:

CPU : 900mhz (although the stock Xandros linux from Asus limits this to about 630Mhz in a hope to keep it cool on your lap)

HD: Solid state 4GB (although 8GB will be at Myer in January, so will a vide range of colour choices.. including pink for the ladies.)

RAM: 512MB of the DDR2 kind (nice!)

Display: 7inch.. similar to what you’d find in a portable DVD player.. helps keep the cost down.

Camera: It has a build in VGA camera and mic.

USB: It has 3 X USB 2.0 ports, + a MMC/SD card slot.

CD-ROM – BYO… just plug in an external

Ok so once you’ve gone and bought one you have a few options to think about. Should you keep the standard OS and tweak it? or should you attempt to put a real OS such as Ubuntu on it.. and pray all the drivers work?

In my case i’ve tried both, and in the end to allow the laptop to have WPA Enterprise (to connect to the UOW network) I had to go with a fully tweaked Ubuntu install.

There are a lot of time wasting forums out there.. and none of them appear to be helpful especially if your interested in using wifi with WPA Enterprise. So here’s a really quick lowdown on how to get the most out of your Eee PC.

Upgrading Asus’s standard Xandros OS to Advanced Mode:

Basically you need a working internet connection, be it a non-encrypted network close by that you can connect to… on an ethernet cable directly. Plug it in now…

Ok the standard Xandros OS you get is great for someone that’s never used a computer.. but sometimes you want more….

Step 1:

press CTRL-ALT-T

This will bring up a terminal window…. a feature which is not listed anywhere by the way.

then type

sudo apt-get install ksmserver kicker

let this run, if it asks you any questions just answer yes (ie. Y).

now reboot!!

Now once that is done, you have converted your Eee PC into Advanced Xandros mode. Next thing to do is make it permanent.. find the icon called Personalisation, and tick the little box that says boot into Advanced mode (or similar). You will now also notice that whenever you hit the power button an extra “Advanced” icon is on the very left… handy if you like switching between the two types.

Step 2:

If your like me you’d at least want a C++ compiler, a VLC media player, GIMP etc.. and to do this we need to add some package sources.


sudo /etc/apt/sources.list

and then make yours look like this:

deb http://update.eeepc.asus.com/p701 p701 main

deb http://update.eeepc.asus.com/p701/en p701 main

deb http://xnv4.xandros.com/xs2.0/upkg-srv2 etch main contrib non-free

deb http://dccamirror.xandros.com/dccri/ dccri-3.0 main

deb http://www.geekconnection.org/ xandros4 main

deb http://download.tuxfamily.org/eeepcrepos/ p701 main

Then when you run the Synaptic package manager from advanced mode you’ll have heaps of stuff to choose from… but don’t go crazy…. only install the app’s you need.. as some of them will break the entire system.. or at least kill the wifi…


How to install Ubunutu 7.10 on the Eee PC 701

Again we need the internet to be on… this time an ethernet cable is required… as well as an external DVD drive…

Boot into Ubuntu Live Persistent mode—Start up the Eee and hit the Escape key (ESC). This will bring up a dialogue asking which drive you want to boot from. Choose your External DVD drive and hit enter. It will take very little time to boot to the Ubuntu Live option page. Select the first choice start/install etc… and hit Return. Ubuntu will start unpacking the kernel and this can take a few minutes. Then you’ll be in live ubuntu mode. Before we start the install we might want to do one more thing… as the screen is tiny.. a lot of the install box’s will be off the screen.. and we want to be able to see them.. hence the next step.. (otherwise skip the next step and just keep hitting enter.. fingers crossed.)

Make those windows draggable—The most important tweak to do is to make sure all the windows in Ubuntu are draggable, so that windows that default to a taller size than the Eee PC’s default screen can be moved into a useable position. Fortunately, there are some pretty useful instructions for doing this on the Eeeuser wiki that I found via this helpful blog post. Launch the Terminal by navigating to Applications—>Accessories—>Terminal via the menu bar at the top of the screen. At the command line type in gconf-editor and hit Return. This will launch a GUI window with a long list of items in the left side bar. Follow this path:







Then uncheck constrain_y

done, you may want to repeat this step once you’ve fully installed ubuntu.

As soon as you do this, you should be able to hit the Alt key while clicking on any window to drag it wherever you like.

At the partitioning screen choose manual.—Using the Guided option will work, but it set’s you up with an ext3 partition and some swap space. Since the Eee sports a flash-based drive, we want to avoid swap space, because it writes to the drive too much. Some people are saying you should avoid ext3 partition b/c it’s journaling and also does more writes. Most people advise ext2, Choose the internal drive (it’s the one whose partitions = 4GBs), choose to format it as a single partition , choose a format for the partition (go with ext2 or ext3. Some people are recommending JFFS b/c it’s good for flash drives, but I haven’t seen any “I did this and it works great” reports yet so I steered away from it). Set the mount point to / and ignore the warning that pops up about there not being any swap space, you don’t want a swap space so it won’t wear out your solid state HD.

Go with the defaults for everything else—Click on through, set up the defaults for your username and password and start the full install. After it’s done, run your Eee over to your wired Ethernet internet connection and the boot time off the internal disk is about 52 seconds. (not 12 seconds like Xandros simple mode.. but good enough).

Wireless internet using native Madwifi drivers

Atheros has been sporting enough to release a patch to the binary hal layer of the madwifi driver for the wireless card in the EEE. In short, this means to have a native working madwifi driver, all one has to do are some quick steps to compile new modules and install them.

Note: If you have previously followed the steps to use ndiswrapper, you will have to unblacklist the ath_pci module so that the kernel can use the new driver.

The quickest directions I have seen come from this madwifi ticket

[http://madwifi.org/ticket/1192#comment:186] and are presented below with some slight modifications.

sudo apt-get install build-essential

wget ‘http://madwifi.org/attachment/ticket/1679/madwifi-ng-0933.ar2425.20071130.i386.patch?format=raw’

wget http://snapshots.madwifi.org/madwifi-ng/madwifi-ng-r2756-20071018.tar.gz

tar zxvf madwifi-ng-r2756-20071018.tar.gz

cd madwifi-ng-r2756-20071018

patch -p0 < ../madwifi-ng-0933.ar2425.20071130.i386.patch\?format\=raw

make clean


sudo make install


If that looks too much for you i’ve made life easier and done it all for you… just do these lines instead.

wget http://www.uow.edu.au/~lukes/DATA/eeepcwifi.tar.gz

tar zxvf eeepcwifi.tar.gz

cd madwifi-ng-r2756-20071018

sudo make install

Now your wifi will work as soon as you reboot!!!

Note that if you run the standard updates.. and it decides to update anything relating to the network manager it will kill this patch.. so keep this tar file close by in case you need to re-install it later on.

Next thing i’d do is go and disable anything relating to the quick tracker (search) toolbar.. as its indexing will kill the internal solid state drive!

Then you might want a few other tweaks.. like re-assign the shortcut keys to the volume etc.. yourself using ubuntu’s menu’s.

There are other thing like enabling the internal mic, and video drivers etc.. which i can tell you about if you email me.. but i can’t be bothered typing them all out now… the main thing is that you now have working wifi, and a real OS running.



Sending e-mails via Telnet Command Line

If your away from home and the network forbids you from visiting site like hotmail, or you only have a command prompt environment and you don’t want to have your email message logged explicitly by using the local <mail> (a.k.a sendmail) , then there is another option.
Once in a command prompt environment in either:
linux/osx/Unix/DOS (maybe even Sun) etc..
you can quite easily use telnet to connect to a remote mail server and send an email as if it came from your nominated address (e.g. hotmail, gmail etc..)
In order to access your mailbox you will need 3 things:
* An active internet connection (an embarrasing stage to miss sometimes!)
* The address of a mail server capable of relaying the message for you – usually provided by your dialup provider (e.g. mail.domain.ext)
* A valid email address (e.g. mail@domain.ext) , or maybe even an invalid one… just don’t expect to see any replies back.
The first thing to do is to open a connection from your computer to your mail server.
telnet mail.domain.ext 25
You should receive a reply like:
Trying ???.???.???.???…
Connected to mail.domain.ext.
Escape character is ‘^]’.
220 mail.domain.ext ESMTP Sendmail ?version-number?; ?date+time+gmtoffset?
You will then need to delcare where you are sending the email from:
HELO local.domain.name
Dont worry too much about your local domain name although you really should use your exact fully qualified domain name as seen by the outside world (the mail server has no choice but to take your word for it as of RFC822-RFC1123.)
This should give you:
250 mail.domain.ext Hello local.domain.name [loc.al.i.p], pleased to meet you
Now give your email address:
MAIL FROM: mail@domain.ext
Should yeild:
250 2.1.0 mail@domain.ext… Sender ok
If it doesn’t please see possible problems.
Now give the recipients address:
Should yeild:
250 2.1.0 mail@otherdomain.ext… Recipient ok
If it doesn’t please see possible problems.
To start composing the message issue the command DATA
If you want a subject for your email type
Subject:-type subject here-
then press enter twice (these are needed to conform to RFC 882)
You may now proceed to type the body of your message (e.g.
To tell the mail server that you have completed the message enter a single “.” on a line on it’s own.
The mail server should reply with:
250 2.0.0 ???????? Message accepted for delivery
You can close the connection by issuing the QUIT command.
The mailserver should reply with something like:
221 2.0.0 mail.domain.ext closing connection
Connection closed by foreign host.
501 nouser@nosuchplace.here… Sender domain must exist
The domain that you are sending from must exist
503 Need MAIL before RCPT
A recipient has been specified before a sender.
550 mail@domain.ext… Relaying Denied
The mail server has refused to relay mail for you, this may be for any number of reasons but typical resons include:
Not using this provider for an internet connection and/or
Not using an email address provided by the owner of the server.
If you type too quickly, sometimes it won’t recognise your text, and just remember not to make any typos – as telnet will garble your backspace keys, and you’ll have to start typing your message all over again.
Pretty handy when on the go :-)