SquirrelMail Configuration for QQ Mail

This section provides a tutorial example on how to clone and configure a SquirrelMail Webmail site to access QQ mail server with secure protocols: IMAPS and SMTPS.

SquirrelMail can also be used to send and receive emails from commercial email providers.

Here is what did to clone a SquirrelMail Webmail site for the QQ Mail server.

1. Replicate the SquirrelMail Webmail site directory.

herong$ cd /var/www/html

herong$ sudo cp -pR mail mailqq

2. Check the document page of the new site with a Web browser. You should see the SquirrelMail document with no problem.

herong$ firefox http://localhost/mailqq/doc/

3. Update the configuration of the new site.

herong$ cd mailqq

herong$ sudo perl config/conf.pl

General Options > Data Directory: /var/www/html/mailqq/data/
General Options > Attachment Directory: /var/www/html/mailqq/attach/
Server Settings > IMAP > Server: imap.exmail.qq.com
Server Settings > IMAP > Port: 143
Server Settings > IMAP > Authentication: login
Server Settings > SMTP > Server: smtp.exmail.qq.com
Server Settings > SMTP > Port: 587
Server Settings > SMTP > Authentication: login
                                         (with IMAP username and password)

4. Run the test script in a Web browser.

herong$ firefox http://localhost/mailqq/src/configtest.php

SquirrelMail version:	1.4.22
Config file version:	1.4.0

Checking paths...
    Data dir OK.
    Attachment dir OK.
    Plugins are not enabled in config.
    Themes OK.
    Default language OK.
    Base URL detected as: http://192.168.1.199/mailqq/src (
Checking outgoing mail service....
    SMTP server OK (220 smtp.qq.com Esmtp QQ QMail Server)
Checking IMAP service....
    IMAP server ready (* OK [CAPABILITY IMAP4 IMAP4rev1 ID AUTH=PLAIN ...
Checking internationalization (i18n) settings...
Checking database functions...
    not using database functionality.
Congratulations, your SquirrelMail setup looks fine to me!

5. Try to login with my QQ username and password in a Web browser. I am able to see mails in my QQ email account! So the IMAP setting is working. But username and password was sent to QQ server in clear text at port 143. This is not good. I don't know why QQ server is still serving this port.

herong$ firefox http://localhost/mailqq

6. Try to send out an email. It fails, because the QQ server requires STARTTLS command to encrypt username and password information, and SquirrelMail does not support STARTTLS.

ERROR:
Message not sent. Server replied:
Authentication required
530 Must issue a STARTTLS command first.

7. Change configuration to use IMAPS and SMTPS ports.

Server Settings > IMAP > Server: imap.exmail.qq.com
Server Settings > IMAP > Port: 993
Server Settings > IMAP > Authentication: login
Server Settings > IMAP > Secure IMAP (TLS): true
Server Settings > SMTP > Server: smtp.exmail.qq.com
Server Settings > SMTP > Port: 465
Server Settings > SMTP > Authentication: login
Server Settings > SMTP > Secure SMTP (TLS) : true

8. Login again with my QQ username and password in a Web browser. Send and receive emails with no problem.

This is cool. I can use SquirrelMail to have full access to my QQ mail with secure protocols.

Table of Contents

 About This Book

 Introduction to Linux Systems

 Process Management

 Files and Directories

 Running Apache Web Server (httpd) on Linux Systems

 Running PHP Scripts on Linux Systems

 Running MySQL Database Server on Linux Systems

 Running Python Scripts on Linux Systems

 Conda - Environment and Package Manager

 GCC - C/C++ Compiler

 Graphics Environments on Linux

SquirrelMail - Webmail in PHP

 SquirrelMail Webmail Installation on CentOS

 SquirrelMail Configuration on CentOS

 SquirrelMail for Mail Server on Local Network

 SquirrelMail Configuration for IMAPS Port 993

 Provide Self Signed Certificate to SquirrelMail

 SquirrelMail Configuration for SMTPS Port 465

SquirrelMail Configuration for QQ Mail

 Tools and Utilities

 References

 Full Version in PDF/EPUB