Jump to content
xisto Community
Compute

Run Your Own Mail / Radio Server SHOUTcast and more

Recommended Posts

firstly i want to point out that i did have alot more images that i took for this tutorial but i was only aloud to show 15 in this post B)

 

ill ask for the ammount to be raised then i can add the rest in B)

 

ok here we go..

 

Audio Streaming Server (Radio)

 

What is a Streaming Audio Server

Its an application that will allow you to "stream" or send a continuous block of data to a client. In a few words, it will allow you to put your own radio station online, where it will be feed by sound files lying around your hardrive, and then clients will connect to the server, and will have the chance to listen whats being playing, just like a plain old school radio station, only that this one is digital, thus allowing better quality, and management is really simple after you follow some simple steps in the initial configuration.

 

For this tutorial, we'll use two available solutions, both are very good in the sense they do their job well, so its up to you to decide which one to pick up in the end icon_biggrin.gif

 

 

1.1 Winamp

Required by the broadcasting client to send the music files straight to the server.

 

Download

Code:

 

http://forums.xisto.com/no_longer_exists/

 

 

 

1.2 SHOUTcast Server 1.9.5

This one directly from Nullsoft, the creators of winamp. i was going to use it on corzndesign but decided to host it myself B)... i know lol bare with me.

 

Download

Code:

 

http://forums.xisto.com/no_longer_exists/

 

Installation

This is very simple. All you have to do is follow the "advanced" windows approach, aka "next->next->next"

Once you're done, you'll have a folder C:Program FilesSHOUTcast which is the default, and the one Ill be refering to in the rest of this tutorial.

 

Configuration

Now we're off to configure the server to make it run smoothly. Follow the newly created shortcuts in the start menu (folder SHOUTcast DNAS), and run the server configuration utility SHOUTcast DNAS (GUI)

You should get an image like this one

 

404.png

 

Ok, now you we're off to explain the menues

 

Kill Server: Self-explanatory icon_biggrin.gif. It kills the serve, and all active client connections. So use it when you just want to shut it down for a while. Notice also that when you run the application, a little icon is displayed in the system tray.

404.png

Hide Monitor: Will basically minimize the window. The only way to get it back is via the aforementioned icon in the system tray. You can also access this function from the "X" button of the window.

Edit Log: Will simply give you access to the log file of the server, where useful information such as startup time, clients connection and so on are displayed. You can save the file to your hardrive, for historical purposes or whatever suits your needs.

Edit Config: This is the most important part, and the one Ill focus here, since it gives you access to all the configuration parameters of the server.

 

404.png

 

As you can see, you need to restart the server if any changes were made in order to the server to reload the new values. Notice if it opens notepad by default, probably the end-line characters wont be parsed correctly, which in plain english means you'll see sort of gibberish. So, close the server, and go straight to C:Program FilesSHOUTcast and open the file sc_serv.ini with another text editor, such as wordpad, which recognizes unix end-line characters correctly.

 

Now I'll explain the most important options, change them accordingly to suit your needs, or leave the default if you're still confused about any. Notice the developers of this great application made a good job, and they explained the options very well in the ini file, however, if you still are a little lost, follow my prior advice.

 

 

* MaxUser : This is the maximum allowed number of simultaneous listeners. This is, the max number of users that can be connected at the same time to your server. This one is a little tricky as it depends on your connection speed, so you might want to customize this to suit your needs.

In the docs, there is a function to calculate this:

Code:

 

MaxUser = [upstream speed of your connection] * 0.9 / [Desired bitrate]

 

So lets suppose your upstream connection (the speed you can upload at) is 350, and the bitrate you want to serve your mp3's at is 32 kbps:

Code:

 

350 * 0.9 / 32 ~= 10 users

 

But be aware you can play around with this number, and you can even try to set it higher, but then you'll need a bunch of beta testers that might want to connect to your server and then report you how well it did, if they had connection problems, if the sound had glitches, etc...

So if you're not sure, set it to the number of users given by the above function (or even less).

* Password : This is the admin/broadcast password, that you will use to administer the server via a web-interface (more of this later) and to send the broadcast via the DSP plugin (next section..).As usual, enter a hard to break password, likely containing letters, numbers, punctuation characters and caps.

Notice there is an option to use this password as the one for broadcasters, and use another one for administration (separately that is), but for the sake of ease, lets just use this one for both functions.

      Default:      Password=changeme      Example:      Password=YoU.W0nt.Bre4k.ME.587
* Portbase : Simply the port where your server will listen for client requests, aka the little door in your PC that clients will try to connect to (or open). Default value is recomended.

* AutoDumpUsers : Simply put, if you shut down the server, why dont you disconnect the clients too?

 

      Default:      AutoDumpUsers=0      Recomended      AutoDumpUsers=1
 

We're done with the configuration. Piece of cake, eh icon_biggrin.gif . Save the changes and close the file.

 

 

1.3 SHOUTcast DSP 1.8.2

