Skip to content

Configuring Pine with Fetchmail and Procmail on Cygwin

The previous post is fine if you just want to use pine with imap, but my real goal here is to use a new app I’ve been working on and to do that I’ll need fetchmail to retrieve my mail for me, instead of a built in pine imap or pop3 retriever. Fetchmail requires an MDA, and defaults to procmail. All are available with cygwin, and configuring them all to work together wasn’t that bad, but it’s enough tinkering to warrant writing down.

First things first. I prefer to set up mounts for my cygwin environment, and that pays off with this setup. I created a small bat file for this:

C:\cygwin\bin\umount -s --remove-all-mounts
C:\cygwin\bin\mount -s -b -f C:\cygwin\bin /bin
C:\cygwin\bin\mount -s -b -f C:\cygwin\etc /etc
C:\cygwin\bin\mount -s -b -f C:\cygwin\lib /lib
C:\cygwin\bin\mount -s -b -f C:\cygwin\usr /usr
C:\cygwin\bin\mount -s -b -f C:\cygwin\var /var
C:\cygwin\bin\mount -s -b -f C:\ /
C:\cygwin\bin\mount -s -b -f C:\cygwin\bin /usr/bin
C:\cygwin\bin\mount -s -b -f C:\cygwin\lib /usr/lib
C:\cygwin\bin\mount -s -b -f C:\home /home
C:\cygwin\bin\mount -c -s /cygdrive
C:\cygwin\bin\mount -c -u /cygdrive

So now, in a cygwin shell, the environment feels more like *NIX and less like cygwin/windows.

I started with fetchmail. First off, type

which fetchmail

, and make sure you’ve got it installed. To use fetchmail, you need to create a .fetchmailrc file. This is the bare bones one I created:

set postmaster "Jeff"
set no spambounce
set properties ""
poll mail.ehemminger.org with proto pop3
user jeff@ehemminger.org there with password mypassword

There are a lot of options available here but this is enough for me to run right now. You can type fetchmail at this point and it will retrieve your mail.

But in my case, I received an error because procmail couldn’t find and couldn’t write to /var/spool/mail/Jeff. I created /var/spool/mail and then the fetchmail/procmail combo worked. If you do not use the mounts I described above, procmail will need to be configured and I don’t know how to do that.

For pine, you modify the config slightly from the last post.
I made the inbox-path: /var/spool/mail/Jeff
and removed the default-fcc

That did the trick!

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

One Trackback/Pingback

  1. REVERT TO CONSOLE * coupling afferently since 2006 on Tuesday, January 15, 2008 at 9:30 am

    [...] I’ve got Hotmail and Gmail configured through FreePops and Yahoo configured through YPops; all in fetchmail. They all go to the same “Inbox” via procmail and then I can read them with Pine. For more information on configuring Pine with procmail and fetchmail, see Jeff’s post here. [...]

Post a Comment

Your email is never published nor shared. Required fields are marked *
*
*