info-gnus-english
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Reading Mail From Remote


From: Phillip Lord
Subject: Reading Mail From Remote
Date: 04 Oct 2004 10:27:30 +0100
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2.93




My mail system works like this.....



---->  procmail ------>   ~/.mail/Inbox               
                ------>   ~/.procmail/general.sp
                ------>   ~/.procmail/another.sp


(setq mail-sources
      '((file :path "/home/phillord/.cs_maildir/Inbox")
        (directory :path "/home/phillord/.procmail"
                   :suffix ".sp")))


Which all works wonderfully. 

However, recently, I have started to sync mail between my desktop and
my laptop. To do this I use the "Unison" file synchroniser. For this I
synchronize the following files...

path = Mail
path = .newsrc-wapping.eld
path = .newsrc-wapping
path = .newsrc-wapping-dribble
path = .nnmail-cache
path = records


All of which works well. The problem is this. To read mail on my
laptop I have to:

1) Kill gnus
2) sync my mail to ensure changes (file moves, read message info) gets
   percolated back to my desktop. 
3) ssh to my desktop, launch gnus there in batch, and have it read my
   mail.
4) Sync my mail again, so the new mail turns up on my laptop. 


Instead of doing all this, when I am away I would just to pull my mail
directly from my desktop account. Then I can just sync periodically
back to my desktop to ensure that all my mail is intact when I get
back. 

I figure that using something like :prescript would be the best way of
doing this. 


       (setq mail-sources
                '((file :prescript "ssh host bin/getmail >%t")))
       

          The `getmail' script would look something like the following:

          #!/bin/sh
          #  getmail - move mail from spool to stdout
          #  flu@iki.fi
          
          MOVEMAIL=/usr/lib/emacs/20.3/i386-redhat-linux/movemail
          TMP=$HOME/Mail/tmp
          rm -f $TMP; $MOVEMAIL $MAIL $TMP >/dev/null && cat $TMP

But I'm not quite sure how this works. Specified like this does (file)
get from the standard out of the script? 

Also for the directory mail-source

   `:prescript'
   `:postscript'
          Script run before/after fetching mail.

     An example directory mail source:

          (directory :path "/home/user-name/procmail-dir/"
                     :suffix ".prcml")

Does :prescript just get run. 

What I am currently thinking of doing is setting up a :prescript to
movemail to a new directory, and then sftp this back to my
laptop. Does this sound reasoanble?

Many thanks in advance. 

Cheers

Phil


reply via email to

[Prev in Thread] Current Thread [Next in Thread]