getpop3 - a POP3 client for Linux.

Current version is 1.51
Copyright 1996-1998, Double Precision, Inc.
 

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.

NEW -- View the man page for the latest version -- NEW

Highlights include:

Change log

06/20/98 - V1.51. Ported code to compile for RedHat 5.1

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!

Upgrading from a previous version of getpop3

If you are upgrading from V1.10, or earlier, you must convert /etc/getpop3rc global file to a $HOME/.getpop3rc file for each account.

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 orange
You will create ~john/.getpop3rc containing:
 
  pop.domain.com john apple
and ~bob/.getpop3rc containing:
 
  pop.example.com bob orange
This 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-2
This user can have the following .getpop3rc file:
 
  pop.domain.com john apple .uidl
  pop.example.com john orange .uidl-2
The 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.

QUICK INSTALLATION:

Red Hat Linux

Download the source RPM, getpop3-1.51-1.src.rpm. The source RPM is signed with my PGP key, which can be found at http://www.geocities.com/SiliconValley/Peaks/5799/index.html. Type:
   rpm --rebuild getpop3-1.51-1.src.tgz
This 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.tgz
To install getpop3. You must type this command in /usr/src/redhat/RPMS/i386.

Other Linuxes

Download the source code, getpop3-1.51.src.tgz and unpack it.

Type:

 
  ./configure
The 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.

Compiling the source code

Type
 
   make depend
   make
to compile it, and that's it!  Type
 
   make install
To 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 POPPASSWORD
POP3SERVER 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 -k
If 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.

Automatic downloading of everyone's mail.

The root user can add the following entry to crontab, in order to have everyone's mail downloaded:
 
    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:

  1. Get your sysadmin to upgrade your POP3 server, or, as the last resort:
  2. Pass the -o flag to getpop3, and make sure you have a reliable connection to the POP3 server. If you are using a PPP dialup connection, either take getpop3 out of the crontab, and run it manually, or make sure that getpop3 is not running when you shut down the PPP connection.
For complete documentation, see the man file:
 
    man getpop3

Using getpop3 with qmail

The configure script will automatically set DEFAULT_SENDMAIL in config.h to /var/qmail/bin/qmail-inject. However, you should manually set DOTESCAPE to 0. You can always use the -m and the -E options, however by changing these defines, you will provide the correct defaults for Qmail.

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!

History

getpop3 was the very first utility I wrote and released for Linux, in 1996. In 1998, after writing increasingly sophisticated applications for Linux, including an FTP client and an IRC client, I went back, and completely reconfigured how getpop3 operates (mostly few changes to main.c, but what a difference it makes!), and released it under the terms of the GNU General Public License.

Support

getpop3 should compile and work fine under other Unix systems, needing, at most, a few minor changes to the makefile. However I don't have the time or the resources to keep track of every Unix system in the world. I may not, necessarily, be able to incorporate into my source code every change that is necessary to be able to compile, and run, the program under every Unix system in existence. You are welcome to maintain your own version, subject to redistribution conditions stated above.

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 www.geocities.com Get your own Free Home Page