Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 02-19-2003, 10:42 AM   #1
LQ Newbie
Registered: Feb 2003
Posts: 10

Rep: Reputation: 0
Linux email server and some HTTP server questions

I'm trying to set up an email server on my redhat 8.0 linux box. I'm a newb to thi sort of stuff (both linux and servers). Right now I have been able to set me up an HTTP server and a FTP server, but the email server is kicking my butt.

I have the IMAP and POP services running but I can't figure out how to configure these or anything. I've tested sending mail to my domain ( and I just get mail returned as undeliverable.

I've checked my ISP no ports are blocked and I have all the ports necessary forwarded through my router.

So can anyone clue me in? How do I configure the email servers in order to be able to receive the emails and check it from outside. (Thats another thing, I tried using and that just takes me to my homepage default homepage.)

I've thought about trying to download and install another email server but I'm at a complete loss when looking for one. The only one I've found that even looks promising looks to have an installation process that would take 10 hours lol.

So basically I guess my questions would be, what is a good easy to use email server? How do I set it up so that I can receive email and log in from outside to check it? Oh and I guess I should specify I dont want to spend any money on it unless its cheap.

As far as my HTTP server questions. I just want to know is there a way to set it up so if someone goes to say it would take them to a different page than say

Thanks for any answers you can give me.
Old 02-19-2003, 10:52 AM   #2
LQ Guru
Registered: Feb 2003
Location: Sparta, NC USA
Distribution: Ubuntu 10.04
Posts: 5,141

Rep: Reputation: 58
I am confused by your question. I think your questions are referring to an e-mail client rather than an e-mail server.

My basic setup gets the mail from my isp with fetchmail, procmail sorts it and sendmail sends it. You have to configure sendmail to use SMART_HOST.

Here is the file I found at Suresh Ramasubramanian's email guide:
dnl This is the macro config file used to generate
dnl file. If you modify this file you will have to regenerate 
dnl by running this macro config through the m4
dnl preprocessor:
dnl        m4 /home/phil/Documents/ > /etc/ <--Change to your path
dnl You will need to have the sendmail-cf RPM installed for this
dnl to work, if you use an rpm build of sendmail
dnl include(`../m4/cf.m4')
dnl If you compile sendmail from a tarball, use the include above.
dnl In this setup, you should create the file as cf/cf/ 
dnl (in the sendmail source tree: eg. /usr/src/sendmail-8.11.6/cf/cf
dnl Now give the command "sh Build".  Now copy the file
dnl as /etc/mail/ (please backup first!)
dnl If you are using the RPM build of sendmail, use the 
dnl include statement given below instead
define(`SMART_HOST', `') <--Change this
define(`confTO_CONNECT', `1m')
define(`confDELIVERY_MODE', `queued')
MASQUERADE_AS(`') <--Change this
FEATURE(`mailertable',`hash -o /etc/mail/mailertable')
FEATURE(`virtusertable',`hash -o /etc/mail/virtusertable')
dnl FEATURE(`relay_based_on_MX')
Alter the lines with <--Change this to your situation (and remove the <--Change this from the line).

# Common e-mail tools
sendmail - postfix - sends mail to local users (and internet when configured correctly)
fetchmail - gets mail from internet accounts (non-Hotmail type)
procmail - sorts and delivers into separate mailboxes
mutt - mail client that sucks less than all the others
Email the Linux Way
Suresh Ramasubramanian's email guide
The Linux Mail User HOWTO
The Linux Electronic Mail Administrator HOWTO
Gotmail, a utility to download mail from Hotmail type accounts

Last edited by fancypiper; 02-19-2003 at 10:55 AM.
Old 02-19-2003, 10:55 AM   #3
Registered: Feb 2003
Location: Uk
Distribution: It varies
Posts: 54

Rep: Reputation: 15
Not sure about your email problem.

But the for the domain thing you need to use Virtual Hosts in Apache(you are using Apache?). Have a look at the 'Virtual Host examples for common setups'

Old 02-19-2003, 11:05 AM   #4
LQ Newbie
Registered: Feb 2003
Posts: 10

Original Poster
Rep: Reputation: 0
Fancy: I'm not talking about an Email client. When you set up red hat linux 8.0 you have hte option to install Mail Servers. Squirrelmail, IMap, AntiAssassin (or something like that).. all these little things that are meant to work with a mail server not a client. I dont want my email going through someone elses server and me having to fetch it from there.. I want it sent directly to my server.

To put it on someone elses server and fetch it like your talking of doing costs money, and your limited on the accounts and space you can have. And its costs a lot of money for what you get. Unless you use free email stuff from yahoo or hotmail type stuff but thats not what I want.. I want

I've just got to figure out how to setup my mail server and it should work.

Any I'll look into that.. I played around with it some when I was first setting up the HTTP server but didn't play for long just long enough to figure out how to set up my current server thankyou .
Old 02-19-2003, 11:30 AM   #5
LQ Guru
Registered: Feb 2003
Location: Sparta, NC USA
Distribution: Ubuntu 10.04
Posts: 5,141

Rep: Reputation: 58
The Linux Electronic Mail Administrator HOWTO looks good for setting it up.
Old 02-19-2003, 12:29 PM   #6
LQ Newbie
Registered: Feb 2003
Posts: 10

Original Poster
Rep: Reputation: 0
*sigh* None of this stuff makes any sense.

I tried that virtual host stuff.. I'm guessing I was editing the right file I dont have a clue, but anyway it didn't work. Even after I copied exactly the way the samples showed in that link you gave me.

And if I use the graphical interface that redhat has for it to try and set them up... it saves the file as completely blank.. dunno if its a bug or what. Anything that I type with at the end of it always goes to my main page no matter how I set up the virtual servers. Maybe it has something to do with that sample being only apache 1.3 where as my apache is 2.0. Quite confusing though.

Then as far as the mail goes.. I couldn't find anything relevant to what I'm trying to do in that HOWTO.

And another question I found while playing with some stuff.. I figured out that I have squirellmail installed and the alias for it is /webmail. So I went to my webpage ( and it returned an error saying not found.. wth? Looked through all the config files for squirellmail and I can't find anywhere where it references

I'm at a loss on all subjects...
Old 02-19-2003, 01:17 PM   #7
Registered: Jan 2002
Location: Missoula. Montana, USA
Distribution: Slackware (various)
Posts: 457

Rep: Reputation: 41
I use sendmail.

redhat sets up sendmail to only operate as a client. In RH7.3, and it may not have changed, you must eliminate or comment out (preface line with "dnl") the line that reads in /etc/mail/ :

DAEMON_OPTIONS(`Port=smtp,Addr=, Name=MTA')

and then rebuild your

"m4 /etc/mail/ > /etc/mail/"

Check it, put it in /etc. You will most likely also have to edit create /etc/mail/local-host-names to where you add your host.
The name of course will be depend the setup of It is the "file containing names of hosts for which we receive email" and comes after Fw . There are probably other options you may want to use depending on your preferences. Don't forget to restart the sendmail daemon.

Sendmail is easy and complicated at the same time. Just read and re-read the documentation. There is some good stuff in (typically) /usr/share/doc/sendmail, though I recommend the FAQ at which allows one to track down specific error messages.
Old 02-19-2003, 03:39 PM   #8
LQ Newbie
Registered: Feb 2003
Posts: 10

Original Poster
Rep: Reputation: 0
Ok well I got the email server working .. on the server. Can send and receive email fine as long as I'm logged into that account on the server computer. Now I gotta figure out how to connect to it from outside the server.

Another question now that I got that part set up, is there anyway to changed sendmail so that if it gets a email that dosn't match a user account, is there anyway to have it redirected automatically to another account? Right now if I was to send email to say I would get mail returned undeliverable because I dont have a user account set up named webmaster.

I'm still stumped on the virtual hosts thing.. if I add another virtual host and change the name and stuff .. my hole server goes into SSL enabled and wants me to go to https:// instead of http:// and if I go to https:// it denies my connection.

Also if I try to watch another port when I go to restart the server it tells me Error: Listen can only accept one argument.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Questions about what software to use to install a mail+http server system. papitu76 General 1 01-10-2005 02:33 PM
Http Linux file server doc54963 Linux - Enterprise 3 10-14-2004 10:10 PM
Fedora Core 2: Personal, home-based email server issues and questions nmsatyagrahi Linux - Networking 1 07-01-2004 12:46 PM
problem setting up router in linux http server mkepler1 Linux - Networking 1 12-18-2003 12:42 PM
script for http, email, and ftp server cblank Linux - Networking 0 08-09-2001 10:07 AM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 01:04 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration