linux poison RSS
linux poison Email

Fetchmail Configuration

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 .fetchmailrc file

poll SERVER with proto PROTOCOL
user REMOTE_USER there with password REMOTE_PASSWORD is LOCAL_USER here

You must replace all the capital-letter words with the real values.

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.
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”.

Example: You can have multiple account configuration

poll with proto POP3
user nikesh there with password password is otheruser here

poll pop.otherdomain with proto POP3
user user1 there with password pass is user2 here

It’s the time to run fetchmail.
$ fetchmail

You can use “-v” option to see what is going on.
$ fetchmail -v

For an automatic pick-up of your mail, you could write your own script that calls fetchmail every hour and delivers the mail. But in stead of using the cron-daemon you can start fetchmail also in daemon mode. This is very easily done by this command : fetchmail –daemon 3600

Interval (3600) is a numeric argument that specifies the polling interval in seconds.


Tech Talks said...

You would want to run this from launchd probably using the -d flag, but you could get launchd to keep starting one-shot fetchmails at regular intervals.

Post a Comment

Related Posts with Thumbnails