Page 1 of 3 123 LastLast
Results 1 to 10 of 24
  1. #1

    Default Multiple Domain E-mail Tutorial with Neomail

    This seems to be a popular topic, and I just spent a few hours reading up and getting things working. So, I don't guarantee everything on here is to-the-letter, but it may save you from having to dig through a bunch of threads.

    Also, I'm having trouble receiving mail on Neomail, so any suggestions on how to fix that issue would be great! My domain name may still be propagating, though (reqeust was only made 13 hrs ago).

    <disclaimer>Don't forget to make back-ups of EVERYTHING before you change things. It may even be a good idea to do an account backup. If anyone notices any glaring errors here, PLEASE post follow-ups, as I certainly don't want to break anyone's account! Use at your own risk!</disclaimer>

    Multiple Domain Webmail (using Neomail) Tutorial for WestHost:

    ******************
    PRELIMINARY STEPS:
    ==================

    1) Download and install a SSH and FTP program

    2) If you have not yet created your second domain, in your FTP program create a folder for your second domain. This will serve as the root directory for your new domain. I created mine as such: /var/www/secondarydomain/. I did this OUTSIDE the main account folder (/var/www/html/), so people can't just type
    mainaccount.com/newdomain
    to get to this domain. I'm not sure if this will cause other issues down the road, since it is not in the /html folder.

    3) In the manager program, make sure your domain points to this new folder

    4) Make sure NeoMail has been installed through the manager


    ****************************************
    CREATE AND CONFIGURE A NEW MAIL ACCOUNT:
    ========================================

    5) Create a new mail account using manager - in this format:
    username.domainname.com or username.domainname

    6) Open your FTP program, and go to the following directory (using your main FTP account - accountname and accountPWD): /etc/mail/

    7) Find and download the file: virtusertable
    (file has no extensions)

    8) **CREATE A BACK UP OF THE ORIGINAL FILE, then open the original file in your favorite text editor

    9) Scroll to the bottom, and you will see your new username, but created for every domain in your account!

    username.domainname.com@primarydomain.com username.domainname.com
    username.domainname.com@secondarydomain.com username.domainname.com
    username.domainname.com@tertiarydomain.com username.domainname.com

    10) Delete all the lines that don't apply to the appropriate domain, leaving only the user for the chosen domain:
    username.domainname.com@secondarydomain.com username.domainname.com

    11) Fix the first name so it looks like a real e-mail address
    username@secondarydomain.com username.domainname.com

    12) If you want a catch-all account for this domain, add this below the line above
    @secondarydomain.com username.domainname.com

    13) Save the file and upload it back to the /etc/mail/ directory. Make sure your favorite text editor didn't enter an extension (such as ".txt") on the file

    14) Open PUTTY & log in to your account. WestHost information on where to download putty and how to set it up can be found here: http://www.manual.westhost.com/part1.html#gi-telnet

    15) Once Logged in, type the following commands:
    Code:
    cd /etc/mail 
    makemap hash virtusertable < virtusertable
    Wait for the command to finish, then log out of Putty



    *************
    NEOMAIL SETUP
    =============
    16) Open your FTP program, and go to /var/neomail

    17) Download the file "neomail.conf"

    18) BACK IT UP, then open the original in your favorite text editor

    19) Find the line:
    @domainnames = qw( primarydomain.com );

    and change it to:
    @domainnames = qw( primarydomain.com secondarydomain.com );

    *This will allow the user to choose the domain upon setting up preferences, or you can do the preferences for them. You may be able to create a new neomail setup in the actual secondary domain directory, which would effectively allow you to restrict the domainnames property just to the user's domain. For my purposes, this was not necessary

    20) Save and upload the modified "neomail.conf" file (make sure the extension is still .conf)

    21) In your FTP program, find the main directory /var/www/html/plugins/neomail/

    22) Download the entire "images" directory, and contents

    23) Go to your subdomain's directory ("/var/www/subdomain/" in my case) and create the following folders:
    plugins
    plugins/neomail
    plugins/neomail/images

    24) Upload all images you downloaded into this new directory



    *********************
    CONFIGURE A REDIRECT:
    =====================

    25) Create a subdomain or new folder on your secondary domain with an easy name to remember:
    http://www.secondarydomain.com/mail/ for instance

    26) Create the following file and name it "index.html"

    Code:
    Code:
    <html><head><title>Webmail</title> 
    <meta http-equiv="refresh" content="1;url=/cgi-bin/plugins/neomail/neomail.pl"> 
    </head> 
    <body> 
    <a href="/cgi-bin/plugins/neomail/neomail.pl">Webmail</a> 
    </body> 
    </html>
    27) Upload into the directory created in #25

    28) Once the user enters preferences, they should probably change the username to just

    "username" vs. "username.secondarydomain.com" (in there by default), and they'll need to

    choose "secondarydomain.com" from the drop-down.


    **********************
    You're Done!

    When users log in to

    http://www.secondarydomain.com/mail/

    They will be redirected. Their login is a little longer than just a name (username.secondarydomain.com), but now you have the ability to send/receive webmail from your secondary domains.

    **********************
    SPECIAL THANKS go to everyone who has posted on these topics in the past. This is merely a compilation, and I would have had absolutely no idea how to do any of this without previously asked/answered questions on these forums. THANK YOU!!!!

  2. #2
    Senior Member jalal's Avatar
    Join Date
    May 2003
    Location
    Germany
    Posts
    1,377

    Default

    Hey fantastic!

    If you don't mind, I might add this to my Tips and Tricks? After waiting for feedback from the folks around here...


  3. #3
    Moderator wildjokerdesign's Avatar
    Join Date
    Jun 2003
    Location
    Kansas City Mo
    Posts
    5,721

    Default

    Thanks korngold, looks good. I have not gone through this procedure but do not see any glareing mistakes in regarde to how things are set up at WH.

    One other option that I wonder if could be done is on step 23 instead of duplicateing those files in the secondary domain could you simply add a symlink to the orginal plugin directory located under the main domain. Kind of like the icons directory is a symlink in /var/www/html that leads back to /var/www/icons. Might save a bit on disk usage and the time it takes to download and the upload.
    Shawn
    Please remember your charity of choice: http://www.redcross.org

    Handy Links: wildjokerdesign.net | Plain Text Editors: EditPlus | Crimson

  4. #4

    Default

    Thanks for looking this over for me!

    Joker-
    How do I add the symlink? I tested this again today, and I'm still not able to receive mail yet, and my neomail images went away. I'm going to give the domain a day or two more to propagate (sp), and if it's still acting funky, I may need to do a revision or two. So, Jalal, you may want to hold off until I'm sure it's working properly.

    Just out of curiosity, how come WH hasn't changed their manager so you can simply add a user to 1 domain (vs. the entire batch)? It doesn't seem like it would be a complicated thing to code, since it only involves a change to how the text/config mail file is written.

  5. #5
    Moderator wildjokerdesign's Avatar
    Join Date
    Jun 2003
    Location
    Kansas City Mo
    Posts
    5,721

    Default

    You can add a sym link two ways one is through your Site Manager. If you go to Domain Management and then Web Alias you'll see the one I mentioned for icons. To set one up for certian sub domain you would need to make sure you click on that domain when you do you'll see that there are none set up for it like there are for you main domain. At the bottom there is a button that says New Alias. Here is where it is detailed in the manual http://www.manual.westhost.com/part4.html#webaliases

    The other way is by logging into an SSH session. You then move to the directory where you want the symlink to show up.
    Code:
    cd /var/www/secondarydomain/
    You then us the following to create the symlink
    Code:
    ln -s /var/www/html/plugins/ plugins
    I think I have that right hopefully one of the others well correct me if I thought it through wrong.

    The code to create the symlink has the command wich is the ln -s then the full path to the directory it is pointing to and then the name of the link. You put a space between the path and the name of the symlink. So in the above you have created a symlink called plugins in your secondary domain that points to the plugins directory in your main one.
    Shawn
    Please remember your charity of choice: http://www.redcross.org

    Handy Links: wildjokerdesign.net | Plain Text Editors: EditPlus | Crimson

  6. #6

    Default

    korngold,

    I understand you're having problems with the NeoMail.. but does it work via Outlook or any other POP3 program?

    Thanks,

    Richard

  7. #7

    Default

    Richard,

    As far as I can tell, I think the problems are all related to domain propagation (and the fact that I'm too impatient to wait for it to complete). I will check Outlook this evening or tomorrow and get back to you.

    But, it seems as though my images have returned without a change in configuration, so i think it's just a DNS issue, and will hopefully be resolved by tomorrow.

    I'll keep you posted!

    Happy Halloween,
    Anthony

  8. #8

    Default

    Anthony,

    Hopefully it is just due to the domain propagation because I would love to see this work. I have been wanting to be able to do this for a while ..

    Richard

  9. #9
    Member WestHost - MMellor's Avatar
    Join Date
    Mar 2004
    Posts
    206

    Default

    korngold,

    Great post! Keep up all the great work everybody! As far as why we have not added this feature in our Site Manager, it is coming soon. We are going to be coming out with a new site manager pretty soon here. That is one of the changes that you can look for. Thanks again for all the great work you guys do!
    Michael L. Mellor
    WestHost Support Department
    Phone: 1-800-222-2165
    FAX: 435-755-3449
    http://members.westhost.com

  10. #10

    Default

    Michael,

    THANK YOU, THANK YOU, THANK YOU!!!! I am still not able to get this to work fully, so it would be great if it was integrated into the Manager.

    Please let us know when the update is finished. Are there tentative dates, and do you need a beta tester??????? 8)


    For now, I'm still trying to make this work. Unfortunately, if I log into www.secondarydomain.com's webmail, I get a cookie error, which prevents me from composing, sending, or reloading the page.

    If I log in to www.primarydomain.com's webmail and change the location in preferences, I am able to send receive mail. But, then I'm back to the original reason I wanted to do this:
    1) I don't want users of secondarydomain.com to have to log in through primarydomain.com and
    2) The username will be valid across all domains (user1@secondarydomain.com is also user1@primarydomain.com)

Similar Threads

  1. Setting up MX for mail on secondary domain
    By korngold in forum E-mail / FTP Management
    Replies: 8
    Last Post: 12-08-2005, 10:02 PM
  2. Help with Domain Mail
    By producerboy in forum E-mail / FTP Management
    Replies: 5
    Last Post: 02-04-2005, 08:50 PM
  3. neomail or webmail to second domain
    By ccwebb in forum E-mail / FTP Management
    Replies: 5
    Last Post: 09-20-2004, 01:24 PM
  4. multiple domain registrations
    By ali in forum General Discussion
    Replies: 15
    Last Post: 08-05-2004, 05:24 PM
  5. How to have multiple domain names point to same site?
    By Keith Larman in forum Domain names & DNS
    Replies: 3
    Last Post: 10-30-2003, 07:43 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •