SquirrelMail Configuration on CentOS

Provides a tutorial example on how to configure SquirrelMail on CentOS to integrate with local Postfix and Dovecot servers.

After you installed SquirrelMail on the Web server, you need to configure it to integrate with local Postfix and Dovecot servers.

1. Run the configuration Perl script:

herong$ cd /var/www/html/mail
herong$ sudo perl config/conf.pl

  SquirrelMail Configuration : Read: config_default.php
  Config version 1.4.0; SquirrelMail version 1.4.23 [SVN]
  Main Menu --
  1.  Organization Preferences
  2.  Server Settings
  3.  Folder Defaults
  4.  General Options
  5.  Themes
  6.  Address Books
  7.  Message of the Day (MOTD)
  8.  Plugins
  9.  Database
  10. Languages

  D.  Set pre-defined settings for specific IMAP servers

  C   Turn color on
  S   Save data
  Q   Quit

  Command >>

2. Using the interactive commands to make the following changes. Don't forget to save the changes.

Organization Preferences > Organization Name: HerongYang.com
Server Settings > Domain: herongyang.com
Server Settings > Sendmail or SMTP: SMTP
Server Settings > Update IMAP Settings: localhost:143 (other)
Server Settings > Update SMTP Settings: localhost:25
General Options > Data Directory: /var/www/mail/data/
General Options > Attachment Directory: /var/www/mail/attach/
Language preferences > Default Charset: utf8

3. Create data and attachment directories.

herong$ cd /var/www/html/mail

herong$ sudo mkdir data
herong$ sudo chown -R apache data

herong$ sudo mkdir attach
herong$ sudo chown -R apache attach
herong$ sudo chmod -R 0730 attach

4. Try to login from SquirrelMail Web address, I get an error:

Error opening ../data/default_pref
Could not create initial preference file!
/var/www/mail/data/ should be writable by user httpd
Please contact your system administrator and report this error.

5. Fix the SELinux security context problem on the data directory.

herong$ cd /var/www/html/mail
herong$ sudo chcon -t tmp_t -R data

6. Try to login again and still get the same error. Looks like we have a bug in the SquirrelMail 1.4.23-svn version.

7. Download, install and configure the SquirrelMail 1.4.22 version.

8. And try to login again. I see no problems with SquirrelMail 1.4.22!

9. Make sure that Postfix and Dovecot servers are running on the CentOS computer locally.

10. Send and retrieve emails with Postfix and Dovecot servers with no problem.

11. Try to send an email with an attachment. I get an error: "Could not move/copy file. File not attached"

12. Fix the SELinux security context problem on the attachment directory.

herong$ cd /var/www/html/mail
herong$ sudo chcon -t tmp_t -R attach

13. Send an email with an attachment with no problem.

herong$ cd /var/www/html/mail
herong$ sudo chcon -t tmp_t -R attach

Conclusion: there seems be a bug in SquirrelMail 1.4.23-svn which prevents "apache" user to access the data directory. But SquirrelMail 1.4.22 works perfectly.

Table of Contents

 About This Book

 Introduction to Linux Systems

 Cockpit - Web Portal for Administrator

 Process Management

 Files and Directories

 Users and Groups

 File Systems

 Installing CentOS

 SELinux - Security-Enhanced Linux

 Network Connection on CentOS

 Software Package Manager on CentOS - DNF and YUM

 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

 vsftpd - Very Secure FTP Daemon

 Postfix - Mail Transport Agent (MTA)

 Dovecot - IMAP and POP3 Server

Email Client Tools - Mail User Agents (MUA)

 "mailx" Command - Send and Read Emails

 "Alpine" - Terminal-Based Email Client

 SquirrelMail Webmail Installation on CentOS

SquirrelMail Configuration on CentOS

 Thunderbird Installation on macOS

 Thunderbird Configuration for POP3S and SMTP

 Thunderbird to Accept POP3S Certificate Exception

 Thunderbird Configuratin for SMTPS Service

 macOS Mail Auto Configuration

 macOS Mail Manual Configuration

 Accept Certificate Exception in macOS Mail

 Windows 10 Mail Configuration Failed

 SSL/TLS Connection Issue in Windows 10 Mail

 GCC - C/C++ Compiler

 Conda - Environment and Package Manager

 Tools and Utilities


 Full Version in PDF/EPUB