Full-service Internet Marketing & Web Development
Recent Posts

Sponsors
![]() |
How to: Installing FetchMailMike Peters, 04-13-2007 |
fetchmail is a full-featured IMAP and POP client which allows users to automatically download mail from remote IMAP and POP servers and save it into local mailboxes; there it can be accessed more easily.
It's useful if you want to download email from your ISP, Yahoo account or Gmail account to a local file on your server, for later easy retrieval.
We use FetchMail in conjunction with MyEmailDesk to allow users to download support emails sent to a Yahoo/Hotmail account for automatic processing.
This is a quick guide on how to download and install FetchMail -
The latest version of FetchMail as of this writing is available here:
http://download.berlios.de/fetchmail...-6.3.7.tar.bz2
Step one is unpacking the source files:
Now we need to make and install Fetchmail:
All set - if everything went well you will now have an executable named fetchmail in the current directory.
You can run fetchmail by passing the username,password directly to the shell command, however the recommend way is to use a config file per every user who is going to use fetchmail.
Fetchmail essentially polls your ISP's POP3 server to see if there is anything worth downloading. You can run fetchmail as a daemon and have it regularly poll for incoming mail.
The simplest solution is to set up cron entries to check for mail at regular points. Sample crontab entries are:
It's useful if you want to download email from your ISP, Yahoo account or Gmail account to a local file on your server, for later easy retrieval.
We use FetchMail in conjunction with MyEmailDesk to allow users to download support emails sent to a Yahoo/Hotmail account for automatic processing.
This is a quick guide on how to download and install FetchMail -
The latest version of FetchMail as of this writing is available here:
http://download.berlios.de/fetchmail...-6.3.7.tar.bz2
Step one is unpacking the source files:
tar -xvjf fetchmail-6.3.7.tar.bz2
Now we need to make and install Fetchmail:
cd fetchmailmail-6.3.7
./configure
make install
./configure
make install
All set - if everything went well you will now have an executable named fetchmail in the current directory.
You can run fetchmail by passing the username,password directly to the shell command, however the recommend way is to use a config file per every user who is going to use fetchmail.
#
# Sample .fetcmailrc file
#
poll pop.nat.orac.net.au
with protocol pop3
username doug password PPPPPPPP is douglas
username alison password XXXXXXXX is alison
;
# Sample .fetcmailrc file
#
poll pop.nat.orac.net.au
with protocol pop3
username doug password PPPPPPPP is douglas
username alison password XXXXXXXX is alison
;
Fetchmail essentially polls your ISP's POP3 server to see if there is anything worth downloading. You can run fetchmail as a daemon and have it regularly poll for incoming mail.
The simplest solution is to set up cron entries to check for mail at regular points. Sample crontab entries are:
0 8,10,12,14,18 * * 1-5 /usr/local/bin/fetchmail -s
0 0,5,17 * * * /usr/local/bin/fetchmail -s
0 0,5,17 * * * /usr/local/bin/fetchmail -s
![]() |
Mike Peters, 11-20-2008 |
Sample fetchmail.rc config file that tells fetchmail to download all email using IMAP protocol and store it locally:
defaults
keep
poll MAILSERVER
with protocol imap
username USERNAME password PASSWORD is LOCALUSERNAME
;
To invoke fetchmail, you would put it on a cronjob with this command:
/usr/local/bin/fetchmail -f DIR/fetchmail.rc
defaults
keep
poll MAILSERVER
with protocol imap
username USERNAME password PASSWORD is LOCALUSERNAME
;
To invoke fetchmail, you would put it on a cronjob with this command:
/usr/local/bin/fetchmail -f DIR/fetchmail.rc
|
|
Subscribe Now to receive new posts via Email as soon as they come out.
Comments
Post your comments

