Date: Wed, 09 Jun 1999 10:17:19 -0600 From: Matt Meola <mmeola@uswest.com> To: "Justin T. Gibbs" <gibbs@plutotech.com> Cc: FreeBSD-questions@FreeBSD.ORG Subject: Re: MH + POP + Filtering Message-ID: <199906091617.KAA01582@ima2wk6.uswc.uswest.com> In-Reply-To: <199906031753.LAA65306@pluto.plutotech.com> References: <199906031753.LAA65306@pluto.plutotech.com>
next in thread | previous in thread | raw e-mail | index | archive | help
This is a multipart MIME message. --==_Exmh_21319483940 Content-Type: text/plain; charset=us-ascii > I'm trying to setup a system that automatic pops my mail and filters > it into mh style folders. It looks like exmh can do this, but I don't > always have access to an X display and like the flexibility of using > the command line mh utilities. Anyone have a setup like this? Yep, sure do... Firstly, exmh, although a nice piece of software, doesn't actually do the filtering -- it uses the 'slocal' program which is part of MH. Nothing wrong with that, but some users seem to want their mail client to do the filtering. Personally, I've used both slocal and procmail, with procmail being my current setup (its rules can be more complex). Procmail can store into an MH folder directly; that is, without _having_ to use rcvstore. However, I use rcvstore so that I can update the unseen sequence. Both procmail and slocal need to be called from a POP3 client; in my case, fetchmail. If you've got sendmail/exim/qmail/postfix/etc... configured to receive your mail straight from your MX forwarder, then you need the '.forward'-file mechanism described in the O'Reilly MH book. Anyway, here's an example setup: my .fetchmailrc, .procmailrc and .maildelivery (for slocal) files. .maildelivery is alot cleaner, but like I said, procmail is more flexible. -- Matt Meola KC0DXW --==_Exmh_21319483940 Content-Type: text/plain ; name=".fetchmailrc"; charset=us-ascii Content-Description: .fetchmailrc Content-Disposition: attachment; filename=".fetchmailrc" #poll pop.netaddress.com # proto pop3 # user matt.meola with password ***** is matt here # mda "/usr/local/libexec/nmh/slocal" poll some-host-inside-uswest proto pop3 user mmeola with password ***** mda "procmail -m /u/mmeola/.procmailrc" # Local Variables: # mode: ksh # tab-width: 12 # font-lock-keywords: (t ("\\(\\[.*\\]\\)" (1 font-lock-string-face t)) ("\\(\\<poll\\>\\|\\<proto\\>\\|\\<username\\>\\|\\<user\\>\\|\\<password\\>\\|\\<pass\\>\\|\\<mda\\>\\)" (1 font-lock-keyword-face))) # eval: (font-lock-fontify-buffer) # End: --==_Exmh_21319483940 Content-Type: text/plain ; name=".procmailrc"; charset=us-ascii Content-Description: .procmailrc Content-Disposition: attachment; filename=".procmailrc" # -*- mode: ksh -*- MAILDIR=/opt/devtools/mmeola/Mail.MH # You'd better make sure it exists DEFAULT=$MAILDIR/mbox LOGFILE=$MAILDIR/.log VERBOSE=off PATH=$PATH:/opt/devtools/lib # Ham Radio lists... :0 w * Sender:.*owner-ham-tech@ | rcvstore -create -unseen "+AmateurRadio/Ham-Tech" :0 w * Sender:.*owner-qrp-l@ | rcvstore -create -unseen "+AmateurRadio/QRP" :0 w * Sender:.*owner-antennas@ | rcvstore -create -unseen "+AmateurRadio/Antennas" :0 w * Sender:.*owner-ham-linux@ | rcvstore -create -unseen "+AmateurRadio/Ham-Linux" :0 w * Sender:.*owner-forsale-swap@ | rcvstore -create -unseen "+AmateurRadio/ForSale-Swap" :0 w * Sender:.*owner-homebrew@ | rcvstore -create -unseen "+AmateurRadio/Homebrew" :0 w * Sender:.*atv.tallahassee.net | rcvstore -create -unseen "+AmateurRadio/ATV" # Other mailing lists... :0 w * ^TO.*pygtk@daa.com.au | rcvstore -create -unseen "+PyGTK" :0 w * Sender:.*owner-co-ff@ | rcvstore -create -unseen "+CO-FF" :0 w * Sender:.*FLYFISH@ | rcvstore -create -unseen "+Flyfish" :0 w * Sender:.*wmaker-owner@ | rcvstore -create -unseen "+WindowMaker" :0 w * Sender:.*SSUG-L@ | rcvstore -create -unseen "+Shopsmith" :0 w * Sender:.*jeep-l@ | rcvstore -create -unseen "+Jeep" # Linux :0 w * Sender:.*linux-admin | rcvstore -create -unseen "+Linux/Admin" :0 w * Sender:.*linux-announce | rcvstore -create -unseen "+Linux/Announce" :0 w * Sender:.*linux-config | rcvstore -create -unseen "+Linux/Config" :0 w * Sender:.*linux-hams | rcvstore -create -unseen "+Linux/Ham" :0 w * Sender:.*linux-home | rcvstore -create -unseen "+Linux/Home" :0 w * Sender:.*linux-opengl | rcvstore -create -unseen "+Linux/OpenGL" :0 w * Sender:.*linux-ppp | rcvstore -create -unseen "+Linux/PPP" :0 w * Sender:.*linux-sound | rcvstore -create -unseen "+Linux/Sound" :0 w * Sender:.*linux-x11 | rcvstore -create -unseen "+Linux/X11" :0 w * Sender:.*redhat-announce-list | rcvstore -create -unseen "+Linux/RedHat/Announce" :0 w * Sender:.*redhat-devel-list | rcvstore -create -unseen "+Linux/RedHat/Devel" :0 w * Sender:.*redhat-install-list | rcvstore -create -unseen "+Linux/RedHat/Install" # FreeBSD :0 w * ^Sender:.*owner-freebsd-advocacy@freebsd.org | rcvstore -create -unseen "+FreeBSD/Advocacy" :0 w * ^Sender:.*owner-freebsd-alpha@freebsd.org | rcvstore -create -unseen "+FreeBSD/Alpha" :0 w * ^Sender:.*owner-freebsd-announce@freebsd.org | rcvstore -create -unseen "+FreeBSD/Announce" :0 w * ^Sender:.*owner-freebsd-chat@freebsd.org | rcvstore -create -unseen "+FreeBSD/Chat" :0 w * ^Sender:.*owner-freebsd-current@freebsd.org | rcvstore -create -unseen "+FreeBSD/Current" :0 w * ^Sender:.*owner-freebsd-doc@freebsd.org | rcvstore -create -unseen "+FreeBSD/Doc" :0 w * ^Sender:.*owner-freebsd-hardware@freebsd.org | rcvstore -create -unseen "+FreeBSD/Hardware" :0 w * ^Sender:.*owner-freebsd-questions@freebsd.org | rcvstore -create -unseen "+FreeBSD/Questions" :0 w * ^Sender:.*owner-freebsd-platforms@freebsd.org | rcvstore -create -unseen "+FreeBSD/Platforms" :0 w * ^Subject:.*ports/[0-9][0-9]* | rcvstore -create -nounseen "+FreeBSD/Ports/PRs" :0 w * ^Sender:.*owner-freebsd-ports@freebsd.org | rcvstore -create -unseen "+FreeBSD/Ports" :0 w * ^Sender:.*owner-freebsd-stable@freebsd.org | rcvstore -create -unseen "+FreeBSD/Stable" :0 w * ^TOfreebsd | rcvstore -create -unseen "+FreeBSD" # NetBSD :0 w * Sender:.*port-alpha-owner@ | rcvstore -create -unseen "+NetBSD/Alpha" :0 w * Sender:.*netbsd-announce-owner@ | rcvstore -create -unseen "+NetBSD/Announce" :0 w * Sender:.*port-i386-owner@ | rcvstore -create -unseen "+NetBSD/i386" :0 w * Sender:.*port-macppc-owner@ | rcvstore -create -unseen "+NetBSD/PPC" :0 w * Sender:.*netbsd-users-owner@ | rcvstore -create -unseen "+NetBSD/Users" :0 w * Sender:.*netbsd.org | rcvstore -create -unseen "+NetBSD" # KDE :0 w * Resent:.*from kde-announce | rcvstore -create -unseen "+KDE/Announce" :0 w * Resent:.*from kde-devel | rcvstore -create -unseen "+KDE/Devel" :0 w * Resent:.*from kde-user | rcvstore -create -unseen "+KDE/User" :0 w * Resent:.*from kde | rcvstore -create -unseen "+KDE" # USWest :0 w * From:.*ddts@ | rcvstore -create "+USWest/DDTS" :0 w * ^From:.*(ccromar|gsisam|pswelch|snewbol)@uswest.com | rcvstore -create -unseen "+USWest/Production" :0 w * ^Subject:.*new.*GUI | rcvstore -create -nounseen "+USWest/Admin" :0 w * From:.*(dsnyman|rjswens|starsms|sastott|cmaberr|cmrvosh)@uswest.com | rcvstore -create -unseen "+USWest/Admin" :0 w * From:.*AIC_TECHWEST.* | rcvstore -create -unseen "+USWest/Admin" :0 w * From:.*CAROL_MRVOSH@HP | rcvstore -create -unseen "+USWest/Admin" :0 wHB * From:.*uswest.com * application/msword | rcvstore -create -unseen "+USWest/Word_Docs" :0 w * From:.*uswest.com * > 40000 | rcvstore -create -unseen "+USWest/Big" :0 w * From:.*uswest.com | rcvstore -create -unseen "+USWest" # My Pimps :0 w * From:.*modisit.com | rcvstore -create -unseen "+INBOX/Modis" # Other :0 w * From:.*(idrahaje|registrar|campreg|radams)@(bwn.net|bewellnet.com) | rcvstore -create -unseen "+INBOX/Idrahaje" :0 w * From:.*klkirsch@juno.com | rcvstore -create -unseen "+INBOX/Idrahaje" # Tracy's Family :0 w * From:.*soozann@juno.com | rcvstore -create -unseen "+INBOX/Mitchell" :0 w * From:.*daylilee@juno.com | rcvstore -create -unseen "+INBOX/Mitchell" :0 w * From:.*mitchellphx@uswest.net | rcvstore -create -unseen "+INBOX/Mitchell" # CHBC :0 w * From:.*scott.zorno@lmco.com | rcvstore -create -nounseen "+INBOX/Zorno" :0 w * From:.*MIKRWILL@aol.com | rcvstore -create -unseen "+INBOX/CHBC" :0 w * From:.*RMIKEHUBER@aol.com | rcvstore -create -unseen "+INBOX/CHBC" :0 w * From:.*RRBMHADAMS@aol.com | rcvstore -create -unseen "+INBOX/CHBC" :0 w * From:.*cbremser@ | rcvstore -create -unseen "+INBOX/CHBC" :0 w * From:.*chbc@bwn.net | rcvstore -create -unseen "+INBOX/CHBC" :0 w * From:.*chbc@bewellnet.com | rcvstore -create -unseen "+INBOX/CHBC" :0 w * From:.*t_meola@yahoo.com | rcvstore -create -unseen "+INBOX/Tracy" :0 w * From:.*tmeola@usa.net | rcvstore -create -unseen "+INBOX/Tracy" #from file@delivery.org pipe ? "/u/mmeola/python/handle_mail.py" # Other SPAM :0 w * ^TOmmeola * ^From:.*catherinajones@yahoo.com | rcvstore -create "+Spam" # Default :0 w * ^TOmmeola | rcvstore -create -unseen "+INBOX" # SPAM :0 w * .* | rcvstore -create "+Spam" --==_Exmh_21319483940 Content-Type: text/plain ; name=".maildelivery"; charset=us-ascii Content-Description: .maildelivery Content-Disposition: attachment; filename=".maildelivery" # Ham Radio lists... sender owner-ham-tech@ folder ? "AmateurRadio/Ham-Tech" sender owner-qrp-l@ folder ? "AmateurRadio/QRP" sender owner-antennas@ folder ? "AmateurRadio/Antennas" sender owner-ham-linux@ folder ? "AmateurRadio/Ham-Linux" sender owner-forsale-swap@ folder ? "AmateurRadio/ForSale-Swap" sender owner-homebrew@ folder ? "AmateurRadio/Homebrew" # Other mailing lists... sender owner-co-ff@ folder ? "CO-FF" sender FLYFISH@ folder ? "Flyfish" sender wmaker-owner@ folder ? "WindowMaker" sender SSUG-L@ folder ? "Shopsmith" sender jeep-l@ folder ? "Jeep" # Linux sender linux-admin folder ? "Linux/Admin" sender linux-announce folder ? "Linux/Announce" sender linux-config folder ? "Linux/Config" sender linux-hams folder ? "Linux/Ham" sender linux-home folder ? "Linux/Home" sender linux-opengl folder ? "Linux/OpenGL" sender linux-ppp folder ? "Linux/PPP" sender linux-sound folder ? "Linux/Sound" sender linux-x11 folder ? "Linux/X11" sender redhat-announce-list folder ? "Linux/RedHat/Announce" sender redhat-devel-list folder ? "Linux/RedHat/Devel" sender redhat-install-list folder ? "Linux/RedHat/Install" # FreeBSD sender freebsd-alpha@ folder ? "FreeBSD/Alpha" sender freebsd-announce@ folder ? "FreeBSD/Announce" sender freebsd-chat@ folder ? "FreeBSD/Chat" sender freebsd-current@ folder ? "FreeBSD/Current" sender freebsd-doc@ folder ? "FreeBSD/Doc" sender freebsd-hardware@ folder ? "FreeBSD/Hardware" sender freebsd-questions@ folder ? "FreeBSD/Questions" sender freebsd-platforms@ folder ? "FreeBSD/Platforms" sender freebsd-ports@ folder ? "FreeBSD/Ports" sender freebsd-stable@ folder ? "FreeBSD/Stable" sender freebsd folder ? "FreeBSD" # NetBSD sender port-alpha-owner@ folder ? "NetBSD/Alpha" sender netbsd-announce-owner@ folder ? "NetBSD/Announce" sender port-i386-owner@ folder ? "NetBSD/i386" sender port-macppc-owner@ folder ? "NetBSD/PPC" sender netbsd-users-owner@ folder ? "NetBSD/Users" sender @netbsd.org folder ? "NetBSD" # KDE resent-from kde-announce folder ? "KDE/Announce" resent-from kde-devel folder ? "KDE/Devel" resent-from kde-user folder ? "KDE/User" resent-from kde folder ? "KDE" # USWest from ddts@ folder ? "USWest/DDTS" from dsnyman@uswest.com folder ? "USWest/Admin" from rjswens@ folder ? "USWest/Admin" from starsms@uswest.com folder ? "USWest/Admin" from rrockwe@uswest.com folder ? "USWest/Production" from uswest.com folder ? "USWest" from CAROL_MRVOSH@HP folder ? "USWest" from @modisit.com folder ? "INBOX/Modis" from idrahaje@bwn.net folder ? "INBOX/Idrahaje" from idrahaje@bewellnet.com folder ? "INBOX/Idrahaje" from registrar@bwn.net folder ? "INBOX/Idrahaje" from registrar@bewellnet.com folder ? "INBOX/Idrahaje" from campreg@bewellnet.com folder ? "INBOX/Idrahaje" from campreg@bwn.net folder ? "INBOX/Idrahaje" from radams@bewellnet.com folder ? "INBOX/Idrahaje" from soozann@juno.com folder ? "INBOX/Mitchell" from daylilee@juno.com folder ? "INBOX/Mitchell" from mitchellphx@uswest.net folder ? "INBOX/Mitchell" from scott.zorno@lmco.com folder ? "INBOX/CHBC" from MIKRWILL@aol.com folder ? "INBOX/CHBC" from RMIKEHUBER@aol.com folder ? "INBOX/CHBC" from RRBMHADAMS@aol.com folder ? "INBOX/CHBC" from cbremser@ folder ? "INBOX/CHBC" from chbc@bwn.net folder ? "INBOX/CHBC" from chbc@bewellnet.com folder ? "INBOX/CHBC" from t_meola@yahoo.com folder ? "INBOX/Tracy" from tmeola@usa.net folder ? "INBOX/Tracy" default - folder ? "INBOX" default - file ? "mbox" ### Local Variables: ### mode: ksh ### tab-width: 34 ### End: --==_Exmh_21319483940-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199906091617.KAA01582>