|
|
DataMuseum.dkPresents historical artifacts from the history of: DKUUG/EUUG Conference tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about DKUUG/EUUG Conference tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - downloadIndex: T p
Length: 6598 (0x19c6)
Types: TextFile
Names: »phquery.h«
└─⟦9ae75bfbd⟧ Bits:30007242 EUUGD3: Starter Kit
└─⟦bfebc70e2⟧ »EurOpenD3/mail/sendmail-5.65b+IDA-1.4.3.tar.Z«
└─⟦f9e35cd84⟧
└─⟦this⟧ »sendmail/uiuc/phquery.h«
/*
* @(#)$Header: /usr/local/src/mail/sendmail/uiuc/RCS/phquery.h,v 1.7 90/12/11 12:26:59 paul Exp $
*/
/*
* Configuration parameters.
*
* Defining EXPAND_TO will print the list of expanded addresses on an added
* X-PH-To: header line. This will also expand names found in /usr/lib/aliases
* lists. Leaving it undefined will cause phquery to print only a version
* line with the name of the host running phquery, e.g.,
* X-Ph: V3.5@uxc.cso.uiuc.edu .
*/
/*#define EXPAND_TO /* Print translated addresses */
/*
* An address tested as a name is first run through as is. If no matches
* are found then any punctuation characters are converted one at a time
* (leftmost first) to space characters and the lookup is repeated until
* there are no more punctuation characters. If WILDNAMES is #define'd,
* a wildcard char '*' will be appended after each single character name,
* e.g. p-pomes is tried as "p* pomes". This has risks as follows: assume
* Duncan Lawrie sets his alias to "lawrie". A query for d-lawrie will
* fail as a alias lookup but succeed as a name lookup when written as
* "d* lawrie". This works until Joe Student sets his alias to "d-lawrie".
* Whoops. Still in a non-hostile environment, this function may be more
* useful than dangerous.
*/
/*#define WILDNAMES /* Append '*' to single char names */
/* End of configurable parameters. */
/*
** Reply codes:
** 1XX - status
** 2XX - information
** 3XX - additional information or action needed
** 4XX - temporary errors
** 5XX - permanent errors
** 6XX - phquery specific codes
*/
#define LR_PROGRESS 100 /* in progress */
#define LR_ECHO 101 /* echoing cmd */
#define LR_OK 200 /* success */
#define LR_RONLY 201 /* database ready in read only mode */
#define LR_MORE 300 /* need more info */
#define LR_LOGIN 301 /* encrypt this string */
#define LR_TEMP 400 /* temporary error */
#define LR_INTERNAL 401 /* database error, possibly temporary */
#define LR_LOCK 402 /* lock not obtained within timeout period */
#define LR_DOWN 475 /* database unavailable; try again later */
#define LR_ERROR 500 /* hard error; general */
#define LR_NOMATCH 501 /* no matches to query */
#define LR_TOOMANY 502 /* too many matches to query */
#define LR_AINFO 503 /* may not see that field */
#define LR_ASEARCH 504 /* may not search on that field */
#define LR_ACHANGE 505 /* may not change field */
#define LR_NOTLOG 506 /* must be logged in */
#define LR_FIELD 507 /* field unknown */
#define LR_ABSENT 508 /* field not present in entry */
#define LR_ALIAS 509 /* requested alias is already in use */
#define LR_AENTRY 510 /* may not change entry */
#define LR_ADD 511 /* may not add entries */
#define LR_VALUE 512 /* illegal value */
#define LR_OPTION 513 /* unknown option */
#define LR_UNKNOWN 514 /* unknown command */
#define LR_NOKEY 515 /* no indexed field found in query */
#define LR_AUTH 516 /* no authorization for query */
#define LR_READONLY 517 /* operation failed; database is read-only */
#define LR_LIMIT 518 /* too many entries selected for change */
#define LR_HISTORY 519 /* history substitution failed */
#define LR_SYNTAX 599 /* syntax error */
#define LR_AMBIGUOUS 600 /* ambiguous or multiple match */
#define NONE_OF_ABOVE -1
struct ReplyCodes {
int key;
char *value;
} Codes[] = {
LR_PROGRESS, "Nameserver search in progress",
LR_ECHO, "Echoing nameserver cmd",
LR_OK, "Success",
LR_RONLY, "Nameserver database ready in read only mode",
LR_MORE, "More info needed to process nameserver query",
LR_LOGIN, "Encrypt this string",
LR_TEMP, "Temporary nameserver error",
LR_INTERNAL, "Nameserver database error, possibly temporary",
LR_LOCK, "Nameserver lock not obtained within timeout period",
LR_ERROR, "Nameserver hard error; general",
LR_NOMATCH, "No matches to nameserver query",
LR_TOOMANY, "Too many matches found to nameserver query",
LR_AINFO, "May not see that nameserver field",
LR_ASEARCH, "May not search on that nameserver field",
LR_ACHANGE, "May not change that nameserver field",
LR_NOTLOG, "Must be logged in to nameserver",
LR_FIELD, "Unknown nameserver field",
LR_ABSENT, "E-mail field not present in nameserver entry",
LR_ALIAS, "Requested nameserver alias is already in use",
LR_AENTRY, "May not change nameserver entry",
LR_ADD, "May not add nameserver entries",
LR_VALUE, "Illegal value",
LR_OPTION, "Unknown nameserver option",
LR_UNKNOWN, "Unknown nameserver command",
LR_NOKEY, "No indexed field found in nameserver query",
LR_AUTH, "No authorization for nameserver request",
LR_READONLY, "Nameserver operation failed; database is read-only",
LR_LIMIT, "Too many nameserver entries selected for change",
LR_HISTORY, "History substitution failed",
LR_SYNTAX, "Syntax error",
LR_AMBIGUOUS, "Multiple matches found for nameserver query",
NONE_OF_ABOVE, (char *)NULL
};
/*
* Field types returned by QI. These must be sorted in lexographic order.
*/
#define ADDRESS 0
#define ALIAS 1
#define ALL 2
#define BIRTHDAY 3
#define CALLSIGN 4
#define CLASSCO 5
#define CURRICULUM 6
#define DEF_ACCOUNT 7
#define DEPARTMENT 8
#define EMAIL 9
#define FAMILY 10
#define HERO 11
#define HOME_ADDRESS 12
#define HOURS 13
#define ID 14
#define MAILCODE 15
#define MAIL_ADDRESS 16
#define NAME 17
#define NICKNAME 18
#define OFFICE_ADDRESS 19
#define OTHER 20
#define PAGER 21
#define PASSWORD 22
#define PERMANENT_ADDRESS 23
#define PHONE 24
#define PROJECT 25
#define PROXY 26
#define REVISIONS 27
#define SOUND 28
#define TITLE 29
#define TYPE 30
struct QI_fields {
int key;
char *value;
} Fields[] = {
ADDRESS, "address",
ALIAS, "alias",
ALL, "all",
BIRTHDAY, "birthday",
CALLSIGN, "callsign",
CLASSCO, "classco",
CURRICULUM, "curriculum",
DEF_ACCOUNT, "def_account",
DEPARTMENT, "department",
EMAIL, "email",
FAMILY, "family",
HERO, "hero",
HOME_ADDRESS, "home_address",
HOURS, "hours",
ID, "id",
MAIL_ADDRESS, "mail_address",
MAILCODE, "mailcode",
NAME, "name",
NICKNAME, "nickname",
OFFICE_ADDRESS, "office_address",
OTHER, "other",
PAGER, "pager",
PASSWORD, "password",
PERMANENT_ADDRESS, "permanent_address",
PHONE, "phone",
PROJECT, "project",
PROXY, "proxy",
REVISIONS, "revisions",
SOUND, "sound",
TITLE, "title",
TYPE, "type",
NONE_OF_ABOVE, (char *)NULL
};
struct QI_response {
int code;
int subcode;
int field;
char *message;
};
typedef struct QI_response QIR;
struct NewAddress {
char *original;
char *new;
int code;
QIR *QIalt;
};
typedef struct NewAddress NADD;