Mail DOS <-> Linux <-> POP3 host

Mail DOS <-> Linux <-> POP3 host

Post by Hauke de Vri » Wed, 11 Sep 1996 04:00:00

I have a DOS client which can dial up a remote DOS machine connected to
the Ethernet, which in turn automatically connects to the POP3 host
(NW3.11 server running the Mercury suite). The DOS client is an
illiterate guy, so I have to get the process as smooth as possible.
Problem is, I haven't a spare phone line for the DOS box. That line
is reserved for the Linux box.

My best guess is to write a script for the DOS client by dialing
into a _terminalserver_ (the Linux box) which should act as a relay
to the POP3 host.

Begin excerpt:

5: Using PM-Remote with Terminal Servers

PM-Remote is a serial-line implementation of the Internet POP3 mail
retrieval protocol and as such can be used to connect to any POP3 server
provided the following conditions are met:

   1: You must have a terminal server or similar device which can
      transform the serial line data into the TCP/IP stream expected
      by the POP3 host. Examples of devices capable of doing this
      include the Annex terminal server family, the Morningstar Express
      router, and the NetBlazer modem.

   2: To send mail this way, your POP3 server must support the non-
      standard POP3 extension "XTND XMIT". At present, the only POP3
      servers known to support this extension are the UCB "Popper"
      server and Mercury v1.20 and later. Receipt of mail can be
      achieved successfully from any valid POP3 server.

There are a couple of extra steps required when working this way, the
most important of which is scripting. Usually a terminal server will put
up its own prompt asking you what system you want to reach. PM-Remote
provides a simple scripting mechanism to get you past this prompt and
connected to the server; the script is a text file, and can be created
using any text editor. It consists of single-line commands using the
following syntax:

      WAIT FOR <"string">
      WRITE <"string">

WAIT FOR: Waits for the string you provide to appear on the input        
          stream. You should keep the match as simple as possible -
          PM-Remote's matching is quite basic.

WRITE:    Places the string you provide on the output stream.

EXIT:     Terminates the script; on termination, PM-Remote expects to
          be able to conduct a normal POP3 protocol session starting
          at the point JUST AFTER the POP3 server has issued its logon

An example script:

----------- Cut here ----------------------
; Sample script to connect to a host
; using PM-Remote.

wait for "HOST >"
write "CONNECT\r\n"
wait for "+OK"
wait for "\n"
----------- Cut here ----------------------

End excerpt.

By now the question is simple - How to turn the Linux box into a
terminal server? This boils down to: How to get the bidirectional
serial data in the TCP/IP stream? Alternatives, etc. welcome.