AtMail Open Webmail With Sendmail & Dovecot

Hai friends 🙂

Today we are going to see hom AtMail Open the opensource webmai which can be used to replace Squirrelmail. AtMail open is an Ajax based webmail and its very beautiful than Squirrelmail. 🙂

You can download AtMail Open from http://atmail.org/

1.Setting the Mail Server [Sendmail]

Here we are going to configure and setup the Sendmail Mail Server in RHEL5/Centos/Fedora. The following steps are just basic configurations and no case of security is considered in this configuration.

First of all install the sendmail-cf package(the sendmail server will be installed by defualt in most distributions). This package is necessary to reconfigure sendmail.

#yum install sendmail-cf

Now open the sendmail-mc file in a favorite text editor and make the following changes.

#vim /etc/mail/sendmail-mc

By default sendmail only listens on loopback address for LMTP(local mail transfer protocol) for listening on all interface just comment the “DEAMON_OPTIONS” in line 116.For that add  “dnl” infront of the file.

Now uncomment the following lines to set the mail server domain like user@domain.com instead of user@stationx.domain.com.[This feature is called Masquerading] 🙂 [Confusing????]

here replace “mydomain.com” with your domains name.

after making these changes for bringing the changes in effect use the command:

#make -C /etc/mail

Done 🙂

2. Dovecot [IMAP Server]

Dovecot is an OpenSource IMAP/POP3 Server for Linux/Unix Like Systems.

First Install Dovecot:

#yum install dovecot

now edit the dovecot configuration file to enable IMAP support.

#vim /etc/dovecot.conf

find the line with “protocols” and uncomment it to enable imap support

Now to start dovecot and sendmail on reboots use:

#chkconfig dovecot on

#chkconfig sendmail on

Just restart the services to see whether they run properly.

#service sendmail restart

#service dovecot restart

3.Installing Webserver-httpd [APACHE]

Install httpd webserver using :

#yum install httpd

We should install php,php-mbstring,php-ldap(to enable ldap authentication-optioanl)php-mysql

#yum install php php-mbstring php-ldap php-mysql

now start the httpd service using:

#service httpd start

3.Setting up atmailopen.

Now Download atmailopen from http://atmail.org and extract it to the document root of your webserver.

#wget http://atmail.org/download/atmailopen.tgz

#tar -xzf atmailopen.tgz -C /var/www/html

Now change the permission of the folder :

#chown -R apache /var/www/html/atmailopen

Now openup your browser and navigate to http://localhost/atmailopen

Now you are at the installer of atmailopen. 🙂

You can also edit various parameters as shown in the installer in /etc/php.ini file.

Now Click next Continue>> Accept the Apache License agreement Continue>>Now provide the various sql parameters [those who dont know please request/comment] click Continue>> and finish the installer.

Now use the browser to http://<domain>/atmailopen

Now the Joke comes.

first create two accounts on your machine:

#useradd -s /sbin/nologin user1

#useradd -s /sbin/nologin user2

now the email id for user1 is user1@yourdomain.com and for user2 is user2@yourdomain.com.

Now herecomes a small editing to atmails file for succesffull login.

use:

#vim /var/www/html/atmailopen/lib/IMAP_Client.php

function login($user, $pass)
{
list($user, $crap) = split(“@”, $user, 2);
$this->user = $user;

add the lines shown bold in that file and save it 🙂

done:)

now http://<hostname>/atmailopen

user: user1 @ yourdomain.com

mailserver: mailservers hostname.

passwd: password of the user

Login and thats it 🙂 try sending mail to user2 and create any number of users 🙂

Advertisements

6 thoughts on “AtMail Open Webmail With Sendmail & Dovecot

  1. I think it’s fair to say that personal computers have become the most empowering tool we’ve ever created. They’re tools of communication, they’re tools of creativity.

  2. Fantastic……..But I can send mail through atmail to others domain ….. but they can not reply back to me….. my log is showing “relay=mail-qa0-f42.google.com [x.x.x.x], reject=550 5.7.1 … Relaying denied”

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s