[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: help: newbie must install qmail on redhat 6.1 machine !!!



<html>
<head>
<title>Qmail Setup Guide</title>
</head>
<body bgcolor="white" alink="black" link="black" text="#000000" vlink="black"> 
<font face="helvetica" size="-1">

<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" width="100%" bgcolor="white">

  <TR>
   <td width="100%" valign="center" bgcolor="#6495ED">
    <img src="http://www.linuxhelp.net/images/logo.gif"; align="center" alt="LinuxHelp.net, For all your Linux needs.">
   </td>
   <TD width="100%" valign="center" bgcolor="#6495ED">
    <P align="right">
<A TARGET="_top" HREF=
"http://www82.valueclick.com/cgi-bin/redirect?host=h0092320&b=1";>
<IMG WIDTH=468 HEIGHT=60 ALT="Please visit our sponsors." border="0"
SRC="http://www82.valueclick.com/cgi-bin/cycle?host=h0092320&b=1";></A>
                          
   </td>
  </tr> 

   <tr>
    <TD colspan=2 width="100%" valign="center" bgcolor="#6495ED">
     <hr width="100%" noshade=1>
    </td>
   </tr>

  <tr>
   <TD width="100%" valign="center" align="left" bgcolor="#6495ED">
        
    <font color="black" size=2 align="left">&nbsp;&nbsp;Wednesday, May 10th, 2000</font>
   </td>
   <TD width="100%" valign="center" align="right" bgcolor="#6495ED">
    <a href="http://www.debian.org";><img src="http://www.linuxhelp.net/images/power.gif"; alt="Powered By Debian GNU/Linux" border="0"></a>
   </td>
  </tr>


  <tr>
   <td colspan=2 width="100%" valign="center" align="right" bgcolor="#6495ED">
    <hr width="100%" noshade=1>
   </td>
  </tr>

</TABLE>

<TABLE border="0" width="100%" CELLPADDING="0" CELLSPACING="0">
        <TR><TD width="139" valign="top">
        <TABLE border="0" cellpadding="0" cellspacing="0" width="139">
                <TR><TD align="right" valign="top">

                <TABLE border="0" cellspacing="0" cellpadding="0" width="139" bgcolor="#6495ED">
                        <TR><TD><IMG src="http://www.linuxhelp.net/sidebar/linux.gif"; border="0" alt="Linux Menu" width="139" height="22"></A></TD></TR>
                        <TR><TD align="left" valign="top" height="49">

                        <TABLE border="0" cellspacing="0" cellpadding="0">
                        	<TR><TD><IMG src="http://www.linuxhelp.net/sidebar/glassblock.gif"; width="10" height="10" alt=""></TD>
				<TD align="left"><FONT face="helvetica" size="-1" color="black">
				<li><a href="http://www.linuxhelp.net/index.phtml";>Main Page</a><BR>
                                <li><A href="http://www.linuxhelp.net/apps.phtml";>Applications</A><BR>
				<li><a href="http://www.linuxhelp.net/articles/";>Articles</a><BR>
                                <li><A href="http://www.linuxhelp.net/contact.phtml";>Contact Us</A><BR>
				<li><a href="http://www.linuxhelp.net/distributions/";>Distributions</a><BR>
				<li><a href="http://www.linuxhelp.net/faqs.phtml";>FAQs</a><BR>
                                <li><A href="http://www.linuxhelp.net/geninfo.phtml";>General Info</A><BR>
				<li><a href="http://www.linuxhelp.net/getlinux.phtml";>Get Linux</a><BR>
                                <li><A href="http://www.linuxhelp.net/guides/";>Guides</A><BR>
                                <li><A href="http://www.linuxhelp.net/howto/";>HOWTOs</A><BR>
                                <li><A href="http://www.linuxhelp.net/ircinfo.phtml";>IRC Info</A><BR>
                                <li><A href="http://www.linuxhelp.net/users.phtml";>IRC Members</A><BR>
				<li><a href="http://www.linuxhelp.net/rules.phtml";>IRC Rules</a><BR>
				<li><a href="http://www.linuxhelp.net/stats/index.html";>IRC Stats</a><BR>
				<li><A href="http://www.linuxhelp.net/isos.phtml";>ISO Images</a><BR>
				<li><a href="http://www.linuxhelp.net/linkexchange.phtml";>Link Exchange</a><BR>
                                <li><A href="http://www.linuxhelp.net/logos/";>Logos</A><BR>
                                <li><A href="http://www.linuxhelp.net/lugs.phtml";>LUGs</A><BR>
                                <li><A href="http://www.linuxhelp.net/mlists.phtml";>Mailing Lists</A><BR>
				<li><a href="http://www.hostedforums.com/board/wwwthreads.pl";>Message Forum</a><BR>
                                <li><A href="http://www.linuxhelp.net/mirrors.phtml";>Mirrors</A><BR>
                                <li><A href="http://www.linuxhelp.net/newbies/";>Newbies</A><BR>
				<li><a href="http://www.linuxhelp.net/newsgroups.phtml";>Newsgroups</a><BR>
				<li><a href="http://www.linuxhelp.net/cgi-bin/store/index.cgi";>Online Store</a><BR>
	                        <li><A href="http://www.linuxhelp.net/members/";>OPs Only!</A><BR>
                                <li><A href="http://www.linuxhelp.net/polls.phtml";>Poll Archive</A><BR>
                                <li><A href="http://www.linuxhelp.net/ppp.phtml";>PPP Help</A><BR>
                                <li><A href="http://www.linuxhelp.net/screenshots/";>Screen Shots</A><BR>
				<li><a href="http://www.linuxhelp.net/search.phtml";>Search Engine</a><BR>
				<li><a href="http://www.linuxhelp.net/server.phtml";>Server Stats</a><BR>
                                <li><A href="http://www.linuxhelp.net/xfree86.phtml";>XFree86</A><BR></font></td>

                </TR>
                </TABLE>
                </TD>
                </TR>

                <TR><TD align="left" valign="top"><IMG src="http://www.linuxhelp.net/sidebar/glassblock.gif"; width="10" height="20" alt=""></TD></TR>
                <TR><TD align="left" valign="top"><img src="http://www.linuxhelp.net/sidebar/kernels.gif"; alt="Kernels" border="0" width="139" height="22"></TD></TR>
                <TR><TD align="left" valign="top">

                <TABLE border="0" cellspacing="0" cellpadding="0">
                        <TR><TD><IMG src="http://www.linuxhelp.net/sidebar/glassblock.gif"; width="10" height="10" alt=""></TD>
			<TD align="left"><FONT face="helvetica" size="-1" color="black">
 			<li>Stable:&nbsp;&nbsp;<A href="ftp://ftp.us.kernel.org/pub/linux/kernel/v2.2/linux-2.2.15.tar.gz";>2.2.15</a>
<li>Devel:&nbsp;&nbsp;<a href="ftp://ftp.us.kernel.org/pub/linux/kernel/v2.3/linux-2.3.99-pre6.tar.gz";>2.3.99-pre6</a>
<li>PrePatch:&nbsp;&nbsp;<a href="ftp://ftp.us.kernel.org/pub/linux/kernel/testing/pre-patch-2.3.99/7-8.gz";>2.3.99/7-8</a>
			<BR>
			<li><a href="http://www.kernelnotes.org";>KernelNotes.org</a></font><br></td>
		</TR>
                </TABLE>
                </TD>
                </TR>

                <TR><TD align="left" valign="top"><IMG src="http://www.linuxhelp.net/sidebar/glassblock.gif"; width="10" height="20" alt=""></TD></TR>
                <TR><TD align="left" valign="top"><img src="http://www.linuxhelp.net/sidebar/advisories.gif"; alt="Linux Advisories" border="0" width="139" height="22"></TD></TR>
                <TR><TD align="left" valign="top">

                <TABLE border="0" cellspacing="0" cellpadding="0">
                        <TR><TD><IMG src="http://www.linuxhelp.net/sidebar/glassblock.gif"; width="10" height="10" alt=""></TD>
			<TD align="left"><FONT face="helvetica" size="-1" color="black">
			<li><a href="http://www.calderasystems.com/support/security/";>Caldera OpenLinux</a><BR>
			<li><A href="http://www.debian.org/security";>Debian GNU/Linux</a><BR>
			<li><a href="http://www.linuxppc.com/support/updates/security/";>LinuxPPC</a><BR>
			<li><a href="http://www.linux-mandrake.com/en/fupdates.php3";>Mandrake Linux</a><BR>
                        <li><A href="http://www.redhat.com/errata";>Red Hat Linux</A><BR>
			<li><a href="http://www.suse.de/security";>S.u.S.E Linux</a><BR>
			<li><a href="http://www.turbolinux.com/security/";>TurboLinux</a><BR></font></td>
                </TR>
                </TABLE>
                </TD>
                </TR>

                <TR><TD align="left" valign="top"><IMG src="http://www.linuxhelp.net/sidebar/glassblock.gif"; width="10" height="20" alt=""></TD></TR>
                <TR><TD align="left" valign="top"><img src="http://www.linuxhelp.net/sidebar/links.gif"; alt="Quick Links" border="0" width="139" height="22"></TD></TR>
                <TR><TD align="left" valign="top">

                <TABLE border="0" cellspacing="0" cellpadding="0">
			<TR><TD><IMG src="http://www.linuxhelp.net/sidebar/glassblock.gif"; width="10" height="10" alt=""></TD>
                        <TD align="left"><FONT face="helvetica" size="-1" color="black">
			<li><a href="http://www.cert.org";>Cert.org</a><BR>
			<li><a href="http://www.dynip.com";>DynIP.com</a><BR>
			<li><a href="http://www.freshmeat.net";>Freshmeat.net</a><BR>
			<li><a href="http://www.google.com";>Google.com</a><BR>
			<li><a href="http://www.hostedforums.com";>HostedForums.com</a><BR>
			<li><a href="http://www.lansystems.com";>LanSystems.com</a><BR>
			<li><a href="http://www.linuxberg.com";>LinuxBerg.com</a><BR>
			<li><a href="http://www.linuxdoc.org";>LinuxDoc.org</a><BR>
			<li><a href="http://www.linuxtoday.com";>LinuxToday.com</a><BR>
			<li><a href="http://www.nerdyboy.com";>NerdyBoy.com</a><BR>
                        <li><A href="http://www.slashdot.org";>Slashdot.org</A><br>
			<li><a href="http://www.themes.org";>Themes.org</a><BR>
	                <li><A href="http://www.xfree86.org";>XFree86.org</A><BR></font></td> 

                </TR>
                </TABLE>
                </TD>
                </TR><TR><TD valign="bottom"><IMG SRC="http://www.linuxhelp.net/sidebar/leftbot.gif"; border="0" width="139" height="31" alt=""></TD>
        </TR>
        </TABLE>
</TD>
</TR>
</TABLE>
</TD>


<TD align="left" valign="top" width="100%">
<TABLE CELLPADDING=0 CELLSPACING=0 BORDER=0> 

<TD VALIGN=TOP ALIGN=LEFT WIDTH=100%> 
<img src="http://www.linuxhelp.net/images/corner.gif"; alt="">

<TABLE BORDER=0 CELLPADDING=10 CELLSPACING=0 WIDTH=100%>
<TR>
<TD VALIGN=TOP>


<P align="left">
Qmail Setup Guide<BR>
by Vince, <a href="mailto:vince linuxhelp net">vince linuxhelp net</a><BR>
Created on May 1st 2000.<BR>
</P>

<P align="left">
Qmail is a replacement for sendmail. If you have tried to install qmail before,
you know how yucky that INSTALL file is, do this, read this, then this etc...
Well this guide is none of that. Let's get on with it! 
</P>

<P align="left">
First things first, grab the qmail source from 
<a href="ftp://ftp.id.wustl.edu/pub/qmail/qmail-1.03.tar.gz";>ftp://ftp.id.wustl.edu/pub/qmail/qmail-1.03.tar.gz</a>. 
Qmail can be installed from anywhere, I just like using /usr/local/src/ for 
all my programs source.
</P>

<P align="left">
Now we extract it, <b>tar xzvf qmail-1.03.tar.gz</b> then cd into the new
qmail-1.03 directory. Now as root, we make the /var/qmail directory,
<b>(mkdir /var/qmail)</b>.
</P>

<P align="left">
Next things we have to do is add the qmail users and groups, this is easily
done, it is in the INSTALL.ids file, but I hate the qmail install instructions
so here it is below...
</P>

<P align="left">
<PRE>
groupadd nofiles
useradd -g nofiles -d /var/qmail/alias alias
useradd -g nofiles -d /var/qmail qmaild
useradd -g nofiles -d /var/qmail qmaill
useradd -g nofiles -d /var/qmail qmailp
groupadd qmail
useradd -g qmail -d /var/qmail qmailq
useradd -g qmail -d /var/qmail qmailr
useradd -g qmail -d /var/qmail qmails
</PRE>
</P>

<P align="left">
Now that will work on Linux systems, I don't know about any others.
Now we compile it, (make setup check) here is a tip, for all you
users out there with lots of memory, (128MB+) make -j12 setup check
will cause the compilation process to fork, in doing so, it speeds
the compiling process up largely, if you have 32MB use -j4. 
<b>WARNING:</b> Do not hike that number up unless you know what your
doing,  it will use all your memory and cputime and will lock your system. 
</P>

<P align="left">
Next thing we do, is tell qmail our hostname, what our primary hostname
is that we will receive mail for, we do this by typing
<b>./config-fast your.host.name</b>, mine is vince.lansystems.com so
I type ./config-fast vince.lansystems.com.
</P>

<P align="left">
Now we have to setup the system aliases, to do this we type...
</P>

<P align="left">
<PRE>
cd /var/qmail/alias 
touch .qmail-postmaster .qmail-mailer-daemon .qmail-root
chmod 644 /var/qmail/alias/.qmail*
</PRE>
</P>

<P align="left">
Ok that's done, now we setup our user mailboxes, if you are running
sendmail, they are /var/spool/mail/$USER, qmail is different.
So what we need to do is move the /var/spool/mail/$USER file to ~user/Mailbox,
so we type mv /var/spool/mail/user /home/user/Mailbox now we make a symbolic 
link from /var/spool/mail/user to their actual Mailbox, ln -s
/home/user/Mailbox /var/spool/user.
Do this for EVERY user on your system. (pain in the butt isn't it? :))
Ok, fingers tired yet? halfway there. Now we make the /var/spool/mail dir 1777 
(chmod 1777 /var/spool/mail).
</P>

<P align="left">
Ok, now copy (cp /var/qmail/boot/home to /var/qmail/rc).
Now we start up qmail, (csh -cf '/var/qmail/rc &') without the ()'s of course.
</P>

<P align="left">
Well, now it's time to test qmail, see if all this work was worth it!
I am gonna just paste the contents of a file here, no sense in me typing it ll out...
</P>

<P align="left">
After you start qmail, look for a qmail: status: local 0/10 remote 0/20
line in syslog. qmail-send always prints either ``cannot start'' or
``status''. (The big number is a splogger timestamp.)
</P>

<P align="left">
Do a ps and look for the qmail daemons. There should be four of
them, all idle: qmail-send, running as qmails; qmail-lspawn, running
as root; qmail-rspawn, running as qmailr; and qmail-clean, running
as qmailq. You will also see splogger, running as qmaill.
</P>

<P align="left">
<PRE>
Local-local test: Send yourself an empty message. (Replace ``me''
with your username. Make sure to include the ``to:'' colon.)

% echo to: me | /var/qmail/bin/qmail-inject
The message will show up immediately in your mailbox, and syslog
will show something like this:
qmail: new msg 53
qmail: info msg 53: bytes 246 from <me domain> qp 20345 uid 666
qmail: starting delivery 1: msg 53 to local me domain
qmail: status: local 1/10 remote 0/20
qmail: delivery 1: success: did_1+0+0/
qmail: status: local 0/10 remote 0/20
qmail: end msg 53
(53 is an inode number; 20345 is a process ID; your numbers will
probably be different.)
</PRE>
</P>

<P align="left">
<PRE>
Local-error test: Send a message to a nonexistent local address.

% echo to: nonexistent | /var/qmail/bin/qmail-inject
qmail: new msg 53
qmail: info msg 53: bytes 246 from <me domain> qp 20351 uid 666
qmail: starting delivery 2: msg 53 to local nonexistent domain
qmail: status: local 1/10 remote 0/20
qmail: delivery 2: failure: No_such_address.__#5.1.1_/
qmail: status: local 0/10 remote 0/20
qmail: bounce msg 53 qp 20357
qmail: end msg 53
qmail: new msg 54
qmail: info msg 54: bytes 743 from <> qp 20357 uid 666
qmail: starting delivery 3: msg 54 to local me domain
qmail: status: local 1/10 remote 0/20
qmail: delivery 3: success: did_1+0+0/
qmail: status: local 0/10 remote 0/20
qmail: end msg 54
You will now have a bounce message in your mailbox.
</PRE>
</P>

<P align="left">
<PRE>
Local-remote test: Send an empty message to your account on another
machine.

% echo to: me wherever | /var/qmail/bin/qmail-inject
qmail: new msg 53
qmail: info msg 53: bytes 246 from <me domain> qp 20372 uid 666
qmail: starting delivery 4: msg 53 to remote me wherever
qmail: status: local 0/10 remote 1/20
qmail: delivery 4: success: 1.2.3.4_accepted_message./...
qmail: status: local 0/10 remote 0/20
qmail: end msg 53
There will be a pause between ``starting delivery'' and ``success'';
SMTP is slow. Check that the message is in your mailbox on the other
machine.
</PRE>
</P>

<P align="left">
<PRE>
Local-postmaster test: Send mail to postmaster, any capitalization.

% echo to: POSTmaster | /var/qmail/bin/qmail-inject
Look for the message in the alias mailbox, normally /var/qmail/alias/Mailbox.
</PRE>
</P>

<P align="left">
<PRE>
Double-bounce test: Send a message with a completely bad envelope.

% /var/qmail/bin/qmail-inject -f nonexistent
To: unknownuser
Subject: testing
This is a test. This is only a test.
%
(Use ctrl-d, not dot, to end the message.) Look for the double
bounce in the alias mailbox.
</PRE>
</P>

<P align="left">
<PRE>
Group membership test:
% cat > ~me/.qmail-groups
|groups >> MYGROUPS; exit 0
% /var/qmail/bin/qmail-inject me-groups < /dev/null
% cat ~me/MYGROUPS
</PRE>
</P>

<P align="left">
MYGROUPS will show your normal gid and nothing else. (Under Solaris,
make sure to use /usr/ucb/groups; /usr/bin/groups is broken.)
</P>

<P align="left">
Now we add /bin/csh -cf '/var/qmail/rc &' to our startup scripts,
mine is /etc/rc.d/rc.inet2, I run Slackware so this will most likely
be different on your system, also disable sendmail startup in your 
startup scripts.
</P>

<P align="left">
<PRE>
Now we remove the sendmail stuff, and link it to qmail...

rm /usr/lib/sendmail 
rm /usr/sbin/sendmail
ln -s /var/qmail/bin/sendmail /usr/lib/sendmail
ln -s /var/qmail/bin/sendmail /usr/sbin/sendmail
</PRE>
</P>

<P align="left">
Great got that, now we add the following to /etc/inetd.conf...
<Small>
smtp stream tcp nowait qmaild /var/qmail/bin/tcp-env tcp-env /var/qmail/bin/qmail-smtpd
</small>
Now killall -HUP inetd.
</P>

<P align="left">
Now the last and final thing, pasted from the qmail doc, we test qmails receive ability....
</P>

<P align="left">
<PRE>
1. SMTP server test: Forge some mail locally via SMTP. Replace ``me''
   with your username and ``domain'' with your host's name.
       % telnet 127.0.0.1 25
       Trying 127.0.0.1...
       Connected to 127.0.0.1.
       Escape character is '^]'.
       220 domain ESMTP
       helo dude
       250 domain
       mail <me domain>
       250 ok
       rcpt <me domain>
       250 ok
       data
       354 go ahead
       Subject: testing
       This is a test.
       .
       250 ok 812345679 qp 12345
       quit
       221 domain
       Connection closed by foreign host.
       %
   Look for the message in your mailbox. (Note for programmers: Most
   SMTP servers need more text after MAIL and RCPT. See RFC 821.)
2. Remote-local test: Send yourself some mail from another machine.
   Look for the message in your mailbox.
3. Remote-error test: Send some mail from another machine to
   nonexistent domain  Look for a bounce message in the remote mailbox.
4. UA test: Try sending mail, first to a local account, then to a
   remote account, with your normal user agent.
5. Remote-postmaster test: Send mail from another machine to
   PoStMaStEr domain  Look for the message in the alias mailbox,
   normally /var/qmail/alias/Mailbox.
</PRE>
</P>

<P align="left">
Now one last thing, alot of people use fetchmail, which sends mail 
to user locahost, qmail is not configured to accept mail for the domain
"localhost" so will reject the mail. 
Add localhost to /var/qmail/control/rcphosts and /var/qmail/control/locals
then killall -HUP qmail-send. 
</P>

<P align="left">
Also, if you are running slackware, you can add the following to
/etc/rc.d/rc.inet2 to have qmail automagically start upon
reboot.
</P>

<P align="left">
<PRE>
# Qmail...
if [ -f /var/qmail/rc ]; then
  echo -n " qmail"
  /bin/csh -cf '/var/qmail/rc &' 1>/dev/null
fi
</PRE>
</P>

<P align="left">
If you have any problems with this, you can 
<a href="mailto:vince linuxhelp net">email me</a> or see me on IRC,
irc.dal.net #LinuxGroup.
Please read the file FAQ in the qmail directory before asking,
chances are the answer is in there.
</P>

<P>
<center>
<img src="http://www.linuxhelp.net/cgi-bin/count.cgi?df=linux"; alt="Hits Since November 20th, 1998">
</center>
</P>

<P>
<center>
<small>
Copyright &copy; 1998-2000 The Linux Group. All Rights Reserved.<BR>
Linux is a registered trademark of Linus Torvalds.<BR>
All other trademarks and copyrights are the property of their respective owners.
<P>
</small>
</center>
</P>
</TD>
</TR></TABLE>
</TD>
</TR>
</TABLE>
</TD>
</TR>
</TABLE>
</body>
</html>


-- 
-------------------------------------------------------------
Register Linux User #142063  http://counter.li.org
ICANN Large Member #202260   http://www.icann.org
Founding Member of Something or the Other.
-------------------------------------------------------------



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]