How to Install Postfix Mail server :-
Before Installing check Port Number (POP3 Imap)
Telnet service:
Hostname:
Ip range:
Then start : # yum install postfix -y
# vi /etc/postfix/main.cf
## Line no 75 - Uncomment and set your mail server FQDN ##
myhostname = server.unixmen.local
## Line 83 - Uncomment and Set domain name ##
mydomain = unixmen.local
## Line 99 - Uncomment ##
myorigin = $mydomain
## Line 116 - Set ipv4 ##
inet_interfaces = all
## Line 119 - Change to all ##
inet_protocols = all
## Line 164 - Comment ##
#mydestination = $myhostname, localhost.$mydomain, localhost,
## Line 165 - Uncomment ##\
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
## Line 264 - Uncomment and add IP range ##
mynetworks = 192.168.1.0/24, 127.0.0.0/8
## Line 419 - Uncomment ##
home_mailbox = Maildir/
# service postfix restart
# chkconfig postfix on
# useradd sk
# passwd sk
# telnet localhost smtp
rying ::1...
Connected to localhost.
Escape character is '^]'.
220 server.unixmen.local ESMTP Postfix
## type this command ##
ehlo localhost
250-server.unixmen.loca
l250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
## Type this - mail sender address##
mail from:<sk>
250 2.1.0 Ok
## Type this - mail receiver address ##
rcpt to:<sk>
250 2.1.5 Ok
## Type this to input email message ##
data
354 End data with <CR><LF>.<CR><LF>
## Enter the boddy of the email ##.
welcome to unixmen mail server
## type dot (.) to complete message ##
250 2.0.0 Ok: queued as B822221522
quit ## type this to quit from mail ##
221 2.0.0 Bye
Connection closed by foreign host.
check mail
# ls /home/sk/Maildir/new/
read mail
cat /home/sk/Maildir/new/1390215275.Vfd00Ie04f8M357080.server.unixmen.local
Dovecot for Postfix Mail server :-
# yum install dovecot
# vi /etc/dovecot/dovecot.conf
## Line 20 - umcomment ##
protocols = imap pop3 lmtp
# vi /etc/dovecot/conf.d/10-mail.conf
## Line 24 - uncomment ##
mail_location = maildir:~/Maildir
# vi /etc/dovecot/conf.d/10-auth.conf
## line 9 - uncomment##
disable_plaintext_auth = yes
## Line 97 - Add a letter "login" ##
auth_mechanisms = plain login
# vi /etc/dovecot/conf.d/10-master.conf
## Line 83, 84 - Uncomment and add "postfix"
mode = 0600
user = postfix
group = postfix
# service dovecot start
# chkconfig dovecot on
# telnet localhost pop3
Trying ::1...
Connected to localhost.
Escape character is '^]'.
+OK Dovecot ready.
user sk ## log in as user sk ##
+OK
pass centos ## input user password ##
+OK Logged in.
retr 1
+OK 439 octets
Return-Path: <sk@unixmen.local>
X-Original-To: sk
Delivered-To: sk@unixmen.local
Received: from localhost (localhost [IPv6:::1])
by server.unixmen.local (Postfix) with ESMTP id B822221522
for <sk>; Mon, 20 Jan 2014 16:23:54 +0530 (IST)
Message-Id: <20140120105404.B822221522@server.unixmen.local>
Date: Mon, 20 Jan 2014 16:23:54 +0530 (IST)
From: sk@unixmen.local
To: undisclosed-recipients:;
welcome to unixmen mail server
.
quit
+OK Logging out.
Connection closed by foreign host.
Squirrel Mail for Postfix Mail server :-
first add this in 6.xxx
sudo rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
yum install squirrelmail -y
cd /usr/share/squirrelmail/config/
./conf.pl
(incase mails are not sending then use this command)
# setsebool -P httpd_can_sendmail 1
I hope you Will be like this :
if you like it then kindly Comment and please share my Blog :
No comments:
Post a Comment