This one directly also from Nullsoft. This is a Winamp Plugin that will allow you to send the real broadcast to the server you just configured, aka it will stream the mp3 so that it can be listened to.

 

Download

Code:

 

http://forums.xisto.com/no_longer_exists/

 

 

Installation

Close Winamp if its opened. Then, again, follow the "next->next->next" approach... icon_biggrin.gif

 

Once you're done, you'll want to check out if the plugin was installed correctly, and get ready for the next step.

Simply open Winamp, then hit Ctrl+P to open the preferences window:

 

 

 

Now close the preferences window, and the DSP dialog should be shown by now (and everytime you start Winamp).

At this point we have to configure the DSP plugin to start the broadcast.

 

Configuration

Now we'll take a look at the different tabs, and what we should fill in the different fields of these

 

 

* Main Tab: Its the worthless of them all. Basically it will show you the status of the different Outputs and the DeciBels.

 

404.png

 

* Output Tab: This is the most important of them all. Screw something here and you wont have your server streaming any sound icon_biggrin.gif

 

404.png404.png

 

Lets go easy on this one.

The output part will show you which one of the 5 outputs are you configuring. What this means is that you can have your DSP plugin stream sounds to 5 different servers, thats all. For ease purposes, lets just leave it selected in the output #1 and forget about the others.

The status part will show more or less the same stuff that in the Main Tab. But whats important is the button connect. You are supossed to push it once all this configuration is done, to start broadcasting the sound right to your server. (Final step).

 

Now lets head over the Output Configuration part.

In the address field just write the IP or domain name for your server (the server you will be broadcasting to, that is). Notice that if your server is at the same computer where you will be using the winamp+DSP plugin, then you can just put localhost and thats it.

In the port field, put the Portbase value you configured for your server above, in the former section...

In the password field, put the Password value you configured for your server above, in the former section...

From the encoder list, just pick up 1, since basically you will be able to make 5 different configurations for 5 different outputs (remember?), so, since we'll be using just output, then we just configure 1 encoder, and this is the one we select here (more on encoders later)

Push the checkbox Enable Reconnection on Reconnection Failure, that means if there is a problem with your server, then the DSP plugin will try infinitely to reconnect until its up again

 

Now lets head over the Yellow Pages Configuration part.

The checkbox Make this server public (Recommended) basically will allow your server to be listed in http://www.shoutcast.com/ listings. Wheter you want to do this or not (you want to keep this private) its your call. Two things you need to have in account. First, your shoucast server needs to have a domain; if it has an IP, then you wont be listed there. And second, from the instant you begin the broadcast by pressing the button mentioned above, it will take from 10 to 15 minutes for your server to be listed there. Once its listed, it will look like this (I made a search for Billy Boy and thus I got my server among the results)

 

404.png

 

So as you can see, anyone going to http://www.shoutcast.com/ could find out about my server, and tune it. If you want to keep it private, then just dont click the checkbox, thats all.

In the Description field... well, just put your server description, to be shown in shoutcast listing as shown above, and this is also what your listeners will see in the music player playlist.

The URL field is usually an address where people who got to your server through the shoutcast listings, can find more information. This should be sort of your website or the radio's website. You get the picture. But please notice this URL has nothing to do with the Address field we went through before, they can be the same, but dont have to...

Now the Genre field is self-explanatory...

And finally the fields AIM, ICQ and IRC are just contact addresses, pretty much like URL so you know what to (or what not to) put in here... icon_biggrin.gif

 

* Encoder Tab: This one is simple. As explained before, choose the Encoder 1 item in the list, and select the appropiate Encoder Settings, aka the bitrate we even made a math formula above, remember?

In the Encoder Type field just leave the default value...

 

404.png

 

* Input Tab: This part will tell your Winamp what to broadcast, your MP3s (Winamp (Recommended)) that winamp is playing right now or...

Little Joe wrote:

 

Mom, I wanna be a real DJ

 

Ok, sometimes, you'll want to broadcast your ugly voice icon_twisted.gif to your listeners (poor them)... How do you do that? Simple. You select Soundcard Input as your Input Device, change the Input Settings to what you consider and then pull out that dusty microphone and start speaking...

One tip here, you can dynamically change between Winamp (Recommended) and Soundcard Input as much as you want, and play to be like a real DJ in a radio station. Notice that when you change from Soundcard Input to Winamp (Recommended), if you take, lets say 10 seconds to hit the play button in winamp (to start playing a song), these 10 secs wont be streamed to your listeners, so you have time to speak, something among the lines "Now enjoy SongX", change the Input Device to Winamp (Recommended), search for the song in the playlist (or load it), then hit the play button. Your listeners will only listen to the "Now enjoy SongX" and right away the song, no interruptions in the middle. Rather cool, eh?

 

 

 

Now you're done. Hit the connect button in the Output Tab and you'll be broadcasting to your shoutcast server right away.

 

Administration

You can now administer your shoutcast server from a web-based interface.

To access it, just go with your browser to

Code:

 

http://forums.xisto.com/

 

