Patrick Welche <prlw1@cam.ac.uk>
[netbsd-mini2440.git] / external / ibm-public / postfix / dist / src / trivial-rewrite / trivial-rewrite.h
blob799caafe23ab3581fc80a3fe5e0d4488ff02fe15
1 /* $NetBSD$ */
3 /*++
4 /* NAME
5 /* trivial-rewrite 3h
6 /* SUMMARY
7 /* mail address rewriter and resolver
8 /* SYNOPSIS
9 /* #include "trivial-rewrite.h"
10 /* DESCRIPTION
11 /* .nf
14 * Utility library.
16 #include <vstring.h>
17 #include <vstream.h>
20 * Global library.
22 #include <tok822.h>
23 #include <maps.h>
26 * Connection management.
28 int server_flags;
31 * rewrite.c
33 typedef struct {
34 const char *origin_name; /* name of variable */
35 char **origin; /* default origin */
36 const char *domain_name; /* name of variable */
37 char **domain; /* default domain */
38 } RWR_CONTEXT;
40 #define REW_PARAM_VALUE(x) (*(x)) /* make it easy to do it right */
42 extern void rewrite_init(void);
43 extern int rewrite_proto(VSTREAM *);
44 extern void rewrite_addr(RWR_CONTEXT *, char *, VSTRING *);
45 extern void rewrite_tree(RWR_CONTEXT *, TOK822 *);
46 extern RWR_CONTEXT local_context;
47 extern RWR_CONTEXT inval_context;
50 * resolve.c
52 typedef struct {
53 const char *local_transport_name; /* name of variable */
54 char **local_transport; /* local transport:nexthop */
55 const char *virt_transport_name; /* name of variable */
56 char **virt_transport; /* virtual mailbox transport:nexthop */
57 const char *relay_transport_name; /* name of variable */
58 char **relay_transport; /* relay transport:nexthop */
59 const char *def_transport_name; /* name of variable */
60 char **def_transport; /* default transport:nexthop */
61 const char *relayhost_name; /* name of variable */
62 char **relayhost; /* for relay and default transport */
63 const char *snd_relay_maps_name; /* name of variable */
64 char **snd_relay_maps; /* maptype:mapname */
65 MAPS *snd_relay_info; /* handle */
66 const char *transport_maps_name; /* name of variable */
67 char **transport_maps; /* maptype:mapname */
68 struct TRANSPORT_INFO *transport_info; /* handle */
69 } RES_CONTEXT;
71 #define RES_PARAM_VALUE(x) (*(x)) /* make it easy to do it right */
73 extern void resolve_init(void);
74 extern int resolve_proto(RES_CONTEXT *, VSTREAM *);
76 /* LICENSE
77 /* .ad
78 /* .fi
79 /* The Secure Mailer license must be distributed with this software.
80 /* AUTHOR(S)
81 /* Wietse Venema
82 /* IBM T.J. Watson Research
83 /* P.O. Box 704
84 /* Yorktown Heights, NY 10598, USA
85 /*--*/