Gnus development mailing list
 help / color / mirror / Atom feed
* using pop with Gnus, XEmacs and procmail
@ 1997-05-07 19:52 Eric Hendrickson
  1997-05-08 13:44 ` Mark Moll
  0 siblings, 1 reply; 3+ messages in thread
From: Eric Hendrickson @ 1997-05-07 19:52 UTC (permalink / raw)


My home machine gets mail via POP.  I would like to direct most of my
non-work-related mail there for reading with Gnus, however I have some
questions.  I looked at the ding archives for something about this,
but it seems to be out of order.  :(

Is it possible to get new mail via POP, run it through procmail (for
quick things like trashing junk mail and archiving mailing lists) and
then have Gnus do its own mail processing?  This is basically what I
do now with procmail in my .forward file and all output going into
~/.MailBox for Gnus to find.

Would I want to set nnmail-movemail-program to some function to do
this?  How would I do that?  What is the difference between pop3.el
and movemail?

I am thinking that an nnmail-movemail-program function that calls
movemail to get the mail via POP, pipes that to procmail and ``sicks''
Gnus on the output of that (e.g. in ~/.MailBox) would be cool, but
maybe there is a better way?

Any suggestions would be much appreciated.  I have some knowledge of
lisp but this is beyond me.

Thanks, Eric
-- 
Eric Hendrickson                        E-Mail:  edh@staff.juno.com
D.E. Shaw & Co., L.P.                   Phone:   +1 617 621 4248
Juno Online Services                    FAX:     +1 617 621 4300
Cambridge, MA  02139                    Pager:   +1 888 208 1398


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: using pop with Gnus, XEmacs and procmail
  1997-05-07 19:52 using pop with Gnus, XEmacs and procmail Eric Hendrickson
@ 1997-05-08 13:44 ` Mark Moll
  1997-05-08 13:54   ` Mark Moll
  0 siblings, 1 reply; 3+ messages in thread
From: Mark Moll @ 1997-05-08 13:44 UTC (permalink / raw)


>>> On 07 May 1997 15:52:58 -0400, Eric Hendrickson (EH) wrote:
EH> Is it possible to get new mail via POP, run it through procmail (for
EH> quick things like trashing junk mail and archiving mailing lists) and
EH> then have Gnus do its own mail processing?  This is basically what I
EH> do now with procmail in my .forward file and all output going into
EH> ~/.MailBox for Gnus to find.

First, let Gnus know that you're using procmail:

(setq nnmail-use-procmail t
      nnmail-procmail-directory "~/Mail/spool/"
      nnmail-procmail-suffix ""
      nnmail-spool-file 'procmail)


Second, let gnus pop your mail every 5 minutes and invoke procmail:

(defun mm-pop-mail () (interactive) (call-process "/usr0/mmoll/bin/procinc"))
(gnus-demon-add-handler 'mm-pop-mail 5 t)
(gnus-demon-init)

Finally create the following script (called `procinc' in the previous
step):

#!/bin/sh
MOVEMAIL=/usr/local/lib/xemacs-19.14/lib-src/movemail
ORGMAIL=$HOME/.newmail
$MOVEMAIL kpop://ux2.sp.cs.cmu.edu/mmoll $ORGMAIL
# this is copied from the procmail (1) man page:
if cd $HOME &&
 test -s $ORGMAIL &&
 $HOME/bin/lockfile -r0 -l3600 $HOME/.newmail.lock 2>/dev/null
then
 trap "rm -f $HOME/.newmail.lock" 1 2 3 15
 umask 077
 $HOME/bin/formail -s $HOME/bin/procmail < $ORGMAIL &&
 rm -f $HOME/.newmail.lock
fi
rm -f $ORGMAIL
exit 0

-- 
Mark Moll    


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: using pop with Gnus, XEmacs and procmail
  1997-05-08 13:44 ` Mark Moll
@ 1997-05-08 13:54   ` Mark Moll
  0 siblings, 0 replies; 3+ messages in thread
From: Mark Moll @ 1997-05-08 13:54 UTC (permalink / raw)


>>> On 08 May 1997 09:44:02 -0400, Mark Moll (MM) wrote:
MM> Second, let gnus pop your mail every 5 minutes and invoke procmail:

MM> (defun mm-pop-mail () (interactive) (call-process "/usr0/mmoll/bin/procinc"))
MM> (gnus-demon-add-handler 'mm-pop-mail 5 t)
MM> (gnus-demon-init)

Instead of using a demon you can, of course, also pop your mail manually by
pressing `g' in the *Group* buffer if you add the following line to your
..gnus:

(add-hook 'gnus-get-new-news-hook 'mm-pop-mail)

-- 
Mark Moll    


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~1997-05-08 13:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-05-07 19:52 using pop with Gnus, XEmacs and procmail Eric Hendrickson
1997-05-08 13:44 ` Mark Moll
1997-05-08 13:54   ` Mark Moll

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).