Forum Moderators: bakedjake

Message Too Old, No Replies

Need help setting up Mail on RH Linux server

Fresh install

         

AprilS

8:34 am on Jul 25, 2004 (gmt 0)

10+ Year Member



This is my first dedicated server - I've learned a lot and I'm almost already to go live... except for mail.

I want to set it up so I can access mail mainly by using Outlook clients - both through POP3 & IMAP.

I thought perhaps IMAP would be functioning on the server...but I was wrong. :-(

Here is a list of things that I 'think' I need to do:
- Install Qmail
- Install Courier-imap
- Install Squirrellmail (I don't have to - but figured I might as well be able to access my mail via web...just in case)

Again, I'm not sure I have to install Qmail or Courier-imap. Initially I added a user to the server... and then added the user to my Outlook. It didn't work. :-) Forgive me if that seemed naive - but, this is my first dedicated server (RH Enterprise) - I thought it may work. I've been sheltered for MANY years by shared-hosting.

Basically, I have multiple domains - each with their own IP Address. However, some domains have similar users webmaster@domain1.com - webmaster@domain2.com - etc.

I can see the sendmail service is running on the server - and I can see imap and imaps are on the server (by donig locate)... so I started searching around on the web and a couple places recommended "Qmail & Courier-imap". Are they necessary?

If you have ANY comments, links, tips or recommendations... I'm ALL ears!

AprilS

5:35 am on Jul 26, 2004 (gmt 0)

10+ Year Member



While I wait for a response - one more question - if I went with Qmail, would my php and perl scripts still use sendmail for sending mail?

SeanW

12:49 pm on Jul 26, 2004 (gmt 0)

10+ Year Member



Fedora comes with sendmail, an IMAP server, and squirrel mail. Other than installing the RPMs, a couple of fixes in /etc/mail/sendmail.mc (comments tell you what to do), and allowing access in, you should be good to go.

Not sure about qmail, maybe it installs aliases, or uses the Red Hat alternatives system. Not 100% sure, since I've never had any desire to run qmail ;)

Sean

bakedjake

4:23 pm on Jul 26, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



Dave Sill's Life with qmail is the official guide supported by the mailing list:

[lifewithqmail.org...]

Should have everything you need.

MattyMoose

5:01 pm on Jul 26, 2004 (gmt 0)

10+ Year Member



If you're going to be hosting multiple domains, with virtual mailboxes (rather than a user account for each email account), you'll want to look into Virtual Hosting with Qmail -- it involves MySQL and vpopmail.

It provides you with the ability to have multiple domains, and multiple user accounts, that are maintained in MySQL, rather than in the OS itself.

There are many docs and HowTos out there for how to do this (google for Qmail+Vpopmail+Virtual Domains or along those lines). It is pretty difficult to get set up, but most of the howtos that I've seen are decent, and relatively up to date.


if I went with Qmail, would my php and perl scripts still use sendmail for sending mail?

No, what QMail does is replace the sendmail binary that's installed on your system, with its own sendmail "front", which actually accesses QMail. So, your scripts will call sendmail, which is in actual fact QMail. No need to change anything in your scripts, etc.

If you're going to go with QMail, I would say that going with Courier would be a good move. QMail + Courier is a very common combination. What you probably have installed is uw-imap (university of washington IMAP) server implementation. I don't believe that uw-imap has support for MailDirs [en.wikipedia.org], which is what QMail uses.

Basically, email is a big, horrible beast, that has a tendency to get out of hand the more features you add to it, and starts resembling a bunch loosely interconnected applications that don't look like they should work together. :)
Not wanting to scare you, but I have a feeling it might take you a while. Then again, maybe I'm looking at too diverse and complicated a solution, but that's the one that we've used in the past (much to my pain and dismay), but once it's working, it keeps working, and will work well. :)

HTH,
-MM

AprilS

6:44 pm on Jul 26, 2004 (gmt 0)

10+ Year Member



Thank you for the information! Ok, so it sounds like I could go either way then.

Maybe the following will help decide whether to go with sendmail or qmail.

I am the only one running the box - there are no other users that will log-in. So it doesn't really matter if the email accounts have true user accounts. Although in the past when I would add an email account on our shared server it would add an actual user.

I don't intend this to become a debate - but which would be a better solution for me - Qmail or Sendmail? (I use both POP3 and IMAP)

I've never setup either. To give you an idea - up until now, on our previous VPS (shared) servers, all I had to do was use the web tool to add a user an voila! the user could send and receive email- Nice & Easy!

I know sendmail is supposed to be better documented than Qmail - but I haven't found an easy 1 2 3 step outline for sendmail on how to get it going for pop3 and imap...and how to add accounts.

SeanW

6:53 pm on Jul 26, 2004 (gmt 0)

10+ Year Member



For someone starting out, I'd suggest a third alternative -- postfix. It feels like Sendmail, but has a lot of the complexity stripped out.

A while back I wrote a series of articles on SMTP, POP, IMAP, and squirrelmail using Postfix and some of the other packages you mentioned starting with this one:

