This is the documentation for getmail version 4. Version 4 includes numerous changes from version 3.x; if you are using getmail version 3, please refer to the documentation included with that version of the software.
getmail is Copyright © 1998-2004 Charles Cazabon. <getmail @ discworld.dyndns.org>
getmail is licensed under the GNU General Public License version 2 (only). If you wish to obtain a license to distribute getmail under other terms, please contact me directly.
getmail is a mail retriever designed to allow you to get your mail from one or more mail accounts on various mail servers to your local machine for reading with a minimum of fuss. getmail is designed to be secure, flexible, reliable, and easy-to-use. getmail is designed to replace other mail retrievers such as fetchmail.
getmail version 4 includes the following features:
getmail version 4 has been completely rewritten. It is designed to closely mimic the interface and user experience of getmail version 3, but the new architecture necessitates some differences you will notice:
getmail version 4 requires Python version 2.3.3 or later. If you have only an earlier version of Python available, you can install the latest version without disturbing your current version, or use getmail version 3, which requires only Python version 1.5.2 or later.
At the time of this writing, the current stable version of Python is 2.3.4. You can download that version from the page at http://www.python.org/2.3.4/ . Binary packages are typically available for Windows and RPM-based Linux systems, or building Python from source is typically as easy as unpacking the source tarball, and running the following commands:
./configure make make install
Download getmail 4 from the official website main page at http://www.qcc.ca/~charlesc/software/getmail-4/ .
Installing getmail is very easy; MS Windows users can download and run the self-installer, and everyone else can just download the tarball distribution, unpack it, change into the directory it unpacks into, and run this command:
$ python setup.py install
That's all there is to it. 99.9% of users don't need a special package/port/etc (even MS Windows users can use the tarball, if they want). If you'd like more details on install options, keep reading.
Once you have downloaded or otherwise obtained getmail, unpack it. On GNU-ish Unix-like systems, this means:
$ tar xzf getmail-
.tar.gz
On Windows or Macintosh systems, use a Zip-type archiver program to unpack the tarball.
On SystemV-like Unix systems, you may instead need to break this down into two steps:
$ gunzip getmail-.tar.gz $ tar xf getmail- .tar
Then, change into the extracted getmail directory and start the build process. The easiest installation method is to use the included setup.py Python distutils script to build and install getmail directly. Alternatively, you can build a binary package (i.e., an RPM or similar managed software package) for your system from the source package and install the resulting package, but the Python distutils support for this is spotty at present.
If you downloaded the RPM, you should be able to install it with the following command:
$ rpm -ihv getmail-- .noarch.rpm
If you downloaded the MS Windows self-executing installer, just run it to install getmail.
To build and install directly from the included source, follow these steps.
$ cd getmail-
$ python setup.py build
When that completes in a few seconds, become root and then install the software. You can install in the default location, or specify an alternate location to install the software, or specify alternate directories for only part of the package.
To install in the default location, become user root and install with the following commands:
$ su
# python setup.py install
This will, by default, install files into subdirectories under the directory /usr/local/ or /usr/, but other values are sometimes used):
, which is the directory that your Python installation was configured to install under (typicallyYou can see a list of the default installation locations by running:
# python setup.py install --show-default-install-dirs
You can specify an alternate --prefix option to the install command, like this:
directory by supplying the
# python setup.py install --prefix=
This will install the various parts of the package in subdirectories like in the default installation (see the section Installing in the default location above), but under your specified prefix directory. These alternate installations allow you to install the software without root privileges (say, by installing under $HOME/). Note, however, that the getmailcore package will not be in the default Python module search path if you do this; see the section Installing the getmailcore package in a non-standard location if you use this option.
If you only want to change the directory for some of the components, use the following options:
For example, if your Python installation is located under /usr/ because it was installed as part of your OS, but you would like the getmail scripts installed into /usr/local/bin/ instead of /usr/bin/, while still letting the getmailcore package be installed under /usr/lib/python-, and the documentation and man pages under /site-packages//usr/doc/ and /usr/man/ you could use this command to install:
# python setup.py --install-scripts=/usr/local/bin/
If you also wanted to locate the documentation and man pages under /usr/local/ but still install the getmailcore package in the default /usr/lib/python-, you would instead use this command to install: /site-packages/
# python setup.py --install-scripts=/usr/local/bin/ --install-data=/usr/local/
Note: if you use one of the above methods to install the getmailcore package into a directory other than the default, the three scripts (getmail, getmail_maildir, and getmail_mbox) will almost certainly be unable to locate the required files from the getmailcore package, because they will not be in a directory in the standard Python module search path. You will need to do one of the following to make those files available to the scripts:
set the environment variable PYTHONPATH to tell Python where to find the appropriate modules. See the documentation at the Python.org website for details.
Note that setting PYTHONPATH in $HOME/.profile (or equivalent) is not sufficient -- for instance, cron runs jobs in a simpler environment, ignoring $HOME/.profile, and getmail would therefore fail when run as a user cron job. It is strongly recommended that you install the Python library files in the site-packages directory which Python provides for exactly this reason.
sys.path.append('/path/to/installation-directory')containing the path to the directory you installed the getmailcore directory in, somewhere below the line which reads
import sysand before the first line which references getmailcore .
To build a binary package from the included source, run the following command from inside the unpacked getmail source.
$ cd getmail-$ python setup.py bdist --format=
The useful allowed values for
are:Ideally, if you use this method, it will result in a "built distribution" binary package in a subdirectory named dist which can then be installed using the appropriate system-specific tool. If you have problems with this process, please do not ask me for assistance; ask your OS vendor or the comp.lang.python newsgroup. The install-directory-from-source process above is the only one I can support, and it should work on all platforms.
You can discuss issues with building binary packages on the getmail users' mailing list.
A mailing list has been set up to discuss getmail. Only subscribers may post to the list.
The list is available for free getmail support from me and other users, for discussions of bugs, configuration issues, documentation, and other technical issues related to getmail.
To subscribe to the list, send a blank email to <getmail-subscribe @ discworld.dnsalias.org> and follow the instructions in the message you receive. Read and save the "welcome" message you receive when you subscribe; it contains valuable instructions about how to use the list.
To un-subscribe from the list, send a blank email from the same address you subscribed with to <getmail-unsubscribe @ discworld.dnsalias.org> and follow the instructions in the message you receive.
Once you have subscribed to the list, you may post messages to the list by sending them to <getmail @ discworld.dnsalias.org>. Complete instructions for using the list are sent to you when you subscribe.
The list allows plaintext message bodies and plaintext attachments. Do not attempt to send binary files (gzip, etc), HTML, or other types, as they will be stripped from your message.
Note: please ensure you have read the documentation and Frequently Asked Questions, and browsed/searched the mailing list archives before posting a question to the mailing list.
There are browsable archives of the list at http://marc.theaimsgroup.com/?l=getmail&r=1&w=2 and http://news.gmane.org/gmane.mail.getmail.user . The GMANE getmail users' archive is also available via NNTP if you prefer to read it with a newsreader, rather than a web browser.
If you only want to be notified of new releases of getmail, an announce-only list has been set up. The list is very low-volume; you can expect to receive only a small number of messages per month.
All announcements are sent to both lists, so there is no need to subscribe to the announcements list if you are on the discussion list.
To subscribe to the list, send a blank email to <getmail-announce-subscribe @ discworld.dnsalias.org> and follow the instructions in the message you receive. Read and save the "welcome" message you receive when you subscribe; it contains valuable instructions about how to use the list.
To un-subscribe from the list, send a blank email from the same address you subscribed with to <getmail-announce-unsubscribe @ discworld.dnsalias.org> and follow the instructions in the message you receive.
You cannot post messages directly to the announcements list. If you feel you have an announcement regarding getmail which should be distributed, send it to me and request that I send it to the announcements list.
There is an archive of the announcements list at http://news.gmane.org/gmane.mail.getmail.announce . The GMANE getmail announcements archive is also available via NNTP if you prefer to read it with a newsreader, rather than a web browser.