TheOS.IN

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,

To fetch mail or to run fetchmail type command:

$ fetchmail

For more information please see offical fetchmail web site.

Exit mobile version