NOSintro – TCP/IP over Packet Radio

An Introduction to the KA9Q Network Operating System

by Ian Wade, G3NRW

Chapter 24: POP MAIL COLLECTION

 

A NOS station can operate as a "poste restante" system; that is, it can hold mail indefinitely on behalf of other stations which are not normally operational. When those stations are ready to receive their mail, they connect with the poste restante host, which then forwards any outstanding mail, using POP (Post Office Protocol). See Fig 24-1.

 

Fig 24-1: The POP client requests the server to forward any outstanding mail (assuming there is a suitable entry in the /popusers file to authenticate the client).

Setting up the POP Server Host

There are two current versions of the POP protocol: POP2 and POP3. Both of these servers do essentially the same job.

When setting up a host, you should start both POP2 and POP3, so that the system will understand requests from clients running either of these protocols.

The place to start the servers is in autoexec.nos:

start pop2
start pop3

It is also necessary to set up the file /popusers, which contains the name and POP password of every user for whom you will be holding mail.

For example:

# SYNTAX: username:password:
ns9liz:lizpasswd:
mary:poppins:

Note that both the username and the password terminate in a colon (:).

Finally, you need to ensure that all incoming mail addressed to Liz and Mary finishes up in the incoming mail directory (/spool/mail), as the text files ns9liz.txt and mary.txt. This is where the POP clients will collect it from.

In other words, if you want to send mail to ns9liz, you use a local address (sp ns9liz), not a remote address (sp ns9liz@ns9liz).

To handle mail coming in from other stations addressed to ns9liz@ns9liz, you will need an entry in the rewrite file to force NOS to put the mail into /spool/mail/ns9liz.txt:

ns9liz@ns9liz ns9liz

See Fig 24-2.

 

Fig 24-2: Incoming mail addressed to Liz must be directed to the incoming mail queue (/spool/mail), ready for the POP server. This means that an entry in /spool/rewrite is needed, to map the remote address ns9liz@ns9liz to the local address ns9liz.

 

Setting up the POP Client

For a POP client to collect mail from a POP server, it is necessary on the client system to specify the server name (in autoexec.nos). The syntax is (all on one line):

popmail addserver host [seconds] [hh:mm-hh:mm] protocol
mailbox username password

For example (all on one line):

popmail addserver ns9bob 1800 00:00-03:00 pop3 ns9liz ns9liz
lizpasswd

This means that ns9bob is running a POP3 server, which Liz’s POP client is to contact at 1800-second (30-minute) intervals between midnight and 3am, to see if there is any mail in Bob’s /spool/mail/ns9liz.txt to be collected. The last two parameters (ns9liz and lizpasswd) must match an entry in Bob’s popusers file.

The seconds and hh:mm-hh:mm parameters may be omitted. This means that the POP client never wakes up automatically to collect mail. In this case, to force the client to contact the server, Liz must give the command:

net> popmail kick ns9bob

You can define more than one POP server, by adding more popmail addserver commands.

To list all the current POP server hosts:

net> popmail list

and to remove a server from the list:

net> popmail dropserver ns9bob

When POP mail arrives, NOS will announce its arrival if you give the command:

net> popmail quiet no

You can change the setting to yes if you don’t want to see the announcement.

 

Tracing POP Mail Collection

To check that POP mail collection is working properly, you can activate the POP trace.

 

The trace commands are:

net> popmail trace 0 {no trace, turn trace off}
net>
popmail trace 1 {report serious errors}
net>
popmail trace 2 {report transient errors}
net>
popmail trace 3 {report complete POP sessions}

Trace output goes to the session log file (/dump/session.log). Note that for trace level 3, POP creates a large amount of data in the session log, so don’t forget to turn the trace off if you don’t need it.

 

Back to Contents Page

Back to NOSintro Main Page.


[Copyright 1992-2009 Dowermain Ltd. All Rights Reserved. This page last modified: 21 May 2009]