Ok, so you installed and set up Sendmail and Dovecot and they are working in sync without any problems. What’s next?
Here comes webmail. If you don’t want a workhorse, nothing fancy (and sometimes confusing), your best bet is Squirrelmail – PHP based web application that runs on the Apache server and allows your users the ability to log in and read their email from any remote location through their favorite browser. As I already mentioned, Squirrelmail supports only IMAP mailboxes (no POP3) . Yet, this webmail package has many extra plugin modules that have been written for it, and its simply a matter of downloading the plugin and running a configuration script; its that easy.
The package has two configuration files, one that enables the application for Apache and another containing the main PHP settings. The Apache configuration details an alias that points to the location of the main SquirrelMail directory, this would be viewed at http://localhost/webmail.
Location of the configuration file is at /etc/httpd/conf.d/squirrelmail.conf And the main PHP configuration file is located at /etc/squirrelmail/config.php
The PHP settings are fairly easy to understand just by looking at them. You should only need to worry about the domain name ($domain), where the imap mailboxes are located ($imapServerAddress), and where to send outgoing emails for processing ($smtpServerAddress). If the webmail application is being run on the email server (like we’re doing), then leave the settings for localhost.
$domain = ‘example.com’;
$imapServerAddress = ‘localhost’;
$imapPort = 143; <– plain IMAP protocol running on localhost (server)
$useSendmail = true;
$smtpServerAddress = ‘localhost’;
$smtpPort = 25;
$sendmail_path = ‘/usr/sbin/sendmail’;
$pop_before_smtp = false;
$imap_server_type = ‘uw’;
One of the big queries that always gets asked about any webmail system, is how to change the size of the file attachments users can send. Then look no further, this in fact is a PHP setting. You need to change the setting in the main PHP ini file, and it should be set to the same value the mail server is configured to accept.
Find the following separate 3 lines in the file /etc/php.ini and change the defaults to your desired size.
post_max_size = 30M
upload_max_filesize = 30M
memory_limit = 64M
That is all. You Squirrelmail should now be configured. Enjoy.
How to configure Sendmail
I just love these quick Howto tutorials, especially if they make sense not only for a corporate sysadmin, but also for a regular guy with home DSL and one IP address who wants to run a decent e-mail server. Sendmail was always my preferred e-mail server among others. I tried Postfix, Qmail and Exim, each of them has its own benefits and drawbacks. Yet, Sendmail works for me fine for all those years. Here is a very detailed tutorial that will set you up and running your own Sendmail server at no time.