Sunday, April 13, 2008

Run and Provide : A very basic mail server for intranet using postfix + dovecot + cyrus-imapd + squirrelmail

hi frnds,
i m assuming tht u have a linux installed (fully) but not configured.. ok

assuming hostname = maverick.co.in
so here we go..
u will have postfix, dovecot, cyrus-imapd, squirrel mail, httpd.. i mean web server pre-installed


lets first enable postfix
edit file "/etc/postfix/main.cf"

just uncomment/ add following lines

myhostname = maverick.co.in
mydomain = maverick.co.in
myorigin = $myhostname
inet_interfaces = all
mynetworks = 172.22.0.0/255.255.0.0
alias_maps = dbm:/etc/aliases
alias_database = dbm:/etc/mail/aliases

start the service
service postfix start

now lets configure dovecot
edit file "/etc/dovecot.conf"

just add
protocols = imap imaps pop3 pop3s

start the service
service dovecot start

lets create some users
adduser a
passwd a

start the service
service cyrus-imapd start

now lets configure squirrel mail
open file "/usr/share/squirrelmail/config/conf.pl"

go to server settings
change sendmail to smtp


now lets configure web server
open file "/etc/httpd/conf/httpd.conf"

change document root to [in line no. 265 around]
DocumentRoot "/usr/share/squirrelmail"

and in line no 290


start the service
service httpd start


to start all these automatically when u start ur computer
chkconfig postfix on
chkconfig dovecot on
chkconfig cyrus-imapd on
chkconfig httpd on


and this is ur mail server ready to mail each other... but limited to local users this is not intended to send mails to users on other mail servers...
luk at this like.. a gmail user can send mail only to a gmail server...
sry this has no relay facility.. but soon tht will be.. so keep watching...
till then..
enjoy

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.