[snip]

Sean

[edited by: bakedjake at 7:09 pm (utc) on July 26, 2004]
[edit reason] No personal URL drops. [/edit]

MattyMoose

9:48 pm on Jul 26, 2004 (gmt 0)

10+ Year Member



Re: Postfix:

Same here. We now use it exclusively at work, and I use it for my personal business and personal email on my own server. It's a nice, clean setup, without much of the weirdness of Qmail. I would've mentioned it, but I didn't want to complicate things. ;)

For setting up Postfix with Virtual Domains, there's:
[kirb.insanegenius.net...]

And for QMail and all its insanity <Grin>, there's:
[pipeline.com.au...]

The reason I'm still stuck on the Virtual Domains thing, is because you say you'll have multiple domains hosted, but I just realized that it may only be you checking the email addresses at these domains -- Is that true, or will it be like a hosting service, where someone is in charge of their domain, and they can set up email accounts, with their mailboxes, and passwords, etc? If it's the former, then you can do it easily enough with sendmail and domain aliases, if not, then it's on to the Virtual Domains.

-MM

AprilS

10:44 pm on Jul 26, 2004 (gmt 0)

10+ Year Member



Thank you for bringing up postfix - I actually do appreciate it as I am looking for a easy and stable solution.... that is not a security risk (is postfix safe?).

Correct, I own all of the domains - not hosting for other people. Although I check the mail on most of the email accounts, I do have a few other people that help me out from time to time that I have setup email accounts for.

Ok, so if postfix seems like the way to go....what all do I need? just postfix? or postfix, courier-imap...etc?

I just need a list of everything I need to get going. Any good documentation?

Also, any clue if squirrelmail works with postfix? Their database is down so I can't read the requirments.

Also...will I be able to use sendmail in my php and perl scripts normally?

AprilS

9:11 pm on Jul 27, 2004 (gmt 0)

10+ Year Member



Is "maildrop" needed when installing postfix and courier-imap?

MattyMoose

9:17 pm on Jul 27, 2004 (gmt 0)

10+ Year Member




just postfix? or postfix, courier-imap...etc?

I just need a list of everything I need to get going. Any good documentation?

Also, any clue if squirrelmail works with postfix? Their database is down so I can't read the requirments.

Also...will I be able to use sendmail in my php and perl scripts normally?

If you want users to pick up mail through IMAP or POP, then you'll need courier-imap (which has a POP server as well).

The links I posted previously are a great start to show you how to set up each component

Yup, you'll be able to use your php and perl scripts normally. Postfix does the same thing as QMail, in that it replaces the sendmail binary, and mimics its functions.


Is "maildrop" needed when installing postfix and courier-imap?

Not typically, since maildrop is used to processing emails that have arrived at a users' Maildir (note Maildir -- procmail is for "mbox"/"mailbox"es). You shouldn't need it unless you want to perform scripts on incoming emails that have been delivered to a user.

AprilS

10:29 pm on Jul 27, 2004 (gmt 0)

10+ Year Member



Thanks MattyMoose - did you ever have any problems installing courier-imap? I'm following the Install instructions to the T - but it does not work.

Here are the last few lines when I did "make"

depmode=none /bin/sh ./../depcomp \
g++ -DHAVE_CONFIG_H -I. -I. -I. -fhandle-exceptions -c -o testbdb.o testbdb.C
./../depcomp: line 502: exec: g++: not found
make[2]: *** [testbdb.o] Error 127
make[2]: Leaving directory `/home/admin/MAIL/courier-imap-3.0.6/bdbobj'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/admin/MAIL/courier-imap-3.0.6/bdbobj'
make: *** [all-recursive] Error 1

I then did a 'make check'

Making check in numlib
make[1]: Entering directory `/home/admin/MAIL/courier-imap-3.0.6/numlib'
make[1]: Nothing to be done for `check'.
make[1]: Leaving directory `/home/admin/MAIL/courier-imap-3.0.6/numlib'
Making check in bdbobj
make[1]: Entering directory `/home/admin/MAIL/courier-imap-3.0.6/bdbobj'
source='testbdb.C' object='testbdb.o' libtool=no \
depfile='.deps/testbdb.Po' tmpdepfile='.deps/testbdb.TPo' \
depmode=none /bin/sh ./../depcomp \
g++ -DHAVE_CONFIG_H -I. -I. -I. -fhandle-exceptions -c -o testbdb.o testbdb.C
./../depcomp: line 502: exec: g++: not found
make[1]: *** [testbdb.o] Error 127
make[1]: Leaving directory `/home/admin/MAIL/courier-imap-3.0.6/bdbobj'
make: *** [check-recursive] Error 1

The errors are very descriptive. Any clues?

MattyMoose

11:29 pm on Jul 27, 2004 (gmt 0)

10+ Year Member




exec: g++: not found

You're using RedHat, correct?

for some reason, it can't find g++ (GNU c++ compiler -- used to compile source code into binary format).

At the command line, type:

whereis g++

