Tag Archive: mail server


Webmail Configuration — Part 2

#  yum  install  mysql-server*  httpd*  roundcubemail*                         [EPEL Repo]

—————————————-

Configure Mysql database

—————————————-

#  service  mysqld  start

#  mysqladmin  –u  root  password  [give password]

#  mysql  –u  root  -p

mysql>  create  database  rcmail  character  set  utf8  collate  utf8_bin;

mysql>  grant  all  privileges  on  rcmail.*  to  rcadmin@localhost  identified  by  ‘[db_password]’;

mysql>  flush  privileges;

mysql>  exit

#  cd  /usr/share/doc/roundcubemail-*/SQL/

#  mysql  -u  rcadmin  -p  rcmail  <  mysql.initial.sql 

—————————————–

Roundcube Configuration

—————————————–

#  vim  /etc/roundcubemail/db.inc.php

Edit line 21:

$rcmail_config[‘db_dsnw’] = ‘mysql://rcadmin:123456789@localhost/rcmail’;

123456789 is the db_password given above.

Save and quit.

Continue reading

Advertisements

————————————————–

Configure Postfix SMTP service

———————————————-

#  yum  install  postfix*

Edit main.cf:
#  vim  /etc/postfix/main.cf

Line 75 & 83 (enable and edit):

myhostname  =  abc.com

mydomain  =  com

Line 99 (enable):

myorigin  =  $mydomain

Line 116 & 119 (enable and edit):

inet_interfaces  =  all

inet_protocols  =  ipv4

Line 165 (enable):

mydestination  =  $myhostname, localhost.$mydomain, localhost, $mydomain

Line 264 (enable and edit):

mynetworks  =  192.168.7.0/24, 127.0.0.0/8

Line 419 (enable):

home_mailbox  =  Maildir/

Line 545 & 546 (enable and edit):

header_checks = regexp:/etc/postfix/header_checks

body_checks = regexp:/etc/postfix/body_checks

Line 571 (enable):

smtpd_banner  =  $myhostname  ESMTP

Add following 7 lines at the end of file (SMTP-auth settings):

smtpd_sasl_type  =  dovecot

smtpd_sasl_path  =  private/auth

smtpd_sasl_auth_enable  =  yes

smtpd_sasl_security_options  =  noanonymous

smtpd_sasl_local_domain  =  $myhostname

smtpd_client_restrictions  =  permit_mynetworks,reject_unknown_client,permit

smtpd_recipient_restrictions  =  permit_mynetworks,permit_auth_destination,permit_sasl_authenticated,reject

Continue reading

Squirrel Mail configuration

Configure DNS with domain name “abc.com” on the server.

#  yum  install  sendmail*
#  yum  install  dovecot*
#  yum  install  httpd*
#  yum  install  squirrelmail*

Sendmail configuration :

Edit in sendmail.mc :

#  vi  /etc/mail/sendmail.mc

Look for these lines :

DAEMON_OPTIONS(‘Port=smtp, Addr=127.0.0.1, Name=MTA’)dnl
FEATURE (‘accept_unresolvable_domains’)dnl

Comment them by adding “dnl #” in the beginning (without quotes).
Save and quit.

Generate sendmail.cf from sendmail.mc :

#   m4  /etc/mail/sendmail.mc  >  /etc/mail/sendmail.cf
#  service  sendmail  restart

Dovecot configuration :

#  vi  /etc/dovecot.conf

Look for the line :

# protocols = imap imaps pop3 pop3s

Uncomment by removing “#”.
Save and quit.

#  service  dovecot  restart.

Webserver configuration :

#  vi  /etc/httpd/conf/httpd.conf

Move at the end and set the server name :

ServerName http://www.abc.com
Save and quit.

#  Service  httpd  restart.

Squirrelmail configuration :

Move to :

#   cd  /usr/share/squirrelmail/config
#   ./conf.pl

Now select option 1 (Organization Preferences).

Organization Name : YOUR_ORG_NAME
Organization Title : YOUR_ORG_NAME Webmail
Provider link : http://YOUR_ORG_SITE_ADDRESS
Provider name : YOUR_ORG_NAME

Now select option 2 (Server Settings).

Domain : abc.com
Sendmail or SMTP : Sendmail
IMAP Server : localhost
IMAP Port : 143
Server software : uw
Delimiter : /

Now select option 3 (Folder Settings).

Default Folder Prefix : mail/
Show Folder Prefix Option : true

Trash Folder : Trash
Sent Folder : Sent
Drafts Folder : Drafts
By default, move to trash : true
By default, move to sent : true
By default, save as draft : true
List Special Folders First : true
Show Special Folders Color : true
Auto Expunge : true
Default Sub. of INBOX : false
Show ‘Contain Sub.’ Option : true
Default Unseen Notify : 2
Default Unseen Type : 1
Auto Create Special Folders : true
Folder Delete Bypasses Trash : false
Enable /NoSelect folder fix : false

Now select option 4 (General Settings).

Data Directory : /var/lib/squirrelmail/prefs/
Attachment Directory : /var/spool/squirrelmail/attach/
Directory Hash Level : 0
Default Left Size : 150
Usernames in Lowercase : false
Allow use of priority : true
Hide SM attributions : false
Allow use of receipts : true
Allow editing of identity : true
Allow editing of name : true
Remove username from header : false
Allow server thread sort : true
Allow server-side sorting : true
Allow server charset search : true
Enable UID support : true
PHP session name : SQMSESSID
Location base :

Now choose option 8 (Plugins) and select the plugins that you wish to provide to your webmail users.

Save and quit.

Now, open your web browser and type :

http://%5Bserver-ip%5D/webmail
OR
http://www.abc.com/webmail