Server Communication

Page updated 1 December 2022

Go to TopIntroduction

nPOPuk is not an entirely conventional email program. This is because it operates as a client/server application (explained in the Introduction to this guide) and requires the user to set up separate Accounts and Saveboxes (explained in the Setup chapter) to make it perform in a more conventional way.

A conventional mail program will delete all incoming mail from the server and instead keeps copies in a comprehensive database of both incoming and outbound mail on the local computer. The user of the program only communicates with this local database whilst, behind the scenes, the program exchanges data with the server as and when it needs to, hiding all detail of the processes taking place.

For example, the processes initiated by clicking a "Send and Receive" button require a complex chain of commands to be issued. After logging on to the POP3 server by submitting username and password, it will, typically, will check what mail is available, retrieve any mail, delete any copy left on the server, then check for any queue of outbound mail, logon to the SMTP server and pass the "envelope" and "body" components of each message in the queue to the server before quitting from each server.

nPOPuk works in a different way. It cuts out the local database of inbound mail and simply reads what is currently on the POP3 server and by default will not delete anything there, indicating the commands and responses sent to and received from the POP3 server on the status line of the main program window as it executes them. It processes outbound mail in equally transparent fashion, saving local copies of draft and sent mail in a simple plain text format and sending it to the SMTP server when instructed.

While conventional programs operate well for those who have high specification hardware and high-speed low-cost access to the Internet for those that do not have these facilities or, for technical reasons, need to break down complex server command chains into separate parts, will find nPOPuk an ideal tool.

Go to TopServer Communication in nPOPuk

The protocols for the PO3 and SMTP servers are surprisingly primitive and both have a very limited set of commands to which they respond. nPOPuk compliments this, taking a relatively low level approach to server communication and can, for example:

Confirm whether mail is available on the server without downloading it
So it can operate as a simple mail checker - useful for those with limited hardware resources who want to run resource-hungry programs while waiting for important mail.
Read only the opening parts of messages
So you can read, and optionally reply to, a message without downloading a large or unwanted or unreadable attachment - useful for those on expensive or slow connections, or those concerned about or investigating a virus attack.
Delete mail without fully downloading it first
So it can be used to clear spam or suspicious or unwanted attachments.

To achieve these operations it is useful to appreciate how the server works.

A POP3 server has three distinct "states". The first is AUTHENTICATION, in which a greeting is offered and your computer identifies and authenticates itself. The second, TRANSACTION state, is when your computer sends a list of instructions, concerning how the mail drop is to be processed. Finally, the communication moves to the UPDATE state, when the commands specified in the Transaction state are actioned. An SMTP server has a similar set of states. nPOPuk simply echoes this sequence of activities.

Almost the only shortcut that nPOPuk takes for the user is when "checking" mail. By default, after authentication, the program checks how many new messages are present, then issues a set of "TOP" commands to retrieve the first few lines of each of these, and then moves directly to the Update state to action these commands.

For our purposes it can be considered that server communication has two phases, the first is where all the  "transactions" to be performed are set up and a second "update" phase when the transactions are executed. Because of this two step process many of the server transactions are defined through the Global Options and Account Settings dialogues but others, notably those that Mark Mail cannot, for obvious reasons, be selected on a global of even account-wide basis but must be done on specifically selected messages.

Network Log DialogueWhen users eventually select the "Check Account" or "Update Account" options they are initiating a chain of server commands that will connect and logon to the server, or servers, issue the various transaction requests already set up and then action them. As the individual commands are issued they are seen briefly on nPOPuk's status line and, optionally, may be viewed in a Network Log file that can be generated after selecting an option on the Main Window's File menu.

If you wonder why you can't just retrieve mail, delete or send it, when issuing commands to the the POP3 or the SMTP servers you just need to realise will need to specify the move to the Update state, by using nPOPuk's Update function. Just think of it as the equivalent of an "Are you sure?" dialogue.

Go to Top