QmailtoasterMain Page | About | Help | FAQ | Special pages | Log in

Printable version | Disclaimers | Privacy policy | Latest revision

CentOS 4 Install "The VERY Easy Way"

(Difference between revisions)

Line 1: Line 1:
-
==EZ QmailToaster Mail Server on CentOS 4==
+
==EZ QmailToaster Mail Server on CentOS 4.3==
-
Nick Hemmesch <nick@ndhsoft.com>
+
-
'''Updated July 2, 2005'''
+
--------------------------------------------------------------------
 +
EZ QmailToaster Fresh Install on CentOS 4.3
 +
Nick Hemmesch <nick@ndhsoft.com> June 08, 2006
 +
--------------------------------------------------------------------
-
Test machine: ASUS Pundit, 2.6ghz celeron, 512mb ram, 60gig IDE drive.
+
CentOS 4.3: This test install was performed on an
 +
P4 3Ghz with 2GB ram on an Intel m/b.  
-
This install will make a QmailToaster Mail Server. It will not have any
 
-
other unnecessary packages installed. No X Windows, KDE, Gnome . . .
 
 +
--------------------------------------------------------------------
 +
This tutorial is for CentOS 4.3 (cnt40) i386
-
1. Go to http://www.centos.org and download only CentOS-4.0-i386-bin1of4.iso [http://centos.org/modules/tinycontent/index.php?id=13]
+
To install CentOS 4.3 x86_64, replace cnt40 with cnt4064
 +
To install Fedora Core 4 & 5, change download path from centos to
 +
fedora & cnt40 to fdr40, fdr4064, fdr50 or fdr5064 per your distro
 +
--------------------------------------------------------------------
-
2. Upon boot from the above CD, just hit enter to install with the graphical
+
Notes:
-
  interface.
+
 +
You must have either a local dns server or a local caching name
 +
server. If you need a caching namserver, we will add one in Step 8.
 +
 +
Be sure to replace "your-domain.com" with your real domain name,
 +
and "your.fqdn.com" with your server's "Fully Qualified Domain Name".
 +
 +
 
 +
--------------------------------------------------------------------
 +
1. Download CentOS 4.3 CD iso's or the DVD iso.
 +
--------------------------------------------------------------------
 +
 +
  Burn iso's to CD, or DVD if you downloded a DVD iso
 +
 
 +
  Boot with your CD 1 or the DVD
 +
 +
 +
--------------------------------------------------------------------
 +
2. CentOS Installation (This is the configuration of my test box):
 +
--------------------------------------------------------------------
 +
 +
  Splash Page: <enter> to install in graphical mode 
 +
 
 +
  CD Found window: Choose "Skip" to bypass media test 
 +
 +
  Welcome to CentOS: Click "Next"
 +
 +
  Language Selection: Select your language & Click "Next"
 +
 +
  Keyboard Configuration: Select language type & Click "Next"
 +
 +
  Installation Type: Select "Server" & Click "Next"
 +
 +
  Disk Partitioning Setup: Select "Automatically Partition & Click "Next"
 +
 +
      Warning: Click "Yes"
 +
 +
  Automatic Partitioning: Select "Remove all partitions" & Click "Next"
 +
 +
      Warning: Click "Yes"
 +
 +
  Disk Setup: Click "Next"
 +
 +
  Boot Loader Configuration: Click "Next"
 +
 +
  Network Configuration: Click "Edit"
 +
 +
      Edit Interface eth0: Deselect "Configure using DHCP"
    
    
-
3. Selections:
+
      Select "Activate on boot"
-
  Language Selection:  choose language and click "Next"
+
      Enter your "IP Address" & "Netmask"
-
  Keyboard Configuration:  choose language and click "Next"
+
      Click "OK
-
  Install CentOS: click "Next"
+
      Set the hostname:
-
  Installation Type:  choose "Custom" and click "Next"
+
          Deselect "automatically via DHCP"
-
  Disc Partitioning Setup:  choose "Automatically partition and click "Next"
+
          Select "manually" & enter your "fully qualified domain name"