Tf it responds with nothing, then check your installed Packages (through the package management system in RH), and see if the gnu C++ compiler and libraries are installed.

If it responds with a path (ex: /usr/bin/g++), then there's another problem. ;) did you run ./configure before the make?

-MM

AprilS

12:34 am on Jul 28, 2004 (gmt 0)

10+ Year Member



It resonds with
[admin]$ whereis g++
g++:

Yes, I ran the "./configure" before make

MattyMoose

5:15 am on Jul 28, 2004 (gmt 0)

10+ Year Member



OK, That means it can't find it... Try seeing if g++ is installed through the Package Manager (try
rpm -qa¦grep -i 'c++'
or the GUI package manager).

AprilS

6:18 am on Jul 28, 2004 (gmt 0)

10+ Year Member



libstdc++-devel-3.2.3-20
libstdc++-3.2.3-20
compat-libstdc++-7.3-2.96.122

There were also a couple of listings for 'gcc' as well.
gcc-3.2.3-20
libgcc-3.2.3-20

I looked all over online and could not find an rpm of g++ for RedHat.

I don't have the RedHat Enterprise disk as this is a dedicated server through a hosting company. I did however look through the Fedora CD but did not find g++.

When I do a "locate g++" on the system it comes back with:
/usr/lib/libg++.so.2.7.2.8
/usr/lib/libg++.so.2.7.2

Thank you so much for helping me with this. I am mentally exhausted from the constant frustration of trying to get this going.

MattyMoose

3:52 pm on Jul 28, 2004 (gmt 0)

10+ Year Member



Well, I don't know where the C++ compiler would be in RH, but in FreeBSD it's in /usr/bin. I haven't worked on a RH system in a while, but I don't remember these problems. I wonder if your hosting co. removed it? That'd be kinda weird if they did...

try this command (it may take a while to complete)

find / -name "g++"

Oh, and sorry about the previous message, where I said

rpm -qa¦grep 'c++'

make that 'g++', not 'c++'.
My bad. :(

Post back what you find.

Anyone else seen this problem?

-MM

AprilS

8:08 pm on Jul 28, 2004 (gmt 0)

10+ Year Member



I just got off the phone with our hosting company and they informed me that g++ is not on the RedHat Enterprise Build. It comes with "gcc-c++". I've read a few posts online where it sounds like gcc is the standard c++ compiler on RedHat. If this is the case... am I just out of luck using Postfix? Should I just try installing Qmail?

I also just read install directions for Qmail...and it says if you have postfix installed that you have to uninstall it. I had already installed the postfix rpm. I tried doing a "rpm -e postfix-2.1.4-3.rhel3.i386.rpm" - but it says "error: package postfix-2.1.4-3.rhel3.i386.rpm is not installed". Any idea how to fully uninstall something when rpm -e doesn't work? :-¦

MattyMoose

11:18 pm on Jul 28, 2004 (gmt 0)

10+ Year Member



Here's a bit of a sneaky thing to do, but, try the following:

type:

whereis gcc

take the path that results (ie: if it says gcc: /usr/local/bin/gcc, copy "/usr/local/bin/gcc" only)

and do the following:

ln -s /path/to/gcc /usr/local/bin/g++

Then try the make again.

Basically, you're linking (like a shortcut) the c++ compiler (gcc) to (c++).

It's a little sneaky, but I've had to do similar things before. :)

-MM

AprilS

3:15 am on Jul 29, 2004 (gmt 0)

10+ Year Member



Nope, that trick didn't work. Good thought though, I was hoping it would work.

Well, it sounds like I may have to surrender and try installing Qmail. I found a site Qmail Rocks where you select your OS and they have all the packages you need to go along with Qmail in one tar ball. Though it uses courier-imap - it may be a slightly different version. It sounds like the people at Qmail Rocks took the time to get all the software needed and packaged it together with instructions. Though they explicitly say they don't gaurantee a problem free install - it just makes it a little easier.

BUT...how do I uninstall an RPM that IS installed...but when I try "rpm -e" it says it is not installed?

It is weird. I installed the RPM....then tried to unistall it and it says it is not installed....so then I tried to install it again...but it won't let me ... because it says it is already installed? So, then I did a third install by doing "rpm -i --force" to see if that would help it see it... nope - still cannot unistall...cause it doesn't think it's installed :-S I need to get it off to install Qmail (according to Qmail install docs)

MattyMoose

4:42 pm on Jul 29, 2004 (gmt 0)

10+ Year Member



That is pretty weird.

what does

rpm -qa¦grep "postfix"
(or similar search terms) say?

Sorry that PostFix didn't work out for you. :(

-MM

AprilS

7:11 am on Aug 9, 2004 (gmt 0)

10+ Year Member



YAAAAAAA!

OK - So, "I'm" Happy - and hopefully I can save someone from the 4 weeks of anguish I went through with this problem!

The solution I was able to come up with is adding the following line towards the top of my "Configure" files (before running configure)

LDFLAGS=-lstdc++

Adding this one line to my configure file(s) has allowed me to go back and install quite a few programs I have been trying to install in the past month.