On a Debian system, the upstream fetchmail distribution is divided into 2 packages:
fetchmail, which includes the command "fetchmail" (this works without X Window System)
fetchmailconf, a Graphical User Interface (GUI) tool to configure fetchmail
The configuration file for fetchmail is ".fetchmailrc" in your home directory. You must be careful when you edit it, because you write your password for the remote server in that file. If someone else can read the file, you are in a deep trouble. So make sure no one else can read it.
First make an empty file named ".fetchmailrc" in your home directory. The easiest way for it is to use the command "touch".
$ cd ~/ $ touch .fetchmailrc |
Then change the permission of that file to 600 (that is, readable and writable only by the owner of the file).
$ chmod 600 .fetchmailrc |
Now add these lines to the empty file.
poll SERVER with proto PROTOCOL user REMOTE_USER there with password REMOTE_PASSWORD is LOCAL_USER here |
SERVER is the name of server you use to receive e-mails.
PROTOCOL is the type of SERVER (for example, IMAP or POP3). If you don't know, use AUTO. POP3 is depreciated.
REMOTE_USER is the user name of the account you have on the SERVER.
REMOTE_PASSWORD is the password for REMOTE_USER.
LOCAL_USER is the user name of the account you have on your machine. Don't use "root".
You will have something like this:
poll pop.members.interq.or.jp with proto POP3 user me358881 there with password aaaaaaaa is oohara here |
You can specify 2 more more servers. Foe example:
poll pop.members.interq.or.jp with proto POP3 user me358881 there with password aaaaaaaa is oohara here poll pop.geocities.co.jp with proto POP3 user o_o_hara_yuuma there with password aaaaaaaa is oohara here |
It's the time to run fetchmail.
$ fetchmail |
$ fetchmail -v |