Subject: Re: POP forwarding

From: Rob Browning <[email-masked]>
Date: 12 Jun 1996 02:19:40 -0500

Douglas Bates <[email-masked]> writes:

> Does anyone have suggestions on 
>  a) does this seem like a reasonable approach?
>  b) if so, what would be good tools for creating such a POP forwarder?
> I have some experience with sockets under perl if that seemed to be a
> good way or I could treat this as an opportunity to get more exposure
> to Java.  Both of these methods would take me a bit of time.  Is there
> some tool in the Debian distribution that could do a quick-and-dirty
> job on this?

There are probably better or more sophisticated solutions, but I think
this one will work.

I think you can just give each of them an account on your Debian box,
then use popclient (part of netstd) to get their mail from the
external server to their Linux account.  Then they will be able to use
pop to get their mail from your Linux box.  I've done this before, but
I have sendmail running on all the machines involved.  I'm not sure if
that's necessary.  Perhaps someone else can say one way or the other.

--
Rob

---

From: Douglas Bates <[email-masked]>
Date: Wed, 12 Jun 96 16:19 CST

I have friends visiting for a couple of weeks and I would like to help
them access their e-mail while here.  They are accustomed to using
applications such as Eudora or Netscape under Windows to access a POP
server.  I can provide them with the opportunity to connect the
Windows machine to a PPP account here but, because of firewalls, they
will not be able to POP the mail directly from their home server.
However, my Debian Linux machine can reach outside the firewall and
access their home server for them.

It seems easiest then to create accounts on this Linux machine for them
and schedule cron jobs that establish a POP connection to their home
server, pick up their mail and deposit it in /var/spool/mail.  They
can then pop their mail from this machine.

---

From: Kai Grossjohann <[email-masked]>
Date: 15 Jun 1996 23:58:57 +0200

>>>>> "Douglas" == Douglas Bates <[email-masked]> writes:

    Douglas> However, my Debian Linux machine can reach outside the
    Douglas> firewall and access their home server for them.

I think it would not be too difficult to write a POP proxy.  You write
a little program that runs on your Debian box that pretends to be a
POP server, but what it really does is to open a connection to the
*real* POP server of your friends and forward all commands to that
server.

All the program needs to do is to know where a message ends, you can
then read all of a message then wait for response.  That means that
you will have to familiarize yourself with the POP protocol to see how
each request to and response from the server is terminated.

I did this once for HTTP and it didn't take me longer than two days
(part-time, used a programming language I had never seen before,
learned to use Python on the way).

kai
-- 
Life is hard and then you die.

---

From: Scott Barker <[email-masked]>
Date: Sat, 15 Jun 1996 16:38:03 -0600 (MDT)

> *real* POP server of your friends and forward all commands to that

There is a little program which comes with INN which can do this
(backends/rcompress.c). It can be altered to forward connections to any server
on any port. I've used it to forward NNTP connections past a firewall, using
tcp_wrapper in inetd to control access.

-- 
Scott Barker
Linux Consultant
[email-masked]
http://www.cuug.ab.ca:8001/~barkers/   (under construction)

[ I try to reply to all e-mail within 5 days. If you don't  ]
[ get a response by then, I probably didn't get your e-mail ]
[ (we have a sometimes sporadic connection to the internet) ]

"It's an experience like no other experience I can describe, the best thing
   that can happen to a scientist, realizing that something that's happened in
   his or her mind exactly corresponds to something that happens in nature.
   It's startling every time it occurs. One is surprised that a construct of
   one's mind can actually be realize in the honest-to-goodness world out
   there.  A great shock, and a great, great joy."
   - Leo Kadanoff

---

From: Amos Shapira <[email-masked]>
Date: Sun, 16 Jun 1996 07:40:39 +0300

In message <[email-masked]> you write:
|Kai Grossjohann said:
|> 
|> >>>>> "Douglas" == Douglas Bates <[email-masked]> writes:
|> 
|>     Douglas> However, my Debian Linux machine can reach outside the
|>     Douglas> firewall and access their home server for them.
|> 
|> I think it would not be too difficult to write a POP proxy.  You write
|> a little program that runs on your Debian box that pretends to be a
|> POP server, but what it really does is to open a connection to the
|> *real* POP server of your friends and forward all commands to that
|> server.
|
|There is a little program which comes with INN which can do this
|(backends/rcompress.c). It can be altered to forward connections to any server
|on any port. I've used it to forward NNTP connections past a firewall, using
|tcp_wrapper in inetd to control access.

My first though went for SOCKS.  Thought I never got around to use it,
from what I saw it looks like this is an Internet standard for doing
generic application-level proxying.

In any case, make sure that wnatever you install on the firewall
doesn't let outsiders to connect back in.

Cheers,

--Amos

--Amos Shapira                    | "Of course Australia was marked for
133 Shlomo Ben-Yosef st.          |  glory, for its people had been chosen
Jerusalem 93 805                  |  by the finest judges in England."
ISRAEL             [email-masked] |                     -- Anonymous