Install SquirrelMail
I'm assuming that SELinux is not enabled ;
yum install mutt
yum install dovecot
yum install procmail
We must create a procmailrc file
/etc/procmailrc
Restart Apache:
service httpd restart
Then configure SquirrelMail for COURIER IMAP:
/usr/share/squirrelmail/config/conf.pl
SquirrelMail Configuration : Read: config.php (1.4.0)
---------------------------------------------------------
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 off
S Save data
Q Quit
Command >>
D. Set pre-defined settings for specific IMAP servers
SquirrelMail Configuration : Read: config.php
---------------------------------------------------------
While we have been building SquirrelMail, we have discovered some
preferences that work better with some servers that don't work so
well with others. If you select your IMAP server, this option will
set some pre-defined settings for that server.
Please note that you will still need to go through and make sure
everything is correct. This does not change everything. There are
only a few settings that this will change.
Please select your IMAP server:
bincimap = Binc IMAP server
courier = Courier IMAP server
cyrus = Cyrus IMAP server
dovecot = Dovecot Secure IMAP server
exchange = Microsoft Exchange IMAP server
hmailserver = hMailServer
macosx = Mac OS X Mailserver
mercury32 = Mercury/32
uw = University of Washington's IMAP server
gmail = IMAP access to Google mail (Gmail) accounts
quit = Do not change anything
Command >>
courier
Without courier IMAP configurations in dovecot , new emails are stored in
/var/spool/mail
In this folder there is a single file for each user ; This scenario is for small servers with pop3 access ;
Configuring DOVECOT
/etc/dovecot/conf.d/10-mail.conf
mail_location = maildir:%h/Maildir
Then , the test :
echo "test" | mutt -s "eMaiL TesT" user@localhost
After this test , an email must enter in
/home/user/Maildir ;
If the email arrives in
/var/spool/mail/user
then , the dovecot and procmailrc settings are not OK
and must check
/var/log/maillog
Configuring PROCMAIL
/etc/procmailrc
SHELL=/bin/sh
MAILDIR="$HOME/Maildir/"
DEFAULT=$MAILDIR
VERBOSE=off
LOGFILE=$HOME/.procmail_`date "+%Y.%m.%d"`.log
FORMAIL=/usr/bin/formail
USER=root
DROPPRIVS=yes
SENDMAIL=/usr/sbin/sendmail
~ ~ ~
If from localhost squirrelmail is OK and from another host can't be accessed ,
then we must check the firewall :
firewall-cmd --state
- > running
After the firewalld service has stopped , the webmail can be accessed from the network !