Red Hat [Electronic resources] : The Complete Reference Enterprise Linux Fedora Edition؛ The Complete Reference نسخه متنی

اینجــــا یک کتابخانه دیجیتالی است

با بیش از 100000 منبع الکترونیکی رایگان به زبان فارسی ، عربی و انگلیسی

Red Hat [Electronic resources] : The Complete Reference Enterprise Linux Fedora Edition؛ The Complete Reference - نسخه متنی

Richard L. Petersen

| نمايش فراداده ، افزودن یک نقد و بررسی
افزودن به کتابخانه شخصی
ارسال به دوستان
جستجو در متن کتاب
بیشتر
تنظیمات قلم

فونت

اندازه قلم

+ - پیش فرض

حالت نمایش

روز نیمروز شب
جستجو در لغت نامه
بیشتر
لیست موضوعات
توضیحات
افزودن یادداشت جدید










POP Servers



The Post Office Protocol (POP) allows a remote server to hold mail for users who can then fetch their mail from it when they are ready. Unlike Sendmail and procmail, which deliver mail messages directly to a user account on a Linux system, the POP protocol holds mail until a user accesses their account on the POP server. The POP server then transfers any received messages to the user's local mailbox. Servers are often used by ISPs to provide Internet mail services for users. Instead of sending mail directly to a user's machine, the mail resides in the POP server until it's retrieved. Linux distributions normally install the University of Washington POP server. Other popular POP servers used are Qpopper, the Qmail POP server, and the Courier POP server.


You can access the POP server from different hosts; however, when you do, all the messages are transferred to that host. They are not kept on the POP server (though you can set an option to keep them). The POP server simply forwards your messages on the requesting host. When you access your messages from a certain computer, they will be transferred to that computer and erased from the POP server. If you access your POP server again from a different computer, those previous messages will be gone.


The POP protocol provides a set of commands you can use to directly test a POP server. You can access the POP server on port 110 using Telnet and then enter a series of POP commands to check the server's performance. The following example connects to the turtle.mytrek.com POP server using Telnet on port 110:


telnet turtle.mytrek.com 110


You can then log in to an account using the


USER
and


PASSWORD
commands. The


LIST
command will list messages and the


RETR
command will display a message. Use


DELE
to delete a message. Use the


QUIT
command to end the session.






Note


The current version of the POP protocol is known as POP3, whereas POP2 is an earlier one that still may be in use in some places.







Note


Both IMAP and POP servers included with Red Hat provide SSL encryption for secure e-mail transmissions. You can also run IMAP and POP servers using


stunnel
to provide similar security.


stunnel
is an SSL wrapper for daemons like imapd, popd, and even pppd (modem connections). In service's xinetd script, you can invoke the server with the


stunnel
command instead of running the server directly.





Washington POP Server



Linux distributions include the University of Washington POP server (ftp.cac.washington.edu/imap), which is part of the University of Washington's imap RPM package. Simply install the package, which is already done as part of the standard install (both POP2 and POP3 servers are installed). The server daemons are called ipop2d and ipop3d. Your Linux system then runs as a POP2 and POP3 server for your network. These servers are run through xinetd. The POP3 server uses the ipop3 file in the /etc/xinetd.d.


The following command would turn the server on:


chkconfig ipop3 on


Once you have installed a POP server, you add accounts to it by simply adding standard user accounts on the host it is running on. You do not need to set up a home directory for them, though. Users access their account using a username and password set up on the POP server's host. For example, to set up a POP user account for a POP server running on the host turtle.mytrek.com, you log in as root on turtle.mytrek.com and create a new user as you normally would for that host. To create a POP user account for larisa, just create a larisa user on the turtle.mytrek.com host.


Both the POP and IMAP Washington servers support Open SSL authentication and encryption. The SSL-enabled versions of the POP and IMAP servers have the names pop3s and imaps. Use


chkconfig
to turn them on or off.


chkconfig pop3s on


You also have to have appropriate SSL POP and IMAP certificates installed in the ssl/certs directory under the names ipop3d.pem and imapd.pem.



Qpopper



Qpopper is the current version of the Berkeley POP server (popper). Qpopper is supported by Qualcomm, makers of Eudora e-mail software. The Qpopper Web page is www.eudora.com/ qpopper. You can obtain a current source code version from ftp.qualcomm.com/eudora/servers/unix. RPM package versions are located at distribution sites or included in the distribution.


Once you have installed Qpopper and have the POP server running, you can add user accounts. Then users on remote systems can access the POP server using various mail clients or Fetchmail. Fetchmail, as described in Chapter 13, will fetch mail from a user account and place it in the mailbox on the user's local host. The following example fetches mail from a POP server running on turtle.mytrek.com:


fetchmail -p POP3 -u chris   turtle.mytrek.com


You can install Qpopper software on your Linux system and have it operate as a POP server for your network. It consists of both the qpopper daemon and the popauth program, which manages an authentication database with password encryption for secure user access. popauth creates a database file called /etc/pop.auth. To add a user, enter the


popauth
command with the option


-user
and the username. You are then prompted for a password with which the user can access their POP account.


If you download the source code version, you use the


./configure
,


make
, and


make


install
sequence to configure, compile, and install the server. For the configure stage, you may need to enter several options to make Qpopper compatible with your system. For example, if your system uses shadow passwords (as most do), you will need to use the


--enable-specialauth
option. The


--enable-apop
option enables the use of the APOP (Authenticated POP) extension to provide encryption that is managed by the


popauth
command:


./configure --enable-specialauth --enable-apop


Qpopper is usually run through xinetd. You would create a popper file in the /etc/xinetd.d directory similar to that shown here:


service pop-3
{
socket_type = stream
wait = no
user = root
server = /usr/bin/popper
disable = no
}


You can turn the server on or off with the


chkconfig
command:


chkconfig pop-3 on


Be sure that the pop-3 service is listed in /etc/services along with its port, 110:


pop-3 110/tcp



/ 328