On Thu, Jul 07, 2005 at 01:31:27PM -0500, [EMAIL PROTECTED] wrote: > I've found quite a lot of info about fetchmail and procmail on google > but didn't really find something describing how to make them work with > winxp native mail tools. (My reader is not native winxp but Emacs news > reader Gnus). > > I'm well acquainted with setting both up under a sendmail system but > really pretty lost about how winxp handles mail when not using thunder > bird or outlook or other win tools. > > My aim is to retrieve from a pop3 server using fetchmail and deliver > using procmail to wherever it needs to go for gnus to slurp the mail. > > I'm running winxp home with a recent `full' cygwin install.
It appears some hand-holding is in order. Below are some instructions that should help you understand things better and give you a working setup on which to build. Once everything is in place, please do go back and read then re-read the relevant documentation as has already been suggested. There is also an excellent procmail mailing list to which you can subscribe or access through gmane. Also, try comp.mail.misc. For everything else, Google is your friend. POP3 Server -> fetchmail -> procmail -> mbox -> email client Assuming the following values: - your name: reader - your pop3 account name: [EMAIL PROTECTED] - your pop3 server address: pop.newsguy.com - your pop3 account password: secret - you want all Cygwin list mail delivered to ~/mail/cygwin - you want all mail addressed to you delivered to ~/mail/personal 1. Create the following two files (below), editing each as appropriate, and ensuring the correct permissions are set on your 'procmailrc'. 2. With the files in place, you can now retrieve your email by invoking fetchmail with one of the following: $ fetchmail -v # verbose output $ fetchmail -vk # verbose output, leave copies on server $ fetchmail -d 900 # daemon mode, poll every 900 seconds The second option is useful when testing. The fetchmail program will authenticate with your server and begin retrieving messages, handing them off one at a time to procmail for processing/delivery. 3. You can read your email at any time during the process using your favorite client, reviewing the contents of the logs and running 'mailstat' as needed. Note that the 'mbox' is simply a text file in a generic format to which new messages are appended. You can do whatever you want with it as you would with any text file. 4. Windows virus scanners, if set to scan incoming/outgoing mail, will work just fine using this setup. Alternatively, you can use procmail to pipe messages to clamav for virus/attachment checking. 5. Your fetchmail configuration will generally be straightforward, but your procmail configuration can be as simple or as complex as you need. For example, I process all messages with scripts to remove unsubscribe/advertising footers from mailing lists and perform other general cleanup, in addition to the more typical deliver, forward, add/rewrite headers, etc. actions procmail is used for. 6. And before you ask, yes you can use standard tools found in the Cygwin distribution to send mail as well. The following line if placed in the configuration file for your email client should suffice: set sendmail="/usr/sbin/ssmtp [EMAIL PROTECTED] -apsecret" See 'man ssmtp' for more information on that subject. # ====================================================================== # ~/.fetchmailrc # ====================================================================== set logfile "/var/log/fetchmail.log" set invisible set no bouncemail # retrieve all messages from your pop server poll "pop.newsguy.com" protocol POP3 username "[EMAIL PROTECTED]" \ password "secret" fetchall # set procmail as your mail delivery agent mda "/usr/bin/procmail -f %F -d %T" #======================================================================= # ~/.procmail/procmailrc #======================================================================= SHELL=/bin/sh VERBOSE=off DEFAULT=/var/spool/mail MAILDIR=$HOME/mail PMDIR=$HOME/.procmail LOGFILE=$PMDIR/log # Recipe 1 - move any Cygwin messages into an mbox named 'cygwin-users' # located in '~/mail/' :0: * [EMAIL PROTECTED] cygwin-users # Recipe 2 - move any messages addressed to you into an mbox named # 'personal' located in '~/mail/' :0: * [EMAIL PROTECTED] personal -- George -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/