This program is distributed under the terms of the GNU General Public License. See COPYING for additional information.
getpop3 is a versatile POP3 client for Linux 2.0. The complete documentation can be found in the man page included in this distribution.
View
the man page for the latest version
Highlights include:
05/20/98 - V1.50. Entirely new configuration. getpop3 is now distributed according to the terms of the GNU General Public License. getpop3 now uses GNU autoconf for. The /etc/getpop3rc file is not longer necessary, and getpop3 no longer needs to be installed set-userid to root. getpop3 now reads $HOME/.getpop3rc from each user's account. The /var/spool/uidl directory is no longer needed. getpop3 will save the UIDL list in $HOME/.uidl. See the upgrading section below. Fixed bug in UIDL file ownership that noone reported to me.
03/18/97 - V1.08. Added the nodots option, mainly for qmail support. See the man page, and Using getpop3 with qmail below. Minor documentation changes, by popular request.
02/17/97 - V1.07. Fix bug with handling lone +OK result (wonder why nobody else caught this one).
12/15/96 - V1.06. Added syslog logging, and the -Q option.
11/21/96 - V1.05. Maintenance release. Typos in the manual page. Minor glitches. Some obscure versions of shared libs have been reported to cause seg faults. Hopefully this release fixes that. Some sendmails leave temp files lying around in mqueue if a delivery is aborted in the middle, changed logic to signal sendmail, hopefully it'll clean up after itself now. Source code is now available as of this release.
11/04/96 - improve timeout detection. Added -t option. (Version 1.01)
10/30/96 - implemented -s option. This option will cause getpop3 to verify that a certain amount of free disk space exists before attempting to download mail. If not, getpop3 will terminate quietly. People who get mail-bombed will appreciate this feature!
Simply take each line that begins with "user xxxxx", remove the first two words, and save the remainder of the line in the file .getpop3rc in xxxx user's home directory.
For example, if the old /etc/getpop3rc contained the following lines:
user john pop.domain.com john apple user bob pop.example.com bob orangeYou will create ~john/.getpop3rc containing:
pop.domain.com john appleand ~bob/.getpop3rc containing:
pop.example.com bob orangeThis will work as long as the default UIDL files are used. If there is an extra parameter specifying the UIDL file (which is the case if the same user has multiple POP3 mailboxes), you will have to rename the UIDL files. In versions prior to 1.50, a single directory, /var/spool/uidl is used to store UIDL files. That is no longer necessary. The UIDL files can be stored in each user's home directory. For example, if the old /etc/getpop3rc file contained the following:
user john pop.domain.com john apple /var/spool/uidl/john user john pop.example.com john orange /var/spool/uidl/john-2This user can have the following .getpop3rc file:
pop.domain.com john apple .uidl pop.example.com john orange .uidl-2The first mailbox's UIDL file will be saved in ~john/.uidl, and the second UIDL file will be saved in ~john/.uidl-2. After upgrading to getpop3 1.50, you may have to move the UIDL files from /var/spool/uidl, to each user's home directory (or just forget it, and deal with a few duplicate messages show up in the mailboxes).
IMPORTANT: since $HOME/.getpop3rc contains passwords, it must be owned by each user, and have no group or world privileges!!!!
IMPORTANT: The "okuser", "mailer" and "nodots" option in /etc/getpop3rc from previous versions of getpop3 have been eliminated. The GNU autoconf script will now try to figure out the correct setting for mailer and nodots. okuser now is meaningless. nodots is replaced by a #define DOTESCAPE in autoconfig.h. mailer is replaced by a #define DEFAULT_SENDMAIL in autoconfig.h. Both settings can be overriden by command line switches. See below for more information.
rpm --rebuild getpop3-1.51-1.src.tgzThis will build the binary RPM in /usr/src/redhat/RPMS/i386. I am not providing a binary RPM because certain default options for getpop3 must be determined when running the configure script (see below). In the event that configure guesses the wrong options for you, in particular DEFAULT_SENDMAIL and DOTESCAPE, you'll either have to patch the source, or use the command-line switches to override them. Finally type:
rpm -i getpop3-1.51-1.i386.tgzTo install getpop3. You must type this command in /usr/src/redhat/RPMS/i386.
Type:
./configureThe configure script may take one optional argument: --enable-DEBUG. If given, getpop3 will be compiled with some debug code included.
Running configure will create Makefile, and autoconfig.h. Most settings in autoconfig.h should remain as is. In particular, DEFAULT_SENDMAIL is set to point to your local delivery agent, and DOTESCAPE is set to indicate if the local delivery agent is sendmail and it needs lines which start with a period to be prefixed by a second period. configure will try to figure out what your delivery agent is. If it doesn't get it right, you may adjust it right there.
Verify the options in Makefile, and autoconfig.h. The configure script tries to guess what they should be, but it could be wrong. Please take a look at the following settings in config.h, they may need changing on your system:
DEFAULT_CONFIGFILE - the configuration file in each user's home directory, fixed at "/.getpop3rc" (leading slash is required).
DEFAULT_UIDLFILE - the default file containing UIDL tokens.
Certain configurations of sendmail require that all lines in a message which start with a period must have that period doubled. If so, set DOTESCAPE in autoconfig.h to 1, otherwise set to 0. To determine if you need to have this parameter set, type the following as root (or as any other user) (substitute your correct mail delivery agent instead of /usr/bin/sendmail):
/usr/bin/sendmail root To: root ..This is a test .If sendmail terminates by itself after you enter the second line, which contains a single period, and sendmail ends up delivering a message with only one line, and one period at the beginning of the line, set DOTESCAPE to 1. Otherwise, you will need to press the EOF key (CTRL-D usually) to terminate sendmail, and the message will have two dots at the beginning of the first line. In this case, DOTESCAPE must be set to 0.
DOTESCAPE and DEFAULT_SENDMAIL can be overriden using the -E and the -m command line options to getpop3, but setting them here to the correct values makes those options unnecessary.
make depend maketo compile it, and that's it! Type
make installTo install getpop3 to /usr/local/bin.
IMPORTANT: if upgrading from previous version, make sure that getpop3 no longer has set-user-id privileges. Also, delete /var/spool/uidl.
Each user will need to create a file in his/her home directory, called .getpop3rc containing a single line of text:
POP3SERVER POPACCOUNT POPPASSWORDPOP3SERVER is the machine name of the POP3 server. POPACCOUNT is the account on the POP3 server. POPPASSWORD is the password.
Make sure that .getpop3rc is owned by each user, and permissions are set to 600.
To verify if everything is working correctly, type the following command, as the user:
getpop3 -kIf you happen to have some mail sitting in your POP3 maildrop, this will actually download it, but the messages will not be erased from the POP3 maildrop. Perhaps, before running getpop3, you may want to send a small test message to your maildrop. However, even if your maildrop is empty, when you run getpop3, the conversation with the POP3 server will be traced to the screen.
5,25,45 * * * * /usr/local/bin/getpop3 -q -A... And forget about it. getpop3 will take care of everything. Note, that messages from your POP3 maildrop will be deleted after they are downloaded. To keep messages in your maildrop without deleting them, add a -k flag to the command (you must have other ways of cleaning out your maildrop, of course).
If you are using very old software on the POP3 server that does not support the UIDL command:
man getpop3
If Qmail is not installed in /var/qmail, but somewhere else, the configure script should find qmail-inject as long as it is in the path. If it's not in the path, you must manually edit autoconfig.h and set DEFAULT_SENDMAIL.
!!! Do not set MAILHOST/MAILUSER environment variables when getpop3 uses qmail-inject as the mail delivery agent, otherwise the headers will be messed up!
Similarly, I don't think I will have the resources to incorporate every change or enhancement that is sent to me. If I do, I reserve the right to make slight alterations, or changes, as I see fit.
Please see the included man page for contact and author information.
Sam Varshavchik
mrsam @ geocities.com |
This page hosted by ![]() |