DataMuseum.dk

Presents historical artifacts from the history of:

DKUUG/EUUG Conference tapes

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about DKUUG/EUUG Conference tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - metrics - download
Index: T p

⟦f0b9a7c5c⟧ TextFile

    Length: 6428 (0x191c)
    Types: TextFile
    Names: »phquery.8«

Derivation

└─⟦9ae75bfbd⟧ Bits:30007242 EUUGD3: Starter Kit
    └─⟦bfebc70e2⟧ »EurOpenD3/mail/sendmail-5.65b+IDA-1.4.3.tar.Z« 
        └─⟦f9e35cd84⟧ 
            └─⟦this⟧ »sendmail/uiuc/phquery.8« 

TextFile

.TH PHQUERY 8L "13 Feb 1989"
.UC 4
.SH NAME
phquery \- fuzzy address resolver backend for sendmail
.SH SYNOPSIS
.B phquery
[
.B \-d
] [
.B \-i
] [
.B \-l
] [
.B \-p
] [
.B \-R
] [
.B \-s
] [
.BI \-f\  from_address
]
address
[ address2 ]
\&...
.SH DESCRIPTION
.I Phquery
is the mechanism used at UIUC to resolve fuzzy addresses, e.g., those sent
to
.IR jp-morgan@uiuc.edu ,
.IR John-Morgan@uiuc.edu ,
or
.IR ka9wgn@uiuc.edu .
The local portion of the address (left of the "@")
may be either a
.IR ph (1)
alias (jp-morgan),
name (John-Morgan),
or
amateur radio callsign (ka9wgn)
field.
.PP
N.B.,
.I ph
only guarantees the uniqueness of the alias field.
Should there be two or more John-Morgan s in the ph database,
.I phquery
will return an error message suggesting alternatives.
Also note that while ph names have blanks, sending a blank embedded in a mail
address, no matter what quoting is done, is likely to be zapped by some
intervening mail system.
Therefore blanks in full name addresses should be replaced with dashes ("-").
Thus "John Morgan" becomes John-Morgan.
.PP
.I Phquery
can also be used on out-going mail to insert Reply-To: ph-alias@uiuc.edu
headers in the mail message.
See the description of
.B \-R
below.
.PP
.I Phquery
is not meant to be invoked directly by users.
Instead
.IR sendmail (8)
will invoke it as a non-local mailer for addresses that have a remote
portion of
.IR uiuc.edu .
.PP
Systems that are running the UIUC version of sendmail (V5.61/IDA-1.2.8)
may use the shorthand address of
.I :someone
that will be automatically changed to the canonical form
.IR someone@uiuc.edu .
It is a strong advantage for a site to run this sendmail as otherwise
.I ph
name resolution via
.I phquery
must usually be done on some other machine instead of locally.
See the NOTES section below for a quick sendmail.cf hack that will enable
.I phquery
alias resolution.
.PP
The call sequence runs as follows:
.PP
Sendmail resolves one or more addresses in a message from, say
.I joe@chicago.edu
to
.IR someone@uiuc.edu .
.PP
Sendmail invokes
.I phquery
as
.sp
.in +4
phquery -f joe@chicago.edu someone
.in
.sp
The text of the mail message is read by
.I phquery
on the standard input.
.I Phquery
consults the network ph server to locate the email address
.I doda@uxe.cso.uiuc.edu
for the alias
.IR someone .
.PP
The header line "X-PH-To: doda@uxe.cso.uiuc.edu" is added to the mail message.
Sendmail is then invoked again to make final delivery.
.PP
The alternative call sequence is also initiated by sendmail
in the sendmail.cf ruleset #1 (sender specific address re-writing).
Assume joe@figure1.cso.uiuc.edu is sending to mack@knife.nsa.gov.
Joe has the ph alias of "joe-bush".
If the right hand side (rhs) of the address ends in ".uiuc.edu", e.g.,
joe@figure1.cso.uiuc.edu,
.I phquery
is invoked as
.sp
.in +4
phquery -f joe@figure1.cso.uiuc.edu mack@knife.nsa.gov
.in
.sp
If
.I phquery
locates a single alias (joe-bush) for the supplied email address,
then the following three lines are added to the mail message:
.sp
.in +4
.nf
Comment: Reply-To: added by phquery (V3.0)
Resent-From: postmaster@uxc.cso.uiuc.edu
Reply-To: joe-bush@uiuc.edu
.in
.fi
.sp
Sendmail is then re-invoked with the arguments
.sp
.in +4
sendmail -f joe@figure1.cso.uiuc.edu.xyzzy mack@knife.nsa.gov
.in
.sp
The ".xyzzy" prevents sendmail from sending the message through
.I phquery
again.
.PP
.I Phquery
understands several non-professional arguments:
.TP 5 5
.B \-d
Turn on debugging statements, disable removal of temp files, and don't
vfork/execve sendmail for error or mail delivery.
Enabling debug also disables
.IR syslog (3)
statements unless re-enabled by a subsequent
.BR \-l .
.TP 5 5
.B \-i
Issue a usage and copyleft statement.
.TP 5 5
.B \-l
Enable use of
.IR syslog (3)
routines to record signicant events using the LOG_MAIL facility.
.TP 5 5
.BI \-f\  Address
Use
.I Address
as the From: address in the forwarded mail and as the recipient for any
error messages.
If not specified,
.I phquery
will use the contents of the From: field in the message header block instead.
.TP 5 5
.B \-R
Generate Reply-To: ph-alias@uiuc.edu headers in out-going mail.
.TP 5 5
.B \-s
A no-op that causes
.I phquery
to see Figure 1.
If the debug flag,
.BR \-d ,
is specified as well,
.I phquery
will print a suitable message on the standard error.
.TP 5 5
.B \-r
A synonym for
.BR \-f .
.TP 5 5
.B \-p
If set, all error returns are copied to Postmaster.
.SH NOTES
A vanilla sendmail site can use the syntax
.I some-one@uiuc.edu
provided at least one of the following is true:
.nf
a) the sendmail uses MX records,
b) it has a mailhost or smarterhost relay that does use MX records,
c) the rules below have been put into their sendmail.cf file.
.fi
.PP
To use the
.I :some-one
syntax, the /usr/lib/sendmail.cf file must be altered or the vendor issued
sendmail replaced with the more capable IDA sendmail.
This is especially recommended for Ultrix and SUN users.
The IDA sendmail source is available for anon-FTP from uxc.cso.uiuc.edu .
Look in the /pub directory.
Pre-compiled versions are also available in the {SUN,VAX,etc} sub-directories.
.PP
While gutted versions of sendmail are available for System 5 based machines,
they are not to be recommended.
Users of such machines are advised to upgrade to 4.3 BSD.
.PP
If the current sendmail.cf file is to be modified, incorporate the following
re-write rule towards the end of ruleset 3 after the address has been 
canonicalized.
.PP
# check for :user-alias addresses
.sp
R@$=M$=Y$+		$:$>3 $3	uiuc.edu:user@host to user@host
R:$-			$1@uiuc.edu
.PP
Class M is defined to be all domains for which mail is to be accepted for.
At UIUC, it is simply
.PP
CMuiuc.edu
.PP
To invoke
.I phquery
locally, add the following rule to ruleset 0 just prior to selecting the
local mailer:
.PP
R$+@.$=M		$#PH  $@$w $:$1
.PP
And define the PH mailer as follows:
.PP
MPH,	P=/usr/lib/mail/phquery, F=DFMhnmur,	A=phquery $u
.SH SEE ALSO
.IR sendmail (8)
.SH BUGS
Undoubtably.
.PP
.I Phquery
is still an evolving program.
The program structure has been made as general as possible to facilitate
future enhancements.
Please send comments and suggestions to
.BR paul-pomes@uiuc.edu .
.PP
N.B., the
.B \-p
option sends copies of failed mail to Postmaster.
While usually a discreet person, it would still not be wise to discuss
sensitive topics via email.
This is useful advice at any time.
.SH AUTHOR
Paul Pomes, UIUC-CSO