Visit reference site for more info:
Figure 1: Shows an example of a web based mail client using squirrel mail.
The following are the step-by-step instructions on how to Install and Configure a mail server with squirrel mail as a Client tool
1. Postfix SMTP Server Setup Howto for RHEL/CentOS 5
Reference site: http://www.linuxmail.info/postfix-smtp-server-howto-centos-5/
Installing and setting up Postfix SMTP Server in Red Hat Enterprise Linux 5 or CentOS 5 is easy. Postfix has secure default settings so we just need to open it up a bit.
# yum install postfix
Stop sendmail service if its already running to avoid conflict with postfix.
- Open a terminal and configure postfix by typing the following command.
Make sure to add/uncomment(if the lines are existing) the following lines.
- Open a terminal and type the following commands.
2. Dovecot POP3/IMAP Server Setup Howto for RHEL/CentOS 5
Reference site: http://www.linuxmail.info/install-setup-dovecot-centos-5/
Installing and setting up Dovecot in Red Hat Enterprise Linux 5 or CentOS 5 is easy. All we have to do is to enable the services we would like to provide and we are good to go.
# yum install dovecot
- Edit the configuration file of dovecot
# vi /etc/dovecot.conf
Make sure to add/uncomment(if existing) the lines below.
- Start the dovecot service
# /etc/init.d/dovecot start
- 1. Open a terminal. I
3. Postfix SMTP Authentication and Dovecot SASL
SMTP Authentication (SMTP Auth) provides an access control mechanism that can be used to allow legitimate users to relay mail while denying relay service to unauthorized users, such as spammers.
4. SquirrelMail Webmail Setup Howto for RHEL/CentOS 5
SquirrelMail is an open source standards-based webmail package written in PHP. When installed, SquirrelMail is ready out of the box. All it needs is an installed web server like Apache, SMTP server like Postfix, and IMAP server like Dovecot.
Installing Web server
#yum install httpd
(make sure its running)
#yum install squirrelmail
5. MailScanner, Postfix, ClamAV and SpamAssassin Setup Howto for RHEL/CentOS 5
This page will guide you in configuring MailScanner, ClamAV and SpamAssassin to work in Postfix. Before proceeding, please make sure that all of the above components are already installed.
2.Go to the directory of mailspool for mailscanner
- Create n folder
#mkdir –p n
- 4. Change user and group owners of the folders inside
#chown postfix incoming; chgroup clamav incoming;chmod ug+rwx incoming
# chown postfix n; chgroup clamav n;chmod ug+rwx n
# chown postfix quarantine; chgroup clamav quarantinen;chmod ug+rwx quarantine
INSTALLING AND SETTING UP SPAM ASSASIN
A. Install spamassassin
[root@localhost ~]# yum -y install spamassassin
B. Edit /etc/MailScanner/spam.assassin.prefs.conf
# bayes_file_mode 0770
And modify the directory permissions:
[root@localhost ~]# chown postfix:apache /var/spool/MailScanner/spamassassin/
[root@localhost ~]# chown postfix:apache /var/spool/MailScanner/spamassassin/bayes_*
[root@localhost ~]# chmod g+rws /var/spool/MailScanner/spamassassin/
[root@localhost ~]# chmod g+rw /var/spool/MailScanner/spamassassin/bayes_*
[root@localhost ~]# spamassassin -D -p /etc/MailScanner/spam.assassin.prefs.conf –lint
You should see lines like the following in the output:
dbg: config: using “/etc/MailScanner/spam.assassin.prefs.conf” for user prefs file
dbg: bayes: tie-ing to DB file R/O /var/spool/MailScanner/spamassassin/bayes_toks
dbg: bayes: tie-ing to DB file R/O /var/spool/MailScanner/spamassassin/bayes_seen
dbg: bayes: found bayes db version 3
dbg: config: score set 0 chosen.
#starting clam antivirus for Mail
#Testing clam antivirus for Mail
#Updating clam antivirus for Mail
#Check mail scanner if there’s error
#Checking Mailscanner’s settings
#Starting Spam assassin
#testing spam assasssin
spamassassin -D -p /etc/MailScanner/spam.assassin.prefs.conf –lint
spamassassin -D /usr/share/doc/spamassassin-3.3.1/sample-spam.txt
#Example spam assassin directory