Where yourserver is the value configured in the field address of the Output Tab in the DSP plugin, and port is the Portbase value you configured for your server

In the example we have been following along, its would be

Code:

 

http://www.billy-boy.com/

 

 

You'll be looking at something like this

 

404.png

 

 

* Status: The "welcome" screen you see in the image...

* Song History: Well... the list of streamed songs since the server was started

* Listen: Basically, the link you have to give your listeners so they will be able to connect to the server and start listening (doh!). If you are not very good with the html, copy & paste this code inside a HTML page (maybe the one pointed by URL in Yellow Pages? icon_rolleyes.gif)

<a href="http://www.billy-boy.com/error-404.html src="tunein.gif" width="49" height="15" border="0"></a>

And replace the href tag to what the link in Listen points to.

Here is the classic "tune in" image

 

404.png

 

 

* Stream URL: Basically, the URL in Yellow Pages (DSP configuration dialog if I lost you here)

* Admin Login: This is where you play to be an admin. I will only tell you, to login you need a login/password combo. The login is just admin, and the password is the Password variable in the shoutcast configuration file (sc_serv.ini).

As I explained above, you could have a unique password for admin functions, if you fill in the field AdminPassword in the aforementioned ini file. (Just take away the ; (semicolon) and put the password you want.

If you enter a password there (in AdminPassword), then this is the one you will use here, otherwise just use the mentioned one (Password). If you're lost here, then nevermind and just forget what I said in the last 2 paragraphs (including this one) icon_biggrin.gif

Since I hate to be a party boomer, Ill let you enjoy the fun and test all of the options in the admin page by yourself.

Consider this a teaser

 

404.png

 

 

 

Testing

Ok, so you have your server up and running, but now you need to somehow test it, to check out if everything is working as expected, right?

If you dont have two computers to test it, and knowing the fact that winamp wont allow two instances of itself to be running at the same time, what would you do? icon_rolleyes.gif

So dont fear. There are a number of media players that support shoutcast streams, and we will look at one of them.

The name's XMPlay, and its a very lightweight media player, that can be freely downloaded from here

Code:

 

http://www.un4seen.com/files/xmplay32.zip

 

Now lets see what might be the URL your users will need in order to connect to your server. I explained in the subsection above how to get this URL by means of the admin panel, but if you want to know how do you get int manually, here it is

Code:

 

http://forums.xisto.com/

 

Where yourserver is the value configured in the field address of the Output Tab in the DSP plugin, and port is the Portbase value you configured for your server.

In our now old and rusty example, it is

Code:

 

http://www.billy-boy.com/error-404.html

 

 

Then fire up XMPlay, press the key O (keyboard shortcut to open files/URL) and fill the appropiate value

 

404.png

 

Now you shoould be listening to your radio server!

 

Just FYI, in Winamp you open an URL with Ctrl+L.

 

 

 

2.1 Winamp

Refer to Section 1.1

 

2.2 Icecast 2.2.0

This one directly from the creators of the ogg sound format, among other open source niceties.

 

Download

Code:

 

http://forums.xisto.com/no_longer_exists/

 

 

Installation

This is far easy. Just follow the "next, next, next" approach and you're done with it.

 

Configuration

So, we're all set to start configuring the server. Run it by using the shortcut in the desktop (Icecast2 Win32), and then you'll be introduced to the following screen

 

404.png

 

There is not uch to explain about the GUI, so Ill just tell you the help is located in the About menu icon_biggrin.gif

Before I start spitting my gibberish here, lemme explain, that the configuration is done by changing/adding values to an XML file, namely icecast.xml in C:Program FilesIcecast2 Win32 (if you installed icecast in the standard path). So, if you're familiar with XML, then you have a slight advantage on your side. However, if you dont know XML or dont even know what it is, no problem, the configuration procedure is still piece of cake (seems like everything in this tutorial is icon_lol.gif)

But I know there are some folks out there who like to learn something new, so the beginner point by excellence to learn XML is this one

Code:

 

http://www.w3schools.com/xml/default.asp

 

 

Ok, now lets continue. Head over to the Configuration menu, and select the only available item in there (Edit Configuration). You should see the configuration file right now, opened in notepad.

BTW, while you're editing the file, you cant start the server, since the main window freezes. This is normal, and its made for security purposes (although you can simply go to the installation folder, and open the .xml file... icon_biggrin.gif)

Now you can safely select all the text (ctrl+a) and then delete it. Then just copy & paste all of the code below

<icecast>

 

<limits>

<!-- Total number of concurrent connections (not only refering to clients!) -->

<clients>20</clients>

<!-- Total number of sources supported. Since we'll be using only the shoutcast plugin in this example, 1 oughta suffice -->

<sources>1</sources>

<!-- Number of seconds without response from a source, before it gets disconnected from the server -->

<source-timeout>10</source-timeout>

</limits>

 

<authentication>

<!-- Password used by the source (shoutcast in this example) to connect to the server -->

<source-password>YouCantBreakMe</source-password>

<!-- The username for the administration functions (used with admin-password) -->

<admin-user>admin</admin-user>

<!-- The password for the administration functions (used with admin-user) -->

<admin-password>IBeAdminYouBeNot</admin-password>

</authentication>

 

<!-- Yellow page settings. You dont need to change anything here for now. -->

<directory>

<yp-url-timeout>15</yp-url-timeout>

<yp-url>http://dir.xiph.org/cgi-bin/yp-cgi;

</directory>

 

<!-- The name of your host, used by the admin panel and your sources, you can set this to localhost if you know what it implies -->

<hostname>http://www.billy-boy.com/;

<!-- The port your sources will use to connect to your server, and the one you'll use to connect to the admin web interface -->

<listen-socket>

<port>8000</port>

</listen-socket>

<!-- A miscelaneous setting used to add compatibility with shoutcast (we'll be using it as the source in this tutorial) -->

<listen-socket>

<port>8001</port>

<shoutcast-compat>1</shoutcast-compat>

</listen-socket>

 

<paths>

<!-- Where the log files will be stored (relative to the host root) -->

<logdir>./logs</logdir>

<!-- Where the admin web-based interface can be accessed (relative to the host root) -->

<adminroot>./admin</adminroot>

</paths>

 

<logging>

<!-- Where all the accesses(requests) will be stored (relative to the logdir) -->

<accesslog>access.log</accesslog>

<!-- Where all the server errors(duh!) will be stored (relative to the logdir) -->

<errorlog>error.log</errorlog>

<!-- Level of the messages logged by the server: 4 Debug, 3 Info, 2 Warn, 1 Error -->

<loglevel>3</loglevel>

</logging>

 

</icecast>

The lines in bold are purely so for formatting purposes. They are XML comments that I made, in order to help you change whats required. This is pretty much straightforward, not a lot to explain here. If you need further help, go to About->Help menu in the icecast main window, for a more detailed explanation on every single variable available.

 

Now spank that Start Server button to run the server.

 

2.3 SHOUTcast DSP 1.8.2

Refer to Section 1.3 of this tutorial, for installation and configuration options, they are pretty much the same. Just a few things change.

 

Configuration

To make things short, here is a screenie showing what the Configuration tab should look, if we take in mind the example icecast.xml configuration above.

 

404.png

 

Notice the password in red is the value of the element <source-password>.

The Yellow pages configuration is pretty much the same. Nothing changes.

So, if everything went ok, you can search for your server once its up and running and Shoutcast DSP broadcasting here

Code:

 

http://dir.xiph.org/index.php

 

 

In our example, this is how it looks

 

404.png

 

Administration

You can now administer your icecast server from a web-based interface.

To access it, just go with your browser to

Code:

 

http://forums.xisto.com/

 

Where yourserver is the value configured in the element <hostname> in the icecast.xml file; port is the <port> element in the first <listen-socket> of the sample configuration file above, and admin_path is the value of the element <adminroot>.

Following the example, it would be

Code:

 

http://www.billy-boy.com/error-404.html

 

 

Now, when you try to access the admin interface, it will ask for a login and password, those are the elements <admin-user> and <admin-password> I talked about in the configuration file (icecast.xml if you're still lost).

 

The interface is too simplistic and rather ugly, but everything IMHO is really easy to understand, so you're on your own now icon_smile.gif

 

Testing

Refer to Testing in Section 1.3.

 

The URL for your listeners is this one

Code:

 

http://forums.xisto.com/

 

Where yourserver and port values are the same used to access the admin interface (subsection above). So in the example it would be

Code:

 

http://www.billy-boy.com/error-404.html

 

 

 

Forewords

So, now I have introduced you to 2 of powerfull tools for your internet radio needs. Which one to choose in the end is your call.

If you ask me, Id preffer Icecast, since the docs are way better, and its easier to set up.

Have in mind, I explored here the simple way of broadcasting (i.e by means of the Shoutcast DSP plugin), but in both servers you can also broadcast files without the need of an aditional plugin (aka, no winamp at all), but its more complicated, clumsy (as you dont have the ease of just firing up a playlist and start playing right away, plus the I wanna be DJ -your voice- thingy is also really neat), but you can always check the documentation of both applications more deeply.

I hope you enjoyed this one icon_wink.gif

 

[hr=noshade]

 

Mail Server

 

What is a Mail Server

You know this. A mail server allows you to receive mails from other mail servers around the internet, provided you create user accounts. It also allows your users to send emails to other mail servers.

 

For this tutorial, we'll use a solution that is freeware, and does its job perfect. I've been using it for about one year, for my local development in php.

 

1 Mercury/32 Mail Transport System 4.01a

This one directly from Pegasus Mail, by David Harris

 

Download

Code:

 

http://forums.xisto.com/no_longer_exists/

 

Installation

This one is a little overwhelming, but once you're done with it, the procedure for configure and get your server running becomes an easy, quick task.

Ill explain the steps carefully. Run the installer and press setup (this is a very simple self-extracting program, that leaves no trace in the registry, so to unistall, you simply remove the created folder in the installation)

 

 

1. Press the button New Installation

2. Since we wont be using support for Netware Networks, just press the button No Netware Support

3. Now select the directory where you want to install Mercury (or simply extract the contents, as explained before). Recomended is the standard windows installation path C:Program FilesMercury. Press the button Ok, accept this directory

4. Since the Mercury server can be used along with another mail client by the same company, Pegasus Mail (yes, the name of the company and the email client are the same), it asks you if you want to enable the support for such mail client. For reasons beyond the scope of this tutorial, we will not be using Pegasus Mail, so go ahead and press the button No Pegasus Mail integration

5. Now it asks you for the directory where it should put the user mailboxes. Just leave it as-is (If you followed the recomended installation path, the it should show C:Program FilesMercuryMAIL). Press the button Ok, accept this directory

6. Now it will ask you what protocol modules do you want to use. Basically, each one is a component in the form of a plugin, that will give you a given functionality. This is basically the core of the application. You can come back later and pick up the modules you want/require when you are more versed in these matters. For the moment just follow my advice to get this up quickly icon_wink.gif

Select only the modules Mercury S and MercuryP (the first and second ones in the list).

The first one will sit and listen from outside connections (aka when someone sends you an email to your own server), and everytime he receives one, this is put in the spool directory.

The second simply will allow your POP3 client (outlook, thunderbird) to read email in an account in your server.

Now press the button OK, continue installation

7. Press the button Install MercuryE. This is the module that will handle delivery of mail to outside servers (aka when you send email from your own mail server to someone in yahoo, google, etc...)

8. Now it should ask you for a domain name. This is your domain name in case you have one (or get one free at some of those free dns services around the net), or your own IP. This one can be either 127.0.0.1 -localhost, for testing purposes only- or your actual IP adress assigned by your ISP (e.g 200.197.167.92).

The other field, postmaster, is simply what could be considered as the username in your machine that will act as the postmaster for the server, or what it is the same; the user who will get problem reports. Just use anything for the time being

This is an example figure. We will use your ISP assigned IP, so that you can test this with an online connection, and in case you dont have a domain name. In the postmaster field, you can leave "Admin" which is the default, if you want to.

 

 

 

 

Now press the button OK, continue installation, and we are ready to move on

9. In this step, you will be asked about the relay controls. When you become familiar with relaying, you can chose the one that fits your needs. But for the moment, just press the button None

10. Now its time to choose the Queue directory. Again, it should by default C:Program FilesMercuryQUEUE, then leave it as-is, and press the button OK, continue installation

11. We are set. This is -at last icon_razz.gif- the final step. So go ahead and press that button Install Mercury/32 to stop the suffering

12. Now, as a the worthless note ever, press the Exit button to close the installer

 

 

 

Configuration

This is an easy step, compared with the installation process, believe me. So you can just relax, follow my instructions confortably, and you should have your server up and running in no time from this point.

 

So, run the server, which should have a submenu in the start menu, called Mercury for Win32; then pick up the item Mercury Loader

Now you should be presented with a window like this one, which is basically the control center of the application through the menus. You can see also 3 windows if you follow the instructions to the letter, each one represents respectively the Core Process that is the main module, and the POP3 and SMTP servers.

 

 

 

So, the next part if to create user accounts. Lets create one for this example. Go to Configuration-> Manage local users..., then press the button Add, and enter the details as required, like in the picture

 

 

 

Now press the button Ok and close the other window if you want to. And as you can see, now we have created the mail account billgates@200.197.167.92

 

There are two last things to do.

Go to Configuration->MercuryP POP3 Server, and simply fill in the field IP interface to use, in the case you're using an IP and not a DNS.

So in the sample case we've been following around, this field needs to be filled up

 

 

 

Now do the same for Configuration->Mercury SMTP Server; i.e fill the field IP interface to use

 

 

 

Now all its left to do is to configure your mail client to be able to read/send mails using your newly created server and a user account.

 

Extra Configuration

What? There's more?. Yep. In this section we will deal with two possible scenarios.

 

Scenario 1: Dynamic IP Address

Ok. What is a dynamic IP Address? Well, all dial-up users like myself, and some broadband ones, have what is known as a dynamic IP address asignation schema, which in plain english means you will have a different IP address every single time you connect to internet. This sucks. I know.

So, as you can see, we went through each of the installation/configuration steps pretending to have an example IP address, but everytime you connect to the internet, changes must be issued in order to update your mail server configuration.

Is there any solution for this? Yes. Check out the Help section at the end of this tutorial. For the time being, lets go over the wonders of Dynamic IP Addresses...

The first thing that needs to be done, is to update the corresponding values in the fields IP interface to use, revised in the last two images above.

So lets pretend your IP address is 200.197.167.92, but next time you connect to the internet your ISP assigns you a new one: 200.197.167.73

So the first two changes look like this

 

 

The next changes are located at Configuration->Mercury core module....

First one is on the tab General. Just change the field Internet name for this system accordingly

 

 

 

Now go to the tab Local Domains, select the second item, press the button Change entry, and enter the new value

 

 

 

Thats it. This needs to be done every single time you connect to the internet. Painfull I know icon_twisted.gif

 

Scenario 2: Domain Name

So, you are a lucky one, and own a domain name. Domain names are basically ways for us human beings to remember internet directions easily. If I told you go to 64.233.187.99 that wouldnt make much sense isnt it? So, go ahead and type that in your browser URL bar. What show up in the screen? Thats right, our beloved google. Which means that IP address is google address, and https://www.google.de/?gfe_rd=cr&ei=BwkjVKfAD8uH8QfckIGgCQ&gws_rd=ssl is simply google's domain name.

Again, if you dont own a domain name and would like to have one, read the help section at the end.

 

Ok, so you have your own domain name, do you have to make all the "difficult" configuration stuff in the last subsection? Of course not. You wont have to change anything at all once you have configured the basics of your mail server.

Since it easier to explain how to install the mail server when you have a domain name, instead of showing you the changes required to use a domain name rather than an IP, go ahead and delete the folder C:Program FilesMercury, in case you already installed mercury and followed the instructions for using an IP icon_twisted.gif

No worries here, all aforementioned installation steps apply, with some minor differences. We will be using the example domain name http://www.billy-boy.com/

 

 

* Step 8: Put your own domain name in the adecuate field

 

 

 

There is though one little thing to change when using a domain name. In order for the outside delivery to work, we need to add a valid dns lookup server (i.e so that you wont get an unresolved error for gmail.com, hotmail.com, etc...). So, we fill in the field Identify Myself As: in Configuration->MercuryE SMTP Client

 

 

 

 

2.1 Outlook (Mail Client)

Since Outlook is very popular, and is bundled in M$ products, such as Office, Ill explain the configuration. Its really simple, so hopefully there's no much to explain.

 

Configuration

 

 

 

Thats it. Basically, your account properties should look like that, in the case you're using a domain name, otherwise just fill in the IP

 

 

 

We're done here. Now you should be able to send/receive emails (thanks to the POP3 module) through your own server in outlook.

 

 

2.2 PHP Mail (For programmers)

Now, if you are programmer looking forward to learn php, it always comes in handy to have your very own mail server for testing. So Ill just show you a sample php script to send mail through your server. Im going to use the Apache HTTP Server with PHP. Both need to be installed and working for this script to work properly icon_twisted.gif

Just FYI, Im running Apache 1.3.20 and PHP 4.3.10.

 

PHP Configuration

 

Open the file php.ini, likely located at c:windowsphp.ini. Now search for the line [mail function], and change the parameters in there accordingly (or fill them)

 

 

[mail function]; For Win32 only.
SMTP = billy-boy.com
smtp_port = 25;

For Win32 only.sendmail_from = admin@billyboy.com
 

Notice you can also use an IP instead of a domain name, or just localhost in case you are running the script locally, in the same PC where the mail server is.

 

Thats it. Basically, your account properties should look like that, in the case you're using a domain name, otherwise just fill in the IP.

As you can guess by now, PHP uses the SMTP Server module to communicate with the mail server, and try to send mails through it.

 

The PHP Script

Made by myself, so do whatever you want with it, i.e public domain licensed. Not that its awesome in any sense...

 

File: mail.php

 

<?php// Simple mail() wrapper 1.0/* @params    $to_email : Destination mail(s). If several, must be separated with commas    $to_name: Destination name(s). If several, must be separated with commas    $from_email : Sender email    $from_name : Sender name    $subject : ...    $message : The body. Can be plain text or html    $is_html : TRUE is $subject is in HTML code, otherwise FALSE (plain text)*/function send_mail($to_email,$to_name,$from_email,$from_name,$subject,$message,$is_html){$headers="";if($is_html){  $headers.="(anti-spam-mime-version:) 1.0rn";  $headers.="(anti-spam-content-type:) text/html; charset=iso-8859-1rn";}$headers.="To: ";$to_email_array=explode(",",$to_email);$to_name_array=explode(",",$to_name);foreach ($to_email_array as $key=>$value){  $headers.="$to_email_array[$key] <$to_name_array[$key]>";}$headers.="rn";$headers.="From: $from_name <$from_email>rn";return mail($to_email,$subject,$message,$headers);}?>
 

Sample Usage Script (Single destination email and plain text body)

 

File: use_mail1.php

 

<?phprequire_once('mail.php');$message='You are my idol. No BS intended.';if(send_mail("torvalds@osdl.org","Linus Torvalds",              "billgates@billyboy.com","Bill Gates","You rule dude",$message,FALSE))  echo 'Mail accepted for delivery';else  echo 'There was an error. Mail not accepted for delivery';?>
 

 

 

Sample Usage Script (Several Destination emails plus html body)

 

File: use_mail2.php

 

<?phprequire_once('mail.php');$message='<html><head><title>What up</title></head><body><p>Im rich. You're not</p></body></html>';if(send_mail("whoever@whatever.net,anyway@anyhow.org","Little Pete,Joe Doe",  "billgates@billyboy.com","Bill Gates","You guys rock",$message,TRUE))  echo 'Mail accepted for delivery';else  echo 'There was an error. Mail not accepted for delivery';?>
 

Forewords

We're done at last. Hope you learn something useful with this tutorial, since IMO, its always tricky for a beginner to get a mail server up and running easily.

Theres obviously more to learn (a lot!) but thats outta the scope of this short tutorial, so you'll have to go ahead and figure it out for yourself or search in internet. Only this way you might become a succesful mail server admin someday. icon_cool.gif

 

[hr=noshade]

 

Obtaining a Domain Name

 

What is a Domain Name

Computers communicate with each other through an IP address of the form xxx.xxx.xxx.xxx. Since this approach is not practical for us human beings, i.e we cant remember long numbers, then we use what is known as a domain name, which is of the form (and many mutations of this form) http://www.domaine.fr/ where xxx can be org, com, net, etc...

This way, when we use a domain name, in the background a domain name server makes a lookup on that domain name (taking up to n computers) and translates it to an IP.

 

How do you obtain a domain name?

Simple: buy one. There are some cheap domain sellers, for as little as $5 US / year.

But what if you are poor, or dont have a credit card, bank account, or simply your country is not supported by well known payment methods such as paypal? Well, you can get a domain for the price of a few mouse clicks, which is what Ill cover up in this tutorial.

 

1.1 No-IP Dynamic DNS System

 

Website

Code:

 

http://www.noip.com/

 

 

Head to that website right now. Register a free account, then check your mail for the registration check. Once your account is activated, log in into the website.

Now we are ready to move on

 

Adding a new Host

Easier this cannot be. Just select Add from the menu at your left, and fill in the field Hostname, then choose the subdomain from the dropbox. Notice not all the subdomains listed are available for free, so just pick up no-ip.org

 

If you know what you're doing, fill in other required fields (not necesary for any of the server explained in these thread); otherwise head to the button of the page and press the button Create Host

 

 

 

Now you should see a success message (or error in case the domain name written is already registered, in which case, you'll need to pick up another one)

 

 

 

You can try this exact procedure to register up to five domain names, to have something like

 

 

billyboy.no-ip.org

ftp-billyboy.no-ip.org

mail-billyboy.no-ip.org

radio-billyboy.no-ip.org

irc-billyboy.no-ip.org

 

or you can try other sites like http://www.dot.tk/en/index.html?lang=en - https://srsmith.co.uk/

 

One last thing to notice here, is that, if no-ip.com doesnt recognize your IP correctly, either in the Current IP field in the upper navigation bar, or in the field IP Address in the Add a Host configuration, it doesnt matter at all. You will see why in the next section.

 

However, if you dont have a dynamic IP (i.e your IP never changes - static IP), then you must fill in the correct IP if not detected automatically, and thats it, you're done for good, and you can skip the next section. You wont need it.

 

 

1.2 No-IP Dynamic Update Client (DUC) 2.2.1

 

Download

Code:

 

http://www.noip.com/client/ducsetup.exe

 

 

Installation

Just follow the "next, next, next" approach. Choose the -enabled by default- option to run the application after the installation.

When you're done, you will be asked to login with the details of the account you already registered in the website...

 

 

 

Configuration

Now you should be presented with a screen where you can see all of your hosts, and all of them are unchecked by default. By enabling the checkboxes you are updating your IP, so that your registered domain(s) point to a valid IP.

What this means is that everytime you connect to the internet, your ISP will assign you a different IP, and this change needs to be reflected in no-ip.com database. You can do this manually though, but what for if DUC can do it for you as easy as that.

 

 

 

If you press the button options, you can change some interesting parameters, like making DUC run at startup, or make it run as a service, among others. Change any of those if you understand what you're doing, otherwise all you need to know is that, everytime you connect to internet, you need to run DUC to issue the IP changes.

This procedure by the way can take up to 10 minutes, so dont worry if your domain name doesnt work right away after an IP change. Just hold tight a little bit. It takes this long since not all that needs to be done is just change a parameter in their database; they also have to make updates to their DNS servers, and thats what takes some minutes icon_smile.gif

 

 

Win32 Bonus Trick

 

This is a simple but sometimes handy trick many people dont know.

So far, you understand localhost is the loopback address for every computer. This is, your PC will always know that 127.0.0.1 or localhost refers to itself. Now, lets say you want to change this, so that for example http://www.billy-boy.com/ would point to 127.0.0.1.

Why would you want to do this? Supose you have a lot of servers configured to use the aforementioned domain name, but ATM you're offline or just dont want to get online. So you need your browser and in general all windows applications, to treat http://www.billy-boy.com/ as if it was the local PC, without using the name localhost.

How to do it? Simple as hell, really. Just open your hosts file, commonly located at C:windowssystem32driversetchosts. Fire up your text editor and open this file.

If you never touched it before, it should look like this

 

 

# Copyright Š 1993-1999 Mcft Corp.## This is a sample HOSTS file used by Mcft TCP/IP for Windows.## This file contains the mappings of IP addresses to host names. Each# entry should be kept on an individual line. The IP address should# be placed in the first column followed by the corresponding host name.# The IP address and the host name should be separated by at least one# space.## Additionally, comments (such as these) may be inserted on individual# lines or following the machine name denoted by a '#' symbol.## For example:##      102.54.94.97     rhino.acme.com          # source server#       38.25.63.10     x.acme.com              # x client host127.0.0.1       localhost
 

 

Now all you need to do is add another host to the end

 

 

# Copyright Š 1993-1999 Mcft Corp.## This is a sample HOSTS file used by Mcft TCP/IP for Windows.## This file contains the mappings of IP addresses to host names. Each# entry should be kept on an individual line. The IP address should# be placed in the first column followed by the corresponding host name.# The IP address and the host name should be separated by at least one# space.## Additionally, comments (such as these) may be inserted on individual# lines or following the machine name denoted by a '#' symbol.## For example:##      102.54.94.97     rhino.acme.com          # source server#       38.25.63.10     x.acme.com              # x client host127.0.0.1       localhost127.0.0.1       billy-boy.com/
 

Now for example, when you have your mail server running, and you're offline, try to connect to it via smtp

 

Code:

 

telnet billy-boy.com 25

 

 

Voila! Now you should see the smtp welcome screen. That is because now http://www.billy-boy.com/ is recognized by windows, and in this case, as the IP 127.0.0.1, which is the localhost. This way you dont need any DNS lookup servers to resolve the IP, and thus, you dont need a working internet connection.

Notice you dont need to restart windows for the changes to take effect, just save the file and you're done with it.

 

Forewords

 

Thats all folks. The tutorial is over. I hope you learned enuff to send me donations! aw im only joking...unless im not? http://forums.xisto.com/no_longer_exists/ for more (will be added shortly.)

 

oh and this tutorial is in noway affiliated with bill gates... *shudders*

 

Notice from BuffaloHELP:
Complete lack of QUOTE and CODE tags. Warning issued.
Edited by OpaQue (see edit history)

Share this post


Link to post
Share on other sites

I too am going to have to try this out. At least once I change my isp so that I can actually host things(have servers). I have been wanting to do a radio station for a while now and a web server to go along with it but can't right now. Thanks for the tutorial, its very informative and helpful.xJedix

Share this post


Link to post
Share on other sites

hi all! i used to have my own radio station so in my experience i have to say that first of all what you need is a good computer in case you have to look for music that people suggest (it doesnt mean that you dont have to schedule your music actually you must), what i usually did was to have a chat where listeners could write something such as comments or just for fun, my "service" could be played in windows media as well as winamp at the beggining i had 56k connection, so you can imagine s the connection was reset many many times, after that i hired a dsl connection (512k) but unfortunately it was not enough! i could have up to 10 users connected at the same time but some of them still had problem listening to the my online radio. After a while of transmitting (like 3 or 4 months) i gave up transmitting, it invloves such a difficult task trying to promote yourself and competting against all the radios that are available trough winamp, and my suggestion for all those who would like to have a radio station first be sure of the public you are oriented at then once you are sure you can reach atleast to 15 users in one session lets set it up and have fun!

Share this post


Link to post
Share on other sites

Oh man I have wanted to startup my own mail server for AGES! I am definately going to look at this guide, as I didn't know there WERE programs out there that could help you do it. Thanks a lot Compute!

Share this post


Link to post
Share on other sites

Those were very good tutorials. They were in depth and really explained it so anyone could understand it. I have always wondered how those people made these radio stations. I would try it but my internet is way too bad.

Share this post


Link to post
Share on other sites

I know this might be a computer retarded question but does streaming music take up a lot of bandwith??? is it the same thing as allowing people to download the music bandwith usage?? or not.

Share this post


Link to post
Share on other sites

Thanks a lot for this great (in quality and extension) tutorial. I thought a couple of times about setting an online streaming radio but I hadn?t no idea to do it. I?ll try someday... I hope it can run decently with my computer. By the way, any of you actually have a radio so as we can listen to it?

Share this post


Link to post
Share on other sites

Now that is what I call a tutorial. Now, if I had a better computer, I would consider it, but I have an old computer that wouldn't run it. Now the only question I would have is, would it make it so you could have as many people as you wanted listening? And would it burn out your bandwidth. Anyway, its a nice tutorial and I will have to check into to it sometime

Share this post


Link to post
Share on other sites

Wow thanks for the shoutcast tutorial, i've been looking around for one for ages! I also can't run a shoutcast server for some reason.. I tested it out for myself, and it worked but my friends couldn't hear anything.. I guess I can only stream locally. :D

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.