Name

poll - Poll a site

Syntax

poll [ -i ] [ -p progress ] site

Description

Poll dials site to exchange mail, news, and files. It uses an extensive set of macro commands for dialing, connecting, and logging in. Information for connecting to a site is stored in $/etc/L.sys.

The L.sys File


The L.sys file consists of entries, one or more per site. The first line in an entry begins in the leftmost column, and starts with the name of a site to poll. Succeeding lines for the entry begin indented by a tab or spaces.

Entry lines contain space-delimited arguments, so any arguments requiring spaces should be enclosed by quotation marks (").

A sample entry might look like this:

pro-sample Any 2400 555-1212 local \p1 \[login:] mdss \[word:] whatever \[id:] pro-test;password \!"mdss -x BLX pro-sample"

This entry consists of a main entry line and succeeding lines (indented) which continue the information for the entry. The first line begins with four fields of information necessary to begin the poll attempt.

Comments can be included following a pound-sign (#).

L.sys Fields


The first four fields are:

pro-sample

The name of the remote site.

Any

A valid time specifier. This includes one or more of the following keywords or time ranges:

Any

Site can be polled at any time.

Dead

Site is never called unless poll is forced to ignore time restriction information by including the -i command line flag.

Never

Site is never called, even if -i is given.

Sun

(and Mon, Tue, Wed, Thu, Fri, Sat). The site can be called only during the days specified.

End

Site can be called during the weekend (Sat and Sun).

Day

Site can be called during a weekday (Mon through Fri).

xxxx-yyyy

Site can be called during the specified time range. Times are given in 24 hour format and must contain four digits (no colons). For example, 0000-0630 means the site can be polled between midnight and 6:30am.

Multiple time qualifiers can be listed, each separated by commas (no spaces). For example, “Tue,Fri=1800-2000,End” means that a site can be polled any time during Tuesday, only between 6pm and 8pm on Friday, and any time during the weekend.

A single time range cannot cross midnight, but a pair of ranges can be given to do this (e.g. “2330-2359,0000-0330”).

2400

The fastest common speed on both systems.

555-1212

The phone number of the remote site. An alternate number can be specified for multi-port sites with differing phone numbers. This is done by separating the two numbers with the pipe (|) character (e.g., “555-1234|555-5678”).

A phone number can begin with “AT” to signify a custom dialing command (e.g., AT&M4DT555-1212). This allows a command to be sent to the modem before dialing. Note: If you have an MNP-style modem that uses backslash (\) commands, include two backslashes where normally you would use only one (e.g., AT\\N0DT555-1212).

If the site does not answer, poll dials a second time, using the alternate number if given.

local

An arbitrary identifier classifying the type of connection. The name you pick is totally up to you — it is meaningful to you only. Typical examples might be “local” (a local call), “toll” (long distance), etc. The identifier can also be the name of a long distance carrier server such as “ATT”, “Sprint”, “MCI”, “PCPursuit”, etc. The identifier cannot include spaces or any characters illegal to the operating system.

Macro Commands


After the fourth field, the macro commands begin. Macro commands start with a backslash and one character. The macro commands are:

\[

Pattern match. Poll suspends macro execution, watching all the incoming characters until it matches the pattern given between the left and right square brackets. Example: \[login:]

By default, \[ waits 45 seconds. You can adjust the duration by following the last bracket with a value in seconds. Example: \[text]90.

The \[ command also supports a UUCP-style “expect-send-expect” feature. This embodies two pattern matches and a sending command in one. For example:

\[hello]-hi-[hello]
This tells poll to wait for “hello” first. If it receives it within the duration specified, poll skips the rest of the macro and goes onto the next one. If “hello” is not found in time, “hi” is sent (with a carriage return on the end), and poll once again waits for “hello”, the second pattern.

Failure to match a pattern cancels the poll attempt.

\d

One-second delay. If an argument is used, such as with \d2 it denotes the number of seconds to delay (in this case, two seconds).

\b

Send a modem break tone.

\c

Clear the input buffer. This is used to flush any buffered input from the host system. It would be useful in a situation where buffered input could trigger a handshake to occur at the wrong time.

\p

Set progress reporting (unless overridden by the -p option on the command line). By default, poll displays a “live” login session while connecting with a site. By turning on progress reporting with \p1, characters sent from the polled site are not displayed. Instead, poll reports progress messages that can be very useful in debugging a connection attempt. Using \p or \p0 turns off progress reports.

The -p command line option allows you to override any \p commands. For example, including “-p 0” or “-p 1” in the command line causes poll to set the progress mode to on (1) or off (0) and ignore any \p macros.

\!

Launch application. This invokes a network protocol to use after all the handshaking has been done. If the command line requires arguments, the entire command line must be enclosed between quotation marks, as in the example given earlier.

Mdss is used for ProLine systems and requires at least one argument: the name of the site being polled. See mdss for details on the options it accepts.

Any argument that does not start with a backslash (\) and a command character is sent to the remote site. A newline is automatically sent, unless the argument ends with a semi-colon (;).

Important Notes


All arguments for an L.sys entry are delimited by space characters. Thus, if you need to match a pattern that contains one or more spaces, enclose the argument in quotation marks:

\["net login:"]

Any control characters needed in an argument can be represented by using the caret (^), as in ^C for Control-C. The backslash (\) can be used to escape special characters like the quote ("), caret (^), and backslash (\).

The L.sys file can contain more than one entry for a single site. This might be desirable for using a different carrier or long distance service depending on the time or day of week. Poll scans the entire L.sys file for matching site entries until it finds one that has a valid poll time and successfully connects.

Files

$spool/logs/mdsslog
a report of network mail activity,
$/etc/L.sys
remote site macro file,
$/mdss/*
directory containing site subdirectories.

See Also

mdss(NET), scan(NET), sendmail(C)