Wednesday 28 December 2011

POP SERVER

POP SERVER
INSTALLING RELEVANT PACKAGES:
The POP Daemon is blunded with another daemon that provides similar functionality, the
IMAP daemon , anb both are found within the dovecot package.
INSTALL THE DOVECOT RPM USING YUM INSTALLER
yum -y install dovecot
EDIT THE /etc/dovecot.conf FILE AND ADD THE FOLLOWING LINE
vim /etc/dovecot.conf
protocols= pop3 pop3s
TO ENABLING THE SERVICES
service dovecot start/restart/reload
service cyrus-imapd start/restart/reload
CONFIRMING THE SERVICE:
echo " this is test mail" | mail -s "hello user" user
THEN CONNECT TO POP SERVER
telnet stationx.example.com 110
+OK Dovecot ready.
user user
+OK
pass 1
+OK Logged in.
stat
+OK 1 691
TOP 1 691
+OK
Return-Path: <root@station9.example.com>
X-Original-To: user@station9.example.com
Delivered-To: user@station9.example.com
Received: from station9.example.com (localhost.localdomain [127.0.0.1])
by station9.example.com (Postfix) with ESMTP id A5F35ABB9E
for <user@station9.example.com>; Fri, 7 Sep 2007 11:48:14 +0530 (IST)
Received: (from root@localhost)
by station9.example.com (8.13.8/8.13.8/Submit) id l876IE8j005986
for user; Fri, 7 Sep 2007 11:48:14 +0530
Date: Fri, 7 Sep 2007 11:48:14 +0530
From: root <root@station9.example.com>
Message-Id: <200709070618.l876IE8j005986@station9.example.com>
To: user@station9.example.com
Subject: hello user
this is test mail
Now we have properly installed POP server
USING A POP CLIENT
Most popular Mail User Agents today, such as mozilla, mutt, evolution, are POP aware, and
can be used as POP clients.
There is also a popular command-line POP client called "fetchmail". fetchmail is highly
configurable, can query multiple mailboxes, and can run in daemon mode, such that it could query a
user's mailbox every five minutes.
fetchmail delivers the mail pasing it off to the MTA an a localhost, usually "sendmail".
vi ~user/.fetchmailrc
poll stationX.example.com with protocol pop3:
user user there is user user here
password "redhat"
The passwords are stored in this file, fetchmail will refuse to run unless you make the file readable
only by owner
chmod 600 ~user/.fetchmailrc
chown user ~user/.fetchmailrc
Attempt to "pop" your mail as user.
echo " testing" | mail -s "hi" user
su - user
fetchmail -v
logout
Now fetchmail is able to fetch mails from other hosts.
RECEIVING MAIL USING POP3
STEP 1 : telnet 192.168.0.X 110
STEP 2 : user
STEP 3 : pass
STEP 4 : stat + ENTER
STEP 5 : top + ID
STEP 6 : "." + ENTER
STEP 7 : quit

No comments:

Post a Comment