Gnus development mailing list
 help / color / mirror / Atom feed
From: Harry Putnam <reader@newsguy.com>
Subject: Re: Gnus Access mail spool by ssh
Date: 09 Jul 2000 21:56:55 -0700	[thread overview]
Message-ID: <m2lmzashuw.fsf@reader.ptw.com> (raw)
In-Reply-To: Alan Shutko's message of "08 Jul 2000 22:03:57 -0400"

Alan Shutko <ats@acm.org> writes:

> Harry Putnam <reader@newsguy.com> writes:
> 
> > Now I want to have a laptop running FreeBSD 4.0 networked to desktop
> > running Redhat linux, be able to  view/manipulate mail on the parent machine
> > but don't want to  setup pop, imap or  special sendmail stuff.  I
> > don't want more daemons running that can be exploited from the internet.
> > And haven't really looked into firewall technique.

[...]
> 
> If you don't want to do that... well, you could use the ssh to set up
> a ppp tunnel between your computers, and run NFS, imap, or whatever
> over that.  In some cases, that makes sense (ie, laptop halfway across
> the continent, over very untrusted ethernet).  But not in a home
> network.  Unless you have a very untrusted home network (ie, both
> machines are just connected via a hub to a cable modem) it's much more
> convenient to set up some firewall rules on the host connected to the
> internet, and trust the internal network.  ssh was _not_ designed to
> be a mail protocol, and as Kai pointed out, locking issues will be a
> bitch.

I think Kai hit it right with a few modifications.  I guess I was
over complicating a bit.

Here is what I've come up with:

procmail copies all mail to $desktop_spool and a second  spool file on
$DESKTOP called  $HOME/spool/backup/lap.sp

Now using Kias formula:

ssh $desktop $movemail $mailfile $desk_home/TMPFILE
But with the modification that $mailfile is $lap.sp (a copy of
incoming).
 
So movemail moves $lap.sp to lap.tmp and when gnus slurps it up
through the ssh tunnel

The only monkey wrench here was that I couldn't find `movemail'  Its
nowhere in my path, which is very extensive.  A grep of
/usr/local/pgnus/lisp/*.el  finds many mentions of `movemail' but
none seem to show its address. 
Checking emacs info , a few hits but no address.

Finally the trusty gnus manual pages tipped it off and in the mail
sources dialog there is a nice line giving the address.

So a short script will do it all I think, except I suspect there could
be trouble about deleting the spool if procmail happens to be writing
to it right then.  

The cool thing is someone already wrote almost the exact script in 
gnus info at Mail Source Specifiers.

        (setq mail-sources
                '((file :prescript "ssh reader@reader ~/scripts/getmail >%t ")))

What does the specifier "t" do here?  Does just mean to the default?

Lifted almost bodily from gnus info.... I love it when there are good
examples like this!  I only had to add an `if/then' clause for a
little protection.  Since movemail doesn't delete the spool but
leaves an empty file.

  getmail.sh script 

  #!/bin/sh 
  MOVEMAIL=/usr/lib/emacs/20.5/i386-redhat-linux-gnu/movemail
  TMP=/home/reader/spool/backup/lap.tmp
  MAIL=/home/reader/spool/backup/lap.sp
  if [ -s $MAIL ];then 
  rm -f $TMP;$MOVEMAIL $MAIL $TMP >/dev/null && cat $TMP
  fi





  reply	other threads:[~2000-07-10  4:56 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-07-08 21:02 Harry Putnam
2000-07-08 23:08 ` Kai Großjohann
2000-07-09  2:03 ` Alan Shutko
2000-07-10  4:56   ` Harry Putnam [this message]
2000-07-10 11:48     ` Kai Großjohann
     [not found]     ` <lfllmzam504.fsf@rupert.informatik.uni-stuttgart.de>
2000-07-11 12:39       ` Harry Putnam
2000-07-11 22:28         ` Alexandre Oliva
2000-07-12  0:01           ` Harry Putnam
2000-07-12  2:31             ` Alexandre Oliva
2000-07-12  8:06               ` Kai Großjohann
2000-07-12  8:52                 ` Nuutti Kotivuori
2000-07-12 11:26                   ` Harry Putnam
2000-07-12 14:54                     ` Nuutti Kotivuori
2000-07-12 15:10                       ` Harry Putnam
2000-07-12 17:07                         ` Kai Großjohann
2000-07-12 19:22                       ` Harry Putnam
2000-07-12 19:42                         ` Alan Shutko
2000-07-12 21:28                           ` Harry Putnam
2000-07-13  3:50                             ` Nuutti Kotivuori
2000-07-13  3:46                         ` Nuutti Kotivuori
2000-07-14 11:02                           ` Harry Putnam
2000-07-16 15:11                             ` Nuutti Kotivuori
2000-07-15  0:29                   ` Simon Josefsson
2000-07-10 12:00 ` Nuutti Kotivuori

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m2lmzashuw.fsf@reader.ptw.com \
    --to=reader@newsguy.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).