1 diff -uNr exim-3.31/exim-texinfo-3.30/doc/spec.texinfo exim-3.31-whoson/exim-texinfo-3.30/doc/spec.texinfo
2 --- exim-3.31/exim-texinfo-3.30/doc/spec.texinfo Thu Jul 19 18:41:19 2001
3 +++ exim-3.31-whoson/exim-texinfo-3.30/doc/spec.texinfo Thu Jul 19 18:40:46 2001
11 which means that only linear searching and DBM lookups are included by default.
12 @@ -3758,6 +3759,17 @@
13 "More about dnsdb" below.
16 +@dfn{whoson}: This is the lookup type that performs lookups for relay allowed
17 +dialups using WHOSON (pop before smtp) service. You have to give it an IP
18 +address of host in question. It returns username associated in WHOSON database
19 +with queried IP address, or nothing, if given IP is unknown. Primary use is:
23 +host_relay_accept = localhost : net-whoson;$key
27 @dfn{testdb}: This is a lookup type which is for use in debugging Exim. It is
28 not likely to be useful in normal operation.
30 diff -uNr exim-3.31/scripts/MakeLinks exim-3.31-whoson/scripts/MakeLinks
31 --- exim-3.31/scripts/MakeLinks Mon Jul 2 11:46:41 2001
32 +++ exim-3.31-whoson/scripts/MakeLinks Thu Jul 19 18:28:52 2001
34 ln -s ../../src/lookups/pgsql.c pgsql.c
35 ln -s ../../src/lookups/testdb.h testdb.h
36 ln -s ../../src/lookups/testdb.c testdb.c
37 +ln -s ../../src/lookups/whoson.h whoson.h
38 +ln -s ../../src/lookups/whoson.c whoson.c
41 # Likewise for the code for the directors
42 diff -uNr exim-3.31/src/EDITME exim-3.31-whoson/src/EDITME
43 --- exim-3.31/src/EDITME Thu Jul 19 18:41:19 2001
44 +++ exim-3.31-whoson/src/EDITME Thu Jul 19 18:28:52 2001
46 # USE_TCP_WRAPPERS=yes
51 diff -uNr exim-3.31/src/config.h.defaults exim-3.31-whoson/src/config.h.defaults
52 --- exim-3.31/src/config.h.defaults Mon Jul 2 11:46:41 2001
53 +++ exim-3.31-whoson/src/config.h.defaults Thu Jul 19 18:28:52 2001
57 /* End of config.h.defaults */
59 +#define LOOKUP_WHOSON
60 diff -uNr exim-3.31/src/drtables.c exim-3.31-whoson/src/drtables.c
61 --- exim-3.31/src/drtables.c Mon Jul 2 11:46:42 2001
62 +++ exim-3.31-whoson/src/drtables.c Thu Jul 19 18:28:52 2001
64 #include "lookups/testdb.h"
68 +#include "lookups/whoson.h"
72 /* The second field in each item below is a set of bit flags:
75 NULL, /* no close function */
76 NULL, /* no tidy function */
77 NULL /* no quoting function */
83 + "whoson", /* lookup name */
84 + lookup_querystyle, /* query-style lookup */
85 + whoson_open, /* open function */
86 + NULL, /* check function */
87 + whoson_find, /* find function */
88 + NULL, /* no close function */
89 + NULL, /* no tidy function */
90 + NULL /* no quoting function */
94 diff -uNr exim-3.31/src/lookups/Makefile exim-3.31-whoson/src/lookups/Makefile
95 --- exim-3.31/src/lookups/Makefile Mon Jul 2 11:46:43 2001
96 +++ exim-3.31-whoson/src/lookups/Makefile Thu Jul 19 18:28:52 2001
98 # defined, dummy modules get compiled.
100 OBJ = cdb.o dbmdb.o dnsdb.o ldap.o lsearch.o mysql.o nis.o nisplus.o pgsql.o \
107 nisplus.o: $(HDRS) nisplus.c nisplus.h
108 pgsql.o: $(HDRS) pgsql.c pgsql.h
109 testdb.o: $(HDRS) testdb.c testdb.h
110 +whoson.o: $(HDRS) whoson.c whoson.h
113 diff -uNr exim-3.31/src/lookups/whoson.c exim-3.31-whoson/src/lookups/whoson.c
114 --- exim-3.31/src/lookups/whoson.c Thu Jan 1 01:00:00 1970
115 +++ exim-3.31-whoson/src/lookups/whoson.c Thu Jul 19 18:28:52 2001
117 +/*************************************************
118 +* Exim - an Internet mail transport agent *
119 +*************************************************/
121 +/* Copyright (c) University of Cambridge 1995 - 2001 */
122 +/* See the file NOTICE for conditions of use and distribution. */
126 +#include "../exim.h"
130 +/*************************************************
131 +* Open entry point *
132 +*************************************************/
134 +/* See local README for interface description. */
137 +whoson_open(char *filename, char **errmsg)
139 +filename = filename; /* Keep picky compilers happy */
141 +return (void *)(1); /* Just return something non-null */
146 +/*************************************************
147 +* Find entry point *
148 +*************************************************/
150 +/* See local README for interface description. */
153 +whoson_find(void *handle, char *filename, char *query, int length,
154 + char **result, char **errmsg)
157 +handle = handle; /* Keep picky compilers happy */
158 +filename = filename;
162 +switch (wso_query(query,buffer,80)) {
164 + *result = string_copy(buffer);
173 +/* End of lookups/whoson.c */
174 diff -uNr exim-3.31/src/lookups/whoson.h exim-3.31-whoson/src/lookups/whoson.h
175 --- exim-3.31/src/lookups/whoson.h Thu Jan 1 01:00:00 1970
176 +++ exim-3.31-whoson/src/lookups/whoson.h Thu Jul 19 18:28:52 2001
178 +/*************************************************
179 +* Exim - an Internet mail transport agent *
180 +*************************************************/
182 +/* Copyright (c) University of Cambridge 1995 - 2001 */
183 +/* See the file NOTICE for conditions of use and distribution. */
185 +/* Header for the whoson lookup */
187 +extern void *whoson_open(char *, char **);
188 +extern int whoson_find(void *, char *, char *, int, char **, char **);
190 +/* End of lookups/whoson.h */