-
      Automatic Partitioning: choose "Remove all partitions", hda (if that's
+
      Miscellaneous Settings:
-
      your drive), and Review then click "Next"
+
-
      Disk Setup: click "New", Mount Point /home, Size about 2/3 of your drive
+
          Gateway: enter IP address of your gateway
-
      (on this test box I use 40000 MB of a 60 GB drive), choose "Fixed Size",
+
-
      and click "OK"
+
-
  Boot Loader Configuration: click "Next"
+
          Primary DNS: enter IP address of primary dns server
-
  Netword Configuration: choose "Edit"
+
          Secondary DNS: enter IP address of secondary dns server
-
      uncheck DHCP, choose "Activate on Boot", enter yout IP address and
+
      Click "Next"
-
      netmask and click "OK"
+
-
      Enter your hostname (FQDN), gateway and DNS server addresses and
+
  Firewall Configuration:
-
      click "Next"
+
-
  Firewall Configuration: choose "No Firewall", SELinux disable and
+
      Select "No firewall"
-
  click "Next"  And then "Proceed"
+
-
  Additional Language Support: choose the languages and click "Next"
+
      Select "Disabled" mode for SELinux
-
  Time Zone Selection:  choose time zone and click "Next"
+
      Click "Next"
-
  Set Root Password: enter your password twice and click "Next"
+
          Warning - No Firewall: Click "Proceed"
-
  Package Group Selection:  uncheck everything and click "Next"
+
  Additional Language Support" Click "Next"
-
  About to Install: click "Next"
+
  Time Zone Selection: Select your time zone & Click "Next"
-
  REBOOT
+
  Set Root Password: Enter your root password twice & Click "Next"
-
 
 
-
4, Install Necessary Packages:
 
-
  mkdir /usr/src/qtms-install
+
--------------------------------------------------------------------
-
  cd /usr/src/qtms-install
+
3. Package Group Selection - Select ONLY the following groups:
 +
--------------------------------------------------------------------
-
  wget http://www.qmailtoaster.com/qtms/qtms-deps.sh
+
  Server Configuration Tools: Select
-
  sh qtms-deps.sh
+
  Web Server: Select
-
  (this will take a while)
+
-
   
+
-
  After qtms-deps.sh is finished:
+
-
  yum -y update
+
      Click "Details" and add php-mysql plus the defaults
-
  (this will take a while too)
+
-
  REBOOT
+
  DNS Name Server: Select
 +
  FTP Server: Select
-
5. Prepare to Install QmailToaster:
+
  MySQL Database: Select
-
  wget http://www.qmailtoaster.com/qtms/qtms-svcs.sh
+
      Click "Details" and add mysql-bench, mysql-server plus the defaults
-
  wget http://www.qmailtoaster.com/qtms/firewall.sh.bz2
+
-
  nano -w qtms-svcs.sh
 
-
  edit MYSQLPW=your-mysql-password
 
-
  ctl-o and enter to save
 
-
  ctl-x to exit
 
-
  bunzip2 firewall.sh.bz2
+
  Development Tools: Select
-
  nano -w firewall.sh
+
-
  edit MYIP="your-IP-address"
+
-
  ctl-o and enter to save
+
-
  ctl-x to exit
+
-
  sh qtms-svcs,sh
+
      Click "Details" and add expect to the defaults
-
  This script turns on or off all necessary services. Then
+
  Administration Tools: Select
-
  the script sets up your mysql root account, creates and grants
+
-
  privileges for your vpopmail mysql account, makes a symlink so
+
-
  your krb5 is read properly, edits your php.ini, sets inittab
+
-
  to start at runlevel 3, and sets up your firewall.
+
-
  Note: You might see some service errors while the script runs,
+
  System Tools: Select
-
  don't worry about them.
+
 +
      Click "Details" and add mrtg to the defaults
-
6. Get QmailToaster Packages:
+
  Click "Next"
-
  wget http://www.qmailtoaster.com/info/current-download-script.sh
 
-
  sh current-dowmload-script.sh
+
  About to Install: Click "Next"
-
  This script downloads all necessary packages into you current
+
      Required Install Media: verify and click "Continue"
