getmail is intended as a simple, secure, and reliable replacement for fetchmail. It retrieves email (either all messages, or only unread messages) from one or more POP3, SPDS, or IMAP4 servers (with or without SSL) for one or more email accounts, and reliably delivers into qmail-style Maildirs, mboxrd files, or through external MDAs (command deliveries) specified on a per-account basis. getmail also has excellent support for domain (multidrop) mailboxes, including delivering messages to different users or destinations based on the envelope recipient address.
| Tags | Communications Email Email Clients (MUA) Mail Transport Agents Networking Utilities Filters Post-Office IMAP POP3 Software Development Libraries Python Modules |
|---|---|
| Licenses | GPL |
| Operating Systems | OS Independent POSIX BeOS Mac OS X Mac OS X Windows MS-DOS Windows OS/2 |
| Implementation | Python |
Recent releases


Changes: This release adds Kerberos authentication support for IMAP servers, eliminates a deprecation warning from Python 2.6, and clarifies some documentation.


Changes: This release adds missing fsync() in the updatefile close method to ensure that data actually hits the disk before the rename takes place. This makes writing of the oldmail file more resilient to system crashes.


Changes: Improved information is sent to the log file about messages not retrieved.


Changes: For IMAP retrievers, message state is kept around for 30 days even if the corresponding message isn't seen. This allows users to have multiple rc files with different IMAP folders to retrieve from without losing their "seen" mail state for the folders they're not currently retrieving from. You no longer need to work around this with different getmail state directories.


Changes: This release fixes the use of the Python 2.4 set builtin in 4.8.0, preventing getmail from running on Python 2.3.x. It fixes the RPM spec file not being included in the getmail distribution.
- All comments
Recent commentsThanks!
I have been using fetchmail on IMAP/SSL for 6 years, and noticed that messages occasionnaly disappeared. It did not bother me that much until tonight when it dropped an important email. After googling for a few minutes I found out fetchmail simply discards emails with headers not compliant with RFC 822. getmail does not. getmail is great. Setup takes 2 minutes. Thanks for getmail!
good work
Here's yet another reason to use getmail: for some silly reason fetchmail will not allow you to concurrently retrieve mail from different servers even though by default it just opens a socket connection to port 25 for delivery. Exactly what is being guarded against?
And aside from all the fetchmail bashing: nice work.
getmail as a daemon for maildrop
Note: fetchmail is crap
I needed to set up an internal IMAP server for multiple users so I wrote the following script to be run as root (I set it up to run from init.d, where it imported the interval and redirected output to a log file, but this isn't necessary).
In case someone finds it useful
#! /bin/bash
while :
do
for i in `ls /home/`;do
if [ -e /home/$i/.getmail ]; then
su $i -c getmail
fi
done
sleep $1
done
Call it as root, passing a parameter specifying the number of seconds between checking email.
Then just set up a getmailrc file for any user that wants to use it.
Thanks!
I used to use fetchmail but had problems with both large messages and "incorrect" headers. And when fetchmail has a problem with one message it doesn't seem to get any other mail either.
It's possible that the large mesage problem was a configuration issue (although I read the docs and believe I configured correctly), but I understand that fetchmail is "famous" for not working if there are inconsistencies in the header.
With getmail I no longer have problems - it works with large messages (dbase backups) and, apparently, broken headers (one mailing list was unusable 'til I installed getmail). I no longer have to fire up some other POP client to clear out my mailbox every other week.
My mail config is documented (http://www.acooke.org/andrew/writing/email.html) in case it's any use to anyone.
Re: Why bother
Multidrop retrieval with fetchmail? I have tried it with Postfix on Red Hat 7.2 but fetchmail seems to have bugs. The best I can manage is either 1) deliver all mail to postmaster or 2) deliver ALL mail to BOTH my local users. Argh. If it is bugs well maybe they can be fixed but I am exhausted and out of patience with it. Getmail looks much better to me so far...