POST(1)

NAME
post - read or send mail with corporate directory access

SYNOPSIS

  Reading Mail
post [mailx(1) options]

  Sending Mail
post [mailx(1) options] [directory query options] address ...

  Directory Assistance
post -D
post -w [directory query options] address ...

  Directory Update
post -S

  Administrative
post -G [source [dest]]
post -V

DESCRIPTION
post is a mail processing system for reading and sending messages using mailx(1). It provides the ability to look up employee/site information in on-line corporate directories, in addition to recognizing mailx(1) and mail(1) addressing conventions. post also generates paper mail for intra-company delivery.

  Addressing
An address is one of:
    alias | as defined in mailx(1)
    local file delivery | +file or |program as defined in mailx(1)
    network address | [system!...]!login or login@system
    paper address | paper!name:loc:room
    login | local user login id
    query | corporate directory query

First, alias is resolved. If the first character is a + or |, local file delivery is assumed. Then, address is searched from the left for the first occurrence of a !, @, /, :, or =. If this character is a ! or @, address is a network address (login in network address can be a query or mail(1) system-wide alias). An address beginning with paper! delivers intra company mail specified by name, loc, and room. If the first character from the left is a /, : or =, then address is a query. Finally, if POSTETC is set in the environment and address is found in /etc/passwd, it is a login, otherwise it is treated as a query. A query is one more value pairs separated by / or :. Colon must be used in place of slash in system!query. A value pair is the construction attribute=value (see Attributes).

  Reading Mail

See mailx(1).

  Sending Mail
See mailx(1) and Directory Queries. A resolution prompt will appear if address is ambiguous or invalid.

  Directory Assistance

-D  Gives you information on the corporate directory: a support contact for reporting problems, the last update of the directory, and available attributes and titles.

-w  Who. Query directory.

  Directory Update

-S  Update user information interactively and set up a new user on the system. This is automatically invoked when using post for the first time to send mail. The session prompts for personnel identification number, reporting organization, location code, room number, telephone number and electronic mail address. The default for each prompt is displayed within brackets. To delete a value, enter -. Any new information is electronically mailed to the Corporate Directory Administrator for update of the master directory.

  Administrative

-G [source [dest]]
    Generate a new user(4) file by reading the source file, deleting entries for users no longer on the system, and writing the result to the file dest. Both source and dest are in user(4) format and the default for both is $POST/lib/user.

-V  Print the current version and release date.

  Directory Queries

-a attribute[/attribute...]
    Provide default attribute(s). If a query sequence is missing an attribute, assume the corresponding attribute in the -a argument. The default is pn.

-m mods
    Opens the directory specified by mods (see modules(4)).

-o fmt
    Format output of directory search (see Output Formatting). The default format is
    %24pn %10org %6loc %6room %12tel %ema

-q query
    Provide default value pairs. If a query is missing a value pair given in the -q argument, add the value pair to the query (see POSTQUAL).

  Attributes
The ``Directory Attributes'' table below contains a list of the attributes used in queries. The table also supplies a short description, a match type and a list of value characteristics (see explanation following table) for each attribute.

Directory Attributes
Attribute | Description | Match Type | Characteristics | Example
pn | personal name | x | i | pn=j.f.s.smith,jr
name | personal name | x | i | name=p_jones__md
first | first name | p | ia | first=frederick
middle | first middle name | p | ia | middle=bernard
middle2 | second middle name | p | ia | middle2=emile
last | last name | s | ia | last=adams
suffix | name suffix | e | ia | suffix=sr
soundex | soundex code | e | i | soundex=m460
pid | personnel identification number | n | a | pid=103459
org | organization code | p | i | org=45263
com | company affiliation | p | i | com=bl
tl | title abbreviation | w | i | tl=dh
occ | occupational code | e |  | occ=c
tel | full telephone number | t | a | tel="(201) 386-4419"
area | area code | e | a | area=201
exch | exchange | e | a | exch=386
ext | extension | e | a | ext=4419
cornet | cornet number | e | a | cornet=232
loc | location code | s | ia | loc=wh
room | room number | p | ia | room=3a-359
street | street address | p | ia | street="whippany road"
city | city address | p | ia | city=whippany
state | state address | e | ia | state=nj
zip | zip code | p | a | zip=07981
ema | email address | s |  | ema=attmail!fsmith
multi | employees with multiple locations | e | m | multi=1
attribute | display valid attributes | e |  | -o %attribute

  Match Type
