Howto: Configure Fetchmail Linux or UNIX client program to fetch emails

Fetchmail is a utility or command for Unix-like (Linux) systems used to retrieve e-mail from a remote POP3, IMAP, ETRN or ODMR mail server to the user’s local system.

From fetchmail site, “Fetchmail is a one-stop solution to the remote mail retrieval problem for Unix machines, quite useful to anyone with an intermittent or dynamic-IP connection to a remote mailserver, SLIP or PPP dialup, or leased line when SMTP isn’t desired. Fetchmail can collect mail using any variant of POP or IMAP and forwards to a the local SMTP (via TCP socket) or LMTP (via TCP or Unix socket) listener or into an MDA program, enabling all the normal forwarding/filtering/aliasing mechanisms that would apply to local mail or mail arriving via a full-time TCP/IP connection.”

How do I install fetchmail?

If you are using Debian Linux, type the command:

# apt-get install fetchmail

If you are using Fedora core/Cent OS Linux, type the command:

# yum install fetchmail

If you are using Ubuntu Linux, type the command:

# sudo apt-get install fetchmail

Configuration file name

The user configuration file is stored in your home directory i.e. /home/you/.fetchmailrc

How do I configure fetchmail to retrieve mail from ISP mail server?

Open .fetchmailrc file:

$ cd; touch .fetchmailrc
$ chmod 600 .fetchmailrc
$ vi .fetchmailrc

Append following text:

poll pop3.net4india.com with proto POP3
user d12356 there with password “password” is “vivek” here

Where,

  • pop3.net4india.com – My POP3 server
  • proto POP3 – You are using POP3 protocol
  • d12356 – POP3 username
  • “password” – POP3 password
  • “vivek” – Local mailbox name

To fetch mail or to run fetchmail type command:

$ fetchmail

For more information please see offical fetchmail web site.

Author: admin

I like chocolate, gadgets, open source software, photography, traveling and all shades of green colors. I love spending time with fun loving friends and family members. This is my own online journal.

One thought on “Howto: Configure Fetchmail Linux or UNIX client program to fetch emails”

  1. Hi,
    I haveing the qmail server on out of location. How I setup the one local sendmail server which downloads the all user’s mail box form this out qmail server & distrubuted that mails to all local users.
    Mens for receiving the mails no all users are required for to connect to that outside qmail server.

Leave a Reply

Your email address will not be published. Required fields are marked *