popping mail

gshang at uq.net.au gshang at uq.net.au
Sun Feb 3 02:57:46 EST 2002


Hi:

IMHO, the easiest way to do what you want is to use fetchmail to pop your 
mail down for you.  It is very easy to configure, however you also need a 
working SMTP server which will accept messages from localhost for your 
account, which may be a more fiddly operation.

Here is a sample .fetchmailrc file, with the password removed.

set daemon 300

poll fox.uq.net.au with protocol pop3:
	username zzshangg
	password "notshown"
	fetchall, nokeep

This is pretty easy to understand.  The set daemon 300 tells fetchmail to
run in daemon mode and check for mail every 300 seconds (5 minutes).  In
the above example, the word "with" is included for clarity.  When testing
this, I'd change the "nokeep" to "keep" until you're sure that mail isn't
being downloaded and promptly being lost in the local delivery side of
things.

Make a file in your home directory called .fetchmailrc and make it only 
readable and writeable by you.  If you don't, fetchmail will  refuse to 
use it as the password for your pop3 account will have been compromised.  
Then all you have to do is type "fetchmail" at the prompt and it will 
begin running.  If you type "fetchmail" again at any time, it will stop 
waiting for the required duration between checks and check immediately.  
"fetchmail -q" will kill off the fetchmail process.  If you ever want to 
see what fetchmail is doing, kill it off, then run "fetchmail -Nv".  
Warning, this can generate a lot of output if you are expecting a lot of 
mail, but it's very useful to see why mail isn't coming down.  
Occasionally, fetchmail will get into a funny state and you will need to 
restart it.  Such is life.

Checking multiple accounts is easy.  I have a second entry in my file that 
looks like this:

poll pop-server.qld.bigpond.net.au with protocol pop3:
	username gshang
	password "notshown"
	fetchall, nokeep

You can have as many of these as you want.  Fetchmail will check them all 
at the specified interval.

Hope this helps.

Geoff.





More information about the Speakup mailing list