e   Exact match.
n   Numeric match.
p   Prefix match.
s   Exact match unless argument ends with a star (*), in which case prefix match.
t   Telephone match. Treat rightmost four numbers as extension, next three rightmost as exchange, and last three rightmost as area code. Non-alphanumerics are ignored. The output format is area exch ext .
w   Prefix match on every word.
x   Personal name match. Syntax for personal name is: [first.[middle.[middle2.]]]last[,suffix] or [first_[middle_[middle2_]]]last[__suffix]
    To prefix match on last name, append * or ... to last. To phonetic match on last name, append ? or ~ to last, or prepend personal name with ?. The output format for pn is last, first middle middle2, suffix ; and name is first_middle_middle2_last__suffix . See first, middle, middle2, last, and suffix for the characteristics of the individual parts of pn and name.

  Characteristics
a   Ignore non-alphanumerics.
i   Ignore case.
m   Multiple records match. If argument is empty, 1 or 2, retrieve first, second or third record for query, respectively.

post attributes used for mail delivery are described in the following table. These attributes only take effect on queries.

Delivery Attributes
Attribute | Possible Values | Description
del | paper | Delivery type. Forces paper mail delivery for query recipients.
ask | yes, no (default) | Ask before sending mail. The recipients of the message are displayed.
all | yes, no (default) | Send to all recipients matching query. Useful when sending to entire organizations. The query is not expanded in the message header.

  Output Formatting
The fmt argument specified with the -o option is used as a printf(3C)-like string for formatting the output of directory queries. All characters are copied literally, except for attribute substitutions and backslash escapes. Quoting may be necessary to prevent shell interpretation.

The syntax for attribute substitutions is:

    % flags width . precision attribute

Only % and attribute are required. Flags may be one or more of the following:
    -   Right justify (left justification is the default).
    ^   Capitalize the first letter of each word.
    +   Capitalize all letters in the value.
    <   If the value is empty, delete back to the last \< or beginning of output.
    >   If the value is empty, skip to the next \> or end of format string.

Width is an integer giving the minimum field width. If the value has fewer characters than this number, the value will be padded on the right (or left, if the - flag is present) with blank spaces. The default width is zero.

Precision is an integer that specifies the maximum number of characters to be printed from the value. If the value has more characters than this number, they will not be printed. Zero is a special case meaning print all characters (the default). A period is used to separate width and precision and is only used if precision is used.

To follow an attribute with an alphanumeric, enclose the attribute substitution (except for the percent sign) in curly braces, {}.

The backslash escapes are:

Output Format Backslash Escapes
Escape | Meaning
\c | Suppress terminating new-line
\b | Backspace
\f | Form feed
\n | New-line
\r | Carriage return
\t | Tab
\v | Vertical Tab
\nnn | Octal ASCII character
\< | Marker for < flag
\> | Marker for > flag

  Environment Variables

POSTETC
    When this variable is set, post will search /etc/passwd for login arguments.

POSTQUAL=query
    Provide default value pairs for query. If a query is missing value pair given in the POSTQUAL argument, add it to the query (-q overrides POSTQUAL).

EXAMPLES
Read from your mbox file:
    post -f
Send mail to all department heads in Division 452:
    post org=452/tl=dh/all=yes
Send paper mail to all employees at Whippany in section 3A:
    post loc=wh/room=3a/all=yes/del=paper
Query directory for employees using system whutt:
    post -w ema=whutt!*
Query directory and format output in label-like form:
    post -w -o "%^pn\n%+loc %+room" org=123
Query directory for valid attributes:
    post -w -o %attribute

FILES
$POST/lib/dispatch
    distributed directory map
$POST/lib/mailx
    mailx program used by post
$POST/lib/user
    list of post(1) users on this system
$POST/lib/dbinfo
    program to retrieve directory information
$POST/lib/update
    program to update directory
$POST/lib/genuser
    program to update user(4) file
/bin/mail
    local mail delivery agent
/bin/rmail
    remote mail delivery agent
/etc/passwd
    list of local users

SEE ALSO
btoa(1), fixmbox(1), forward(1), gone.fishing(1), mail(1), mailx(1), pq(1), genesis(1M), server(1M), upas(1M), pq(3C), dispatch(4), ev(4), mail(4), modules(4), user(4).
Post 4.0 Product Release Description
Post 4.0 Primer
Post 4.0 User Guide
Post 4.0 User Reference Manual
Post 4.0 Administrator Reference Manual
Post 4.0 Quick Reference Card
Post 4.0 Programmer Guide
Post 4.0 Administrator Guide

WARNINGS
Colon must be used in place of slash in the construction: system!query.

BUGS
Mailings to very large mailing lists, e.g., com=bl/all=yes, may fail by exceeding system limits (see exec(2)).