View Full Version : mail.yourname.com?

12-14-2003, 08:01 PM

I am curious, I am quite new to web design and building websites in whole, but I am somewhat familiar with it. I have noticed within my Manager section of my domain, that it lists mail.yourname.com - I am wanting this to be used for the people who are given email accounts, but not sure how I am to go about using this. Rather then using the long link for Neomails, I'd like to have it in the mail.yourname.com area. Is that possible? Is it also possible to use another email service instead of Neomails, such as squiarrlmail or other similar programs? Can anyone give some advice or suggestions?


12-14-2003, 08:03 PM
Hello again,

I forgot to ask something. I realized there is the IMP area to check your mail, can members that I assign email addresses sign in here to check their mail? Or can only site administrators / managers do this?


12-15-2003, 01:00 AM
The long link to Neomail can be solved easily by creating a directory in the web site (called 'webmail' for example) and then putting a redirect file in there ('index.html') that will redirect to the real neomail. Then to go to Neomail you just need to type:
which is a lot easier to remember.

Mail clients such as SquirrelMail are IMAP clients, and we don't have IMAP on Westhost (although some people have installed it themselves).


12-15-2003, 09:53 AM
You can redirect with a index.html file in many ways. Here is one way that West Host actually uses.


12-15-2003, 01:08 PM
That relies on Javascript so I prefer:

<meta http-equiv="refresh" content="1;url=/cgi-bin/plugins/neomail/neomail.pl">
<a href="/cgi-bin/plugins/neomail/neomail.pl">Webmail</a>

12-16-2003, 09:31 AM
Along with the above solutions, to get the mail.yourdomain.com you need to create a sub domain and point that to the directory you create above.

Once that is done, you can access the webmail by both mail.yourdomain.com or my yourdomain.com/mail.

12-16-2003, 08:40 PM
Hello all,

Thank you for your fabulous help. I really appreciate the time you spent to read this question and give your helpful tips and advice. I am still trying to learn how to make a subdomain site, but as soon as I figure all that out, I'll be ready to do what ya'll have suggested. Thanks a lot!


01-04-2004, 10:07 PM
Here's a solution I used:

I created a new directory under /var/www/html/ called 'webmail'.

I then created an .htaccess file in that new directory The file is simply a text file that contains the following one line:

ReDirect /index.html http://www.mydomain.com/cgi-bin/plugins/neomail/neomail.pl

I also created a subdomain called 'webmail' by going to my account manager, selecting mydomain.com and then clicking 'NEW'. I pointed that subdomain to the newly created directory /var/www/html/webmail.

There's nothing else in the directory, so when I type 'webmail.mydomain.com' it goes to the big long neomail link.


10-28-2004, 09:40 PM
I have tried that and it worked just fine. But if you were to look at the address bar, the original long URL would show up instead the subdomain one.

For example, going to http://webmail.mydomain.com will redirect us to
and the URL we see is the http://www.mydomain.com/cgi-bin/plugins/neomail/neomail.pl address.
Is there a way to show http://webmail.mydomain.com or http://webmail.mydomain.com/neomail.pl instead, since the subdomain points to the webmail directory /var/www/html/webmail which contains a redirect index.html to the long URL.

Is this possible? Thanks in advance for your advice!

10-29-2004, 07:13 AM
I haven't tried this, but changing the webmail.mydomain.com subdomain to point to /var/www/html/cgi-bin/plugins/neomail might work.

10-29-2004, 07:22 AM
I just tried it and for some reason, the site manager comes back with an error about /var/www/html/cgi-bin/plugins/neomail not being an absolute path. As far as I can tell, that is the full and correct path.

I didn't try going around the site manager and adding that information directly into the apache config file. I'll let somebody else try that one out.

12-13-2004, 12:44 AM
First, to answer torrin's last post... I think the error it gave is correct; take out the "html/", so it would be:


Perhaps that would work??

As another solution: I would try a RewriteRule. I'm not about to try this on a subdomain, as I'm new to the subdomain game, and I'm kind of afraid to tell someone to jump into the world of RewriteRules unless I can tell them exactly what to copy and paste, or without him/her reading up on it a bit. If the previous solution doesn't work, do some googling about the RewriteRule and I'm sure that you'll figure it out -- RewriteRules really do rule... in a big way.


02-24-2005, 03:20 PM
This is how I did it:

1. Create the subdomain mail.example.com using the westhost domain management tool. (This may take a day or two to propogate to your users' DNS.)

2. Add a virtual host to /etc/httpd/conf/httpd.conf

DocumentRoot /www/example/html/webmail
ServerName mail.example.com

3. Create a .htaccess file in /www/example/html/webmail:

RewriteEngine On
RewriteBase /
RewriteRule ^neomail$ http://www.example.com/cgi-bin/plugins/neomail/neomail.pl

Now you will go to your neomail login when you enter mail.example.com.
This doesn't quite work as expected, because Neomail expects a certail layout. First of all, the images are missing. You can copy or create links to the images directoryto solve this. Secondly, urls won't stay simple. After you log in, you'll get something like this:


because neomail doen't know about your rewrite rules. but i didn't bother.

07-03-2005, 02:09 PM
I don't know if anyone's still monitoring this thread, but I've been trying to do the same thing. Being stubborn, I wanted to see if I could implement this without a redirect, and I'm "this close" to having it working. I've made the following changes to my httpd.conf file:

- Added neomail.pl to the end of my DirectoryIndex option:

DirectoryIndex index.asp default.htm index.cgi .index.cgi index.html index.htm index.shtml index.sht index.mv index.htmv index.php index.php3 neomail.pl

- My VirtualHost entry for my subdomail looks like this:

<VirtualHost *>
ServerName webmail.mydomain.com
ServerAlias www.webmail.mydomain.com
DocumentRoot /var/www/cgi-bin/plugins/neomail
ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"
ErrorLog logs/webmail_error_log
TransferLog logs/webmail_access_log
<Directory /var/www/cgi-bin/plugins/neomail>
Options +ExecCGI
Order allow,deny
Allow from all

It works, and the URL in the address bar maintains it's reference to the webmail subdomain. The only problem is none of the graphic files are found. The error log shows redundant information in the pathname for these files. Here's the message:

File does not exist: /var/www/cgi-bin/plugins/neomail/plugins/neomail/images//addresses.gif

At this point, I don't know whether this is being generated by Neomail or Apache. Any ideas?


07-03-2005, 03:43 PM
The line "File does not exist: /var/www/cgi-bin/plugins/neomail/plugins/neomail/images//addresses.gif" is from Apache, not Neomail.

Probably the best way to solve this is to modify the file /var/neomail/neomail.conf and change the path to where the images are located to match how you have this setup. If I remember correctly the images are in /var/www/html/plugins/neomail/images. You'd want to copy the images in that directory to /var/www/cgi-bin/plugins/neomail/images and then change your config file to say that the path to images is '/images' (relative to where webmail.yourdomain.com is 'pointed'). If you are going to do this I would recommend searching through the forums and grabbing the modified neomail images that I recall someone making. They were a good improvement over the default.

Feel free to post back if you have any problems doing this! I'm too lazy to install neomail so include anything you think would be helpful.