unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Help with simple function
@ 2003-01-09 16:22 Peter Davis
  2003-01-09 19:26 ` Kalle Olavi Niemitalo
  2003-01-09 19:28 ` Adrian Aichner
  0 siblings, 2 replies; 7+ messages in thread
From: Peter Davis @ 2003-01-09 16:22 UTC (permalink / raw)



I'm using gnus to read mail and news.  For various reasons (explained
below, if anyone's interested), I use my own Perl script to fetch mail
from a couple of different POP3 servers.  I have a simple function
which calls the Perl script:

(defun pd-fetch-mail ()
  (interactive)
  (message "Running popfetch.pl... ")
  (shell-command "perl c:/home/popfetch.pl")
  )

This works perfectly.  However, because the Perl script is stateless,
I keep all the POP account information, including passwords, in a
file.  I *hate* that.  What I'd like to do is:

1) Keep all the POP account info in a list, sort of like:

    (setq pop-servers '((:server mail.myhomeisp.com
                         :username "pd"
                         :password ""
                         :lmos t)
                        (:server mail.mywork.com
                         :username "pdavis"
                         :password ""
                         :lmos nil)
                        ))

2) Have emacs/XEmacs prompt for the password the first time this is
   used, and store it in there (so I don't have to keep it in my .gnus
   file)

3) Call the Perl script once for each server, passing the arguments,
   password, etc.

I'm sure this can all be done, but I'm not lisp-savvy enough to know
how to do it.  Anyone have some code that does anything like this that
I can use as a starting point?  I don't even know how to create the
pop-servers variable so it will accept this list format.

Thanks *very* much,

-pd


P.S. - If you want to know *why* I'm using my own Perl script, it's
basically for two reasons:

1) I keep track of UIDLs, so can I leave messages on the POP server,
   and not fetch them over and over again, and

2) I add X-POP-Server and X-POP-UIDL fields to the mail headers.  I
   have another lisp function which writes the UIDL to a file whose
   name is the server name.  That way, I can selectively delete
   messages from the POP server if I've left them there.


-- 
--------
                             Peter Davis
               Funny stuff at http://www.pfdstudio.com
                 The artwork formerly shown as prints
    List of resources for children's writers and illustrators at:
                  http://www.pfdstudio.com/cwrl.html

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

end of thread, other threads:[~2003-01-10 14:51 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-01-09 16:22 Help with simple function Peter Davis
2003-01-09 19:26 ` Kalle Olavi Niemitalo
2003-01-09 20:24   ` Peter Davis
2003-01-09 22:44     ` Kalle Olavi Niemitalo
2003-01-10 14:51       ` Peter Davis
2003-01-09 19:28 ` Adrian Aichner
2003-01-09 21:07   ` Peter Davis

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 read-only IMAP folder(s) and NNTP newsgroup(s).