-
  directory (should be /usr/src/qtms-install/).
+
-
7. Install QmailToaster Packages:
+
  Installing Packages: Click "Next" & watch the install
-
  wget http://www.qmailtoaster.com/info/current-install-script.sh
 
-
  edit current-install-script.sh and set DISTRO=cnt40 and ARCH=i386
+
  After installation: remove your media & Click "Reboot"
-
 
+
 
-
  sh current-install-script.sh
+
-
  This script installs the latest zlib and the qmailtoaster packages
+
--------------------------------------------------------------------
-
  (This will take quite a while)
+
4. After reboot, login as root:
 +
--------------------------------------------------------------------
 +
 
 +
  mkdir -p /usr/src/qtms-install
 +
 
 +
  cd /usr/src/qtms-install
 +
 
 +
 
 +
  This example is CentOS 4.3 i386 so the qmailtoaster switch is cnt40
 +
 
 +
--------------------------------------------------------------------
 +
5. Prepare to Install QmailToaster:
 +
--------------------------------------------------------------------
 +
 
 +
  wget http://www.qmailtoaster.com/centos/cnt40/cnt40-deps.sh
 +
 
 +
      sh cnt40-deps.sh
-
8. Make a self signed certificate:
+
     
-
 
+
  wget http://www.qmailtoaster.com/centos/cnt40/cnt40-perl.sh
-
  cd /usr/share/ssl/certs/
+
 
-
  make stunnel.pem
+
      sh cnt40-perl.sh
 +
 
 +
 
 +
  wget http://www.qmailtoaster.com/centos/cnt40/cnt40-svcs.sh
 +
 
 +
  wget http://www.qmailtoaster.com/centos/cnt40/firewall.sh
 +
 
 +
      nano -w cnt40-svcs.sh
 +
 
 +
      edit MYSQLPW=your-mysql-password
 +
 
 +
      ctl-o and enter to save
 +
 
 +
      ctl-x to exit
 +
 
 +
 
 +
      nano -w firewall.sh
 +
 
 +
      edit MYIP="your-IP-address"
 +
 
 +
      ctl-o and enter to save
 +
 
 +
      ctl-x to exit
 +
 
 +
      sh cnt40-svcs.sh
 +
 
 +
 
 +
  === NOTE ===
 +
 
 +
  This script turns on or off all necessary services. Then the script sets
 +
  up your mysql root account, creates and grants privileges for your vpopmail
 +
  mysql account, makes a symlink so your krb5 is read properly, edits your
 +
  php.ini, sets inittab to start at runlevel 3, and sets up your firewall.
 +
 
 +
  Note: You might see some service errors while the script runs,
 +
  don't worry about them.
 +
 
 +
  ============
 +
 
 +
     
 +
  Update all your packages:
 +
 
 +
      yum -y update
 +
 
 +
  REBOOT
 +
 
 +
     
 +
--------------------------------------------------------------------
 +
6. Get QmailToaster Packages:
 +
--------------------------------------------------------------------
 +
 
 +
  cd /usr/src/qtms-install
 +
 
 +
 
 +
  wget http://www.qmailtoaster.com/info/current-download-script.sh
 +
 
 +
      sh current-download-script.sh
 +
 
 +
 
 +
  This script downloads all necessary packages into you current
 +
  directory (should be /usr/src/qtms-install/).
 +
 
 +
 
 +
--------------------------------------------------------------------
 +
7. Install QmailToaster Packages:
 +
--------------------------------------------------------------------
 +
 
 +
  wget http://www.qmailtoaster.com/centos/cnt40/cnt40-install-script.sh
 +
 
 +
      sh cnt40-install-script.sh
 +
 
 +
 
 +
  Check your services:
 +
 
 +
      setup: Select Services
 +
 
 +
          See that the following services are selected: acpid anacron
 +
         
 +
          atd autofs cpuspeed crond djbdns freshclam haldaemon httpd
 +
 
 +
          iptables kudzu messagebus mysqld network ntpd qmail rawdevices
 +
 
 +
          smartd sshd syslog xinet
 +
 
 +
          Also: irqbalance (w/dual processors) xfs (w/xwindows)
 +
 
 +
         
 +
 +
