Google

Part 11 - Starting qmail
Alright, qmail should be ready to go! But before we crank it up, let's run a script that will check the key components of the installation and make sure everything is alright.

To do this test, I have borrowed Dave Sill's "inst_check" script, but I've made a few custom modifications to accomodate for the subtle differences between the Qmailrocks installation and the Life With Qmail installation. Basically, the Qmailrocks installation has a slightly different logging setup and some slight variations in permissions settings. If you've installed according to this site, use my version of the script, as using Dave's version will result in a lot of "error" detections that are false positives due to the differences in the 2 installs. When you run the script, it will check for some key required files and folders and will also check permissions and owership settings on many key items. It a needed file does not exist or if the ownership/permissions settings are wrong on a key file, it will tell you and then make a suggestion as to how to correct the error. This script does NOT check the CONTENT or SYNTAX of your scripts, but only for the scripts' existence and their ownership/permissions settings. If you've screwed up the syntax of one the run scripts, this tool will not detect it. So you ready? Let's do it...

/downloads/qmailrocks/scripts/util/qmr_inst_check - modified to reflect removal of aliases

If you get a "congratulations" type of message, you're all set. If you get some errors, just follow the directions to fix the errors and then re-run the script until you get all errors corrected and you get a "congratulations" message.

Assuming, you've passed the installation check script, let's crank Qmail up!

qmailctl stop

qmailctl start

You can find out how things are running by:

qmailctl stat

You should see an output like this:

/service/qmail-send: up (pid 29956) 2 seconds /service/qmail-send/log: up (pid 29960) 2 seconds /service/qmail-smtpd: up (pid 29963) 2 seconds /service/qmail-smtpd/log: up (pid 29968) 2 seconds /service/qmail-pop3d: up (pid 29971) 2 seconds /service/qmail-pop3d/log: up (pid 29972) 2 seconds messages in queue: 0 messages in queue but not yet preprocessed: 0
If you, don't see anything like that or if you see error messages, click here for troubleshooting tips.

Congratulations, Qmail is now officially up and running and you should be able to send and receive mail on the server.

Let's test your new server's POP3 service...

telnet localhost 110

you should see something like this:

Trying 192.168.1.10...
Connected to 192.168.1.10.
Escape character is '^]'.
+OK <16658.1054485137@yourserver.com>
user postmaster@mydomain.com (enter your username here. remember to use the full e-mail address)
+OK
pass your_password
+OK
quit
+OK
Connection closed by foreign host.

This is the sign of a successfull POP connection to the server!

Now try sending mail to that same user from another location. Telnet to 110 again and run the "list" command and you should see the message that your send...

telnet localhost 110

Trying 192.168.1.10...
Connected to 192.168.1.10.
Escape character is '^]'.
+OK <16658.1054485137@yourserver.com
user postmaster@mydomain.com (again, remember to log in with the full email address of the user)
+OK
pass your_password
+OK
list
+OK
1 323 (there's your message!)
.
quit
+OK
Connection closed by foreign host.

And now let's test your server's SMTP service to make sure the TLS functionaltiy is there...

telnet localhost 25

Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 somewhere.anywhere.com ESMTP
ehlo localhost
250-somewhere.anywhere.com
250-AUTH LOGIN CRAM-MD5 PLAIN
250-AUTH=LOGIN CRAM-MD5 PLAIN
250-STARTTLS
250-PIPELINING
250 8BITMIME
starttls
220 ready for tls
quit
quit
Connection closed by foreign host.
[root@somewhere control]#

In the above SMTP session, I have higlighted the important aspects in DARK RED. After you give the server the initial "ehlo localhost" command, you should get a response back that lists "250-STARTTLS", signaling that the server is in fact equipped for TLS functionality. Then, after you issue the "starttls" command, you should get the :"220 ready for tls" response if the server is able to successfully start the TLS session.

If you happen to get an error that states "454 TLS not available: missing RSA private key (#4.3.0)" after you issue the "starttls" command, you will want to check 2 things:

1) Verify that the cert actually exists at /var/qmail/control/servercert.pem. If it's not there, go back to step 2 and repeat the cert creation step.

2) Verify that the cert is owned by vpopmail:vchkpw. If it's not, then make it so like this:

chown vpopmail:qmail /var/qmail/control/servercert.pem

Alright! If you have reached this point, then Qmail is now successfully up and running. Technically speaking, you could quit right here and have a functioning mail server. However, we still have a few options that we're going to plug into Qmail before we're done. In the next pages we will:

Install Courier IMAP & IMAP SSL.
Install Squirrelmail web based mail interface (requires that IMAP be installed).
Install Qmail-Scanner, an alternative queueing device.
Install Spamassassin, to tag all incoming spam.
Install Clam Anti Virus - To quarantine e-mails containing known viruses
Install qmailanalog, so that you can get nightly server stats.
Install Qtrap, to filter out messages containing undesirable words that may make it past Spamassassin.



Page Compile Time: 0.00014495849609375 Seconds.
54.161.45.156