fetchmail is a full-featured
IMAP and POP client. It
allows users to automatically download mail from remote
IMAP and POP servers and
save it into local mailboxes where it can be accessed more
easily. fetchmail can be installed
using the mail/fetchmail
port, and offers various features, including:
Support for the POP3, APOP, KPOP, IMAP, ETRN and ODMR protocols.
Ability to forward mail using SMTP, which allows filtering, forwarding, and aliasing to function normally.
May be run in daemon mode to check periodically for new messages.
Can retrieve multiple mailboxes and forward them, based on configuration, to different local users.
This section explains some of the basic features of
fetchmail. This utility requires a
.fetchmailrc
configuration in the user's
home directory in order to run correctly. This file includes
server information as well as login credentials. Due to the
sensitive nature of the contents of this file, it is advisable
to make it readable only by the user, with the following
command:
%
chmod 600 .fetchmailrc
The following .fetchmailrc
serves as an
example for downloading a single user mailbox using
POP. It tells
fetchmail to connect to example.com
using a username of
joesoap
and a password of
XXX
. This example assumes that the user
joesoap
exists on the local system.
The next example connects to multiple POP and IMAP servers and redirects to different local usernames where applicable:
fetchmail can be run in daemon
mode by running it with -d
, followed by the
interval (in seconds) that fetchmail
should poll servers listed in .fetchmailrc
.
The following example configures
fetchmail to poll every 600
seconds:
%
fetchmail -d 600
More information on fetchmail can be found at http://fetchmail.berlios.de/.
All FreeBSD documents are available for download at http://ftp.FreeBSD.org/pub/FreeBSD/doc/
Questions that are not answered by the
documentation may be
sent to <freebsd-questions@FreeBSD.org>.
Send questions about this document to <freebsd-doc@FreeBSD.org>.