--------------------------------------------------------------------
 +
8. Add djbdns (if you don't want bind)
 +
--------------------------------------------------------------------
 +
 
 +
  rpm -e --nodeps bind bind-chroot caching-nameserver
 +
 
 +
  rpmbuild --rebuild --with cnt40 djbdns*.src.rpm
 +
 
 +
  rpm -Uvh ../redhat/RPMS/i386/djbdns-localcache*.rpm
 +
 
 +
  echo "search your-domain.com" > /etc/resolv.conf
 +
  echo "nameserver 127.0.0.1" >> /etc/resolv.conf
 +
 
 +
 
 +
  REBOOT
 +
 
 +
 
 +
--------------------------------------------------------------------
 +
9. Setup QmailToaster:
 +
--------------------------------------------------------------------
 +
 
 +
  qmailctl stat
 +
 
 +
  (Should look somewhat like this)
 +
 
 +
      [root@gateway ~]# qmailctl stat
 +
      authlib: up (pid 2425) 65 seconds
 +
      clamd: up (pid 2425) 65 seconds
 +
      imap4: up (pid 2421) 65 seconds
 +
      imap4-ssl: up (pid 2423) 65 seconds
 +
      pop3: up (pid 2414) 65 seconds
 +
      pop3-ssl: up (pid 2409) 65 seconds
 +
      send: up (pid 2416) 65 seconds
 +
      smtp: up (pid 2418) 65 seconds
 +
      spamd: up (pid 2407) 65 seconds
 +
      authlib/log: up (pid 2417) 65 seconds
 +
      clamd/log: up (pid 2417) 65 seconds
 +
      imap4/log: up (pid 2422) 65 seconds
 +
      imap4-ssl/log: up (pid 2424) 65 seconds
 +
      pop3/log: up (pid 2415) 65 seconds
 +
      pop3-ssl/log: up (pid 2413) 65 seconds
 +
      send/log: up (pid 2420) 65 seconds
 +
      smtp/log: up (pid 2419) 65 seconds
 +
      spamd/log: up (pid 2408) 65 seconds
 +
      [root@gateway ~]#
 +
 
 +
 
 +
  Add a domain:
 +
 
 +
      /home/vpopmail/bin/vadddomain your-domain.com <postmaster-password>
 +
 
 +
 
 +
  Add a user:
 +
 
 +
      /home/vpopmail/bin/vadduser you@your-domain.com <your-password>
 +
 
 +
 
 +
  Edit /etc/php.ini and set register_globals = On
 +
 
 +
      service httpd restart 
 +
 
 +
 
 +
  Bring up your browser and go to:
 +
 
 +
      http://www.your-domain.com/admin-toaster/
 +
 
 +
        Username: admin
 +
        Password: toaster
 +
 
 +
      Change your password . . .
 +
 
 +
 
 +
  Edit /etc/php.ini and set register_globals = Off
-
  Note: common name should be your mail server mail.your-domain.com
+
      service httpd restart 
 +
 
-
  mv stunnel.pem /var/qmail/control/servercert.pem
+
  Check your mail server:
-
  chown root:qmail /var/qmail/control/servercert.pem
+
-
  chmod 644 /var/qmail/control/servercert.pem
+
-
  REBOOT
+
      http://www.your-domain.com/webmail
 +
      login with your full email address and your password
-
9. Setup QmailToaster:
+
      Send yourself an email - should show right away
-
  qmailctl stat
+
      Send an email to yourself if you have another address
-
  (Should look somewhat like this, if you're really slow)
+
      Go to your other email account and reply to the message you sent
-
[root@gateway ~]# qmailctl stat
+
 
-
clamd: up (pid 2425) 5465 seconds
+
  If Isoqlog doesn't show right away, do this:
-
imap4: up (pid 2421) 5465 seconds
+
     
-
imap4-ssl: up (pid 2423) 5465 seconds
+
      sh /usr/share/toaster/isoqlog/bin/cron.sh
-
pop3: up (pid 2414) 5465 seconds
+
-
pop3-ssl: up (pid 2409) 5465 seconds
+
-
send: up (pid 2416) 5465 seconds
+
-
smtp: up (pid 2418) 5465 seconds
+
-
spamd: up (pid 2407) 5465 seconds
+
-
clamd/log: up (pid 2417) 5465 seconds
+
-
imap4/log: up (pid 2422) 5465 seconds
+
-
imap4-ssl/log: up (pid 2424) 5465 seconds
+
-
pop3/log: up (pid 2415) 5465 seconds
+
-
pop3-ssl/log: up (pid 2413) 5465 seconds
+
-
send/log: up (pid 2420) 5465 seconds
+
-
smtp/log: up (pid 2419) 5465 seconds
+
-
spamd/log: up (pid 2408) 5465 seconds
+
-
[root@gateway ~]#
+
-
  Add a domain:
 
-
/home/vpopmail/bin/vadddomain your-domain.com <postmaster-password>
+
--------------------------------------------------------------------
 +
10. Add domainkeys:
 +
--------------------------------------------------------------------
-
  Add a user:
+
  Make dir for yourdomain.com:  
-
/home/vpopmail/bin/vadduser you@your-domain.com <your-password>
+
      mkdir /var/qmail/control/domainkeys/your-domain.com  
-
        (You can also use QmailAdmin - www.your-domain.com/qmailadmin)       
+
-
  Bring up your browser and go to:
+
 
 +
  Make domainkey (Remove the "\"):  
-
http://www.your-domain.com/admin-toaster/
+
      dknewkey /var/qmail/control/domainkeys/your-domain.com/private > \
-
Username: admin
+
                                                        your-domain-dk.txt
-
Password: toaster
+
-
  Change your password . . .  
+
      chown root:qmail /var/qmail/control/domainkeys/your-domain.com/private
 +
      chmod 444 /var/qmail/control/domainkeys/your-domain.com/private
-
  Check your mail server:
+
     
 +
  Make dns entry:  
-
      http://www.your-domain.com/webmail
+
      BIND - in the your-domain.com zone file (see yourdomain-dk.txt):
-
      login with your full email address and your password
+
-
      send yourself an email - should show right away
+
        private._domainkey IN TXT "k=rsa; p=MEwwDQY . . . to end of key"
 +
            (NOTE QUOTATION MARKS MUST BE THERE)
-
      send an email to yourself if you have another address
+
      DJBDNS - in /var/djbdns/tinydns/root/data (make from your-domain-dk.txt):
-
      Go to your other email account and reply to the message you sent
+
        '_domainkey.your-domain.com:o=-; r=postmaster@your-domain.com
 +
        'private._domainkey.your-domain.com:k=rsa; p=MEwwDQY . . . to end of key
-
      In squirrelmail, select the email, select View Full Header and you should
+
 
-
      find something like the following:
+
  Test your mailserver:
-
Received: by simscan 1.1.0 ppid: 3675, pid: 3677, t: 0.3578s
+
      http://domainkeys.sourceforge.net/policycheck.html
-
            scanners: clamav: 0.85.1/m:31/d:880 spam: 3.0.1
+
      http://domainkeys.sourceforge.net/selectorcheck.html
 +
   
-
  If Isoqlog doesn't show right away, do this:
+
      In squirrelmail, send a test email, select View Full Header and you
-
     
+
      should find something like the following:
-
      sh /usr/share/toaster/isoqlog/bin/cron.sh
+
-
   
+
-
   
+
-
10. Logs for all packages except freshclam are at:
+
-
      /var/log/qmail/*
+
      ----------- snip ------------
 +
      DomainKey-Status: good
 +
      Received: by simscan 1.2.0 ppid: 22641, pid: 22644, t: 0.8416s
 +
          scanners: clamav: 0.88.2/m:38/d:1476 spam: 3.1.1
 +
      X-Spam-Checker-Version: SpamAssassin 3.1.1 (2006-03-10) on ndh1.whatgives.org
 +
      X-Spam-Level: *
 +
      X-Spam-Status: No, score=1.6 required=5.0 tests=FROM_DOMAIN_NOVOWEL
 +
          autolearn=no version=3.1.1
 +
      Received: from unknown (HELO ns1.ndhsdns.com) (216.221.100.227)
 +
          by ndh1.whatgives.org with (DHE-RSA-AES256-SHA encrypted) SMTP; 22 May 2006 20:03:36 -0000
 +
      Received-SPF: pass (ndh1.whatgives.org: SPF record at ndhsdns.com designates 216.221.100.227 as permitted sender)
 +
      Received: (qmail 28034 invoked by uid 89); 22 May 2006 20:03:36 -0000
 +
      Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys
 +
      DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws;
 +
          s=private; d=ndhsdns.com;
 +
          b=XVKQZe446BXMnSoQKvgchf0DRx4v8YQYZn5KVLj5O8XYf7V1dX7ETaJ1VGWGp5Bf ;
 +
      Received: from unknown (HELO www.ndhsdns.com) (127.0.0.1)
 +
          by ns1.ndhsdns.com with SMTP; 22 May 2006 20:03:36 -0000
 +
      ----------- snip ------------
-
      Freshclam is at /var/log/clamav
 
 +
--------------------------------------------------------------------
 +
11. Logs for all packages except freshclam are at:
 +
--------------------------------------------------------------------
-
Regards,
+
  /var/log/qmail/*
-
Nick Hemmesch
+
  Freshclam is at /var/log/clamav

Revision as of 20:41, 12 June 2006

EZ QmailToaster Mail Server on CentOS 4.3


EZ QmailToaster Fresh Install on CentOS 4.3 Nick Hemmesch <nick@ndhsoft.com> June 08, 2006


CentOS 4.3: This test install was performed on an P4 3Ghz with 2GB ram on an Intel m/b.



This tutorial is for CentOS 4.3 (cnt40) i386

To install CentOS 4.3 x86_64, replace cnt40 with cnt4064

To install Fedora Core 4 & 5, change download path from centos to fedora & cnt40 to fdr40, fdr4064, fdr50 or fdr5064 per your distro


Notes:

You must have either a local dns server or a local caching name server. If you need a caching namserver, we will add one in Step 8.

Be sure to replace "your-domain.com" with your real domain name, and "your.fqdn.com" with your server's "Fully Qualified Domain Name".



1. Download CentOS 4.3 CD iso's or the DVD iso.


 Burn iso's to CD, or DVD if you downloded a DVD iso
 
 Boot with your CD 1 or the DVD



2. CentOS Installation (This is the configuration of my test box):


 Splash Page: <enter> to install in graphical mode  
 
 CD Found window: Choose "Skip" to bypass media test  
 Welcome to CentOS: Click "Next"
 Language Selection: Select your language & Click "Next"
 Keyboard Configuration: Select language type & Click "Next"
 Installation Type: Select "Server" & Click "Next"
 Disk Partitioning Setup: Select "Automatically Partition & Click "Next"
     Warning: Click "Yes"
 Automatic Partitioning: Select "Remove all partitions" & Click "Next"
     Warning: Click "Yes"
 Disk Setup: Click "Next"
 Boot Loader Configuration: Click "Next"
 Network Configuration: Click "Edit"
     Edit Interface eth0: Deselect "Configure using DHCP"
  
     Select "Activate on boot"
     Enter your "IP Address" & "Netmask"
     Click "OK
     Set the hostname:
         Deselect "automatically via DHCP"
         Select "manually" & enter your "fully qualified domain name"
     Miscellaneous Settings:
         Gateway: enter IP address of your gateway
         Primary DNS: enter IP address of primary dns server
         Secondary DNS: enter IP address of secondary dns server
     Click "Next"
 Firewall Configuration:
     Select "No firewall"
     Select "Disabled" mode for SELinux
     Click "Next"
         Warning - No Firewall: Click "Proceed"
 Additional Language Support" Click "Next"
 Time Zone Selection: Select your time zone & Click "Next"
 Set Root Password: Enter your root password twice & Click "Next"



3. Package Group Selection - Select ONLY the following groups:


 Server Configuration Tools: Select
 Web Server: Select
     Click "Details" and add php-mysql plus the defaults
 DNS Name Server: Select
 FTP Server: Select
 MySQL Database: Select
     Click "Details" and add mysql-bench, mysql-server plus the defaults


 Development Tools: Select
     Click "Details" and add expect to the defaults
 Administration Tools: Select
 System Tools: Select
     Click "Details" and add mrtg to the defaults
 Click "Next"


 About to Install: Click "Next"
     Required Install Media: verify and click "Continue"


 Installing Packages: Click "Next" & watch the install


 After installation: remove your media & Click "Reboot"
 

4. After reboot, login as root:


 mkdir -p /usr/src/qtms-install
 
 cd /usr/src/qtms-install
 
 
 This example is CentOS 4.3 i386 so the qmailtoaster switch is cnt40 
 

5. Prepare to Install QmailToaster:


 wget http://www.qmailtoaster.com/centos/cnt40/cnt40-deps.sh
 
     sh cnt40-deps.sh


 wget http://www.qmailtoaster.com/centos/cnt40/cnt40-perl.sh
 
     sh cnt40-perl.sh


 wget http://www.qmailtoaster.com/centos/cnt40/cnt40-svcs.sh
 wget http://www.qmailtoaster.com/centos/cnt40/firewall.sh
     nano -w cnt40-svcs.sh
     edit MYSQLPW=your-mysql-password
     ctl-o and enter to save
     ctl-x to exit


     nano -w firewall.sh
     edit MYIP="your-IP-address"
     ctl-o and enter to save
     ctl-x to exit
     sh cnt40-svcs.sh


 === NOTE ===
 This script turns on or off all necessary services. Then the script sets 
 up your mysql root account, creates and grants privileges for your vpopmail
 mysql account, makes a symlink so your krb5 is read properly, edits your 
 php.ini, sets inittab to start at runlevel 3, and sets up your firewall.
 Note: You might see some service errors while the script runs,
 don't worry about them.
 ============


 Update all your packages:
     yum -y update
 REBOOT



6. Get QmailToaster Packages:


 cd /usr/src/qtms-install


 wget http://www.qmailtoaster.com/info/current-download-script.sh
     sh current-download-script.sh


 This script downloads all necessary packages into you current
 directory (should be /usr/src/qtms-install/).



7. Install QmailToaster Packages:


 wget http://www.qmailtoaster.com/centos/cnt40/cnt40-install-script.sh
 
     sh cnt40-install-script.sh


 Check your services:
     setup: Select Services
         See that the following services are selected: acpid anacron
         
         atd autofs cpuspeed crond djbdns freshclam haldaemon httpd
         iptables kudzu messagebus mysqld network ntpd qmail rawdevices
         smartd sshd syslog xinet
         Also: irqbalance (w/dual processors) xfs (w/xwindows)



8. Add djbdns (if you don't want bind)


 rpm -e --nodeps bind bind-chroot caching-nameserver
 rpmbuild --rebuild --with cnt40 djbdns*.src.rpm
 rpm -Uvh ../redhat/RPMS/i386/djbdns-localcache*.rpm
 echo "search your-domain.com" > /etc/resolv.conf
 echo "nameserver 127.0.0.1" >> /etc/resolv.conf


 REBOOT



9. Setup QmailToaster:


 qmailctl stat
 (Should look somewhat like this)
     [root@gateway ~]# qmailctl stat
     authlib: up (pid 2425) 65 seconds
     clamd: up (pid 2425) 65 seconds
     imap4: up (pid 2421) 65 seconds
     imap4-ssl: up (pid 2423) 65 seconds
     pop3: up (pid 2414) 65 seconds
     pop3-ssl: up (pid 2409) 65 seconds
     send: up (pid 2416) 65 seconds
     smtp: up (pid 2418) 65 seconds
     spamd: up (pid 2407) 65 seconds
     authlib/log: up (pid 2417) 65 seconds
     clamd/log: up (pid 2417) 65 seconds
     imap4/log: up (pid 2422) 65 seconds
     imap4-ssl/log: up (pid 2424) 65 seconds
     pop3/log: up (pid 2415) 65 seconds
     pop3-ssl/log: up (pid 2413) 65 seconds
     send/log: up (pid 2420) 65 seconds
     smtp/log: up (pid 2419) 65 seconds
     spamd/log: up (pid 2408) 65 seconds
     [root@gateway ~]#


 Add a domain:
     /home/vpopmail/bin/vadddomain your-domain.com <postmaster-password>


 Add a user:
     /home/vpopmail/bin/vadduser you@your-domain.com <your-password>


 Edit /etc/php.ini and set register_globals = On
     service httpd restart  
 
 
 Bring up your browser and go to:
     http://www.your-domain.com/admin-toaster/
       Username: admin
       Password: toaster
     Change your password . . . 


 Edit /etc/php.ini and set register_globals = Off
     service httpd restart  
 
 Check your mail server:
     http://www.your-domain.com/webmail
     login with your full email address and your password
     Send yourself an email - should show right away
     Send an email to yourself if you have another address
     Go to your other email account and reply to the message you sent


 If Isoqlog doesn't show right away, do this:
     
     sh /usr/share/toaster/isoqlog/bin/cron.sh



10. Add domainkeys:


 Make dir for yourdomain.com: 
     mkdir /var/qmail/control/domainkeys/your-domain.com 


 Make domainkey (Remove the "\"): 
     dknewkey /var/qmail/control/domainkeys/your-domain.com/private > \
                                                        your-domain-dk.txt 
     chown root:qmail /var/qmail/control/domainkeys/your-domain.com/private
     chmod 444 /var/qmail/control/domainkeys/your-domain.com/private


 Make dns entry: 
     BIND - in the your-domain.com zone file (see yourdomain-dk.txt):
        private._domainkey IN TXT "k=rsa; p=MEwwDQY . . . to end of key" 
           (NOTE QUOTATION MARKS MUST BE THERE) 
     DJBDNS - in /var/djbdns/tinydns/root/data (make from your-domain-dk.txt): 
       '_domainkey.your-domain.com:o=-; r=postmaster@your-domain.com 
       'private._domainkey.your-domain.com:k=rsa; p=MEwwDQY . . . to end of key 


 Test your mailserver:
     http://domainkeys.sourceforge.net/policycheck.html
     http://domainkeys.sourceforge.net/selectorcheck.html
    
     In squirrelmail, send a test email, select View Full Header and you
     should find something like the following:
     ----------- snip ------------
     DomainKey-Status: good 
     Received: by simscan 1.2.0 ppid: 22641, pid: 22644, t: 0.8416s
          scanners: clamav: 0.88.2/m:38/d:1476 spam: 3.1.1
     X-Spam-Checker-Version: SpamAssassin 3.1.1 (2006-03-10) on ndh1.whatgives.org
     X-Spam-Level: *
     X-Spam-Status: No, score=1.6 required=5.0 tests=FROM_DOMAIN_NOVOWEL 
          autolearn=no version=3.1.1
     Received: from unknown (HELO ns1.ndhsdns.com) (216.221.100.227)
          by ndh1.whatgives.org with (DHE-RSA-AES256-SHA encrypted) SMTP; 22 May 2006 20:03:36 -0000
     Received-SPF: pass (ndh1.whatgives.org: SPF record at ndhsdns.com designates 216.221.100.227 as permitted sender)
     Received: (qmail 28034 invoked by uid 89); 22 May 2006 20:03:36 -0000
     Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys
     DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws;
          s=private; d=ndhsdns.com;
          b=XVKQZe446BXMnSoQKvgchf0DRx4v8YQYZn5KVLj5O8XYf7V1dX7ETaJ1VGWGp5Bf ;
     Received: from unknown (HELO www.ndhsdns.com) (127.0.0.1)
          by ns1.ndhsdns.com with SMTP; 22 May 2006 20:03:36 -0000
     ----------- snip ------------



11. Logs for all packages except freshclam are at:


 /var/log/qmail/*
 Freshclam is at /var/log/clamav