Update version number and copyright year.
[exim.git] / src / src / drtables.c
1 /* $Cambridge: exim/src/src/drtables.c,v 1.8 2007/01/08 10:50:18 ph10 Exp $ */
2
3 /*************************************************
4 *     Exim - an Internet mail transport agent    *
5 *************************************************/
6
7 /* Copyright (c) University of Cambridge 1995 - 2007 */
8 /* See the file NOTICE for conditions of use and distribution. */
9
10
11 #include "exim.h"
12
13
14 /* This module contains tables that define the lookup methods and drivers
15 that are actually included in the binary. Its contents are controlled by
16 various macros in config.h that ultimately come from Local/Makefile. They are
17 all described in src/EDITME. */
18
19
20 /* The OSF1 (Digital Unix) linker puts out a worrying warning if any sections
21 contain no executable code. It says
22
23 Warning: Linking some objects which contain exception information sections
24         and some which do not. This may cause fatal runtime exception handling
25         problems.
26
27 As this may cause people to worry needlessly, include a dummy function here
28 to stop the message from appearing. Make it call itself to stop picky compilers
29 compilers complaining that it is unused, and put in a dummy argument to stop
30 even pickier compilers complaining about infinite loops. */
31
32 static void dummy(int x) { dummy(x-1); }
33
34
35 /* Table of information about all possible lookup methods. The entries are
36 always present, but the "open" and "find" functions are set to NULL for those
37 that are not compiled into the binary. The "check" and "close" functions can
38 be NULL for methods that don't need them. */
39
40 #ifdef LOOKUP_CDB
41 #include "lookups/cdb.h"
42 #endif
43
44 #ifdef LOOKUP_DBM
45 #include "lookups/dbmdb.h"
46 #endif
47
48 #ifdef LOOKUP_DNSDB
49 #include "lookups/dnsdb.h"
50 #endif
51
52 #ifdef LOOKUP_DSEARCH
53 #include "lookups/dsearch.h"
54 #endif
55
56 #ifdef LOOKUP_IBASE
57 #include "lookups/ibase.h"
58 #endif
59
60 #ifdef LOOKUP_LDAP
61 #include "lookups/ldap.h"
62 #endif
63
64 #ifdef LOOKUP_LSEARCH
65 #include "lookups/lsearch.h"
66 #endif
67
68 #ifdef LOOKUP_MYSQL
69 #include "lookups/mysql.h"
70 #endif
71
72 #ifdef LOOKUP_NIS
73 #include "lookups/nis.h"
74 #endif
75
76 #ifdef LOOKUP_NISPLUS
77 #include "lookups/nisplus.h"
78 #endif
79
80 #ifdef LOOKUP_ORACLE
81 #include "lookups/oracle.h"
82 #endif
83
84 #ifdef LOOKUP_PASSWD
85 #include "lookups/passwd.h"
86 #endif
87
88 #ifdef LOOKUP_PGSQL
89 #include "lookups/pgsql.h"
90 #endif
91
92 #ifdef EXPERIMENTAL_SPF
93 #include "lookups/spf.h"
94 #endif
95
96 #ifdef LOOKUP_SQLITE
97 #include "lookups/sqlite.h"
98 #endif
99
100 #ifdef LOOKUP_TESTDB
101 #include "lookups/testdb.h"
102 #endif
103
104 #ifdef LOOKUP_WHOSON
105 #include "lookups/whoson.h"
106 #endif
107
108 /* The second field in each item below is a set of bit flags:
109
110   lookup_querystyle     => this is a query-style lookup,
111                              else single-key (+ file) style
112   lookup_absfile        => an absolute file name is required,
113                              (for single-key style only)
114
115 This list must be in alphabetical order of lookup name because it is
116 searched by binary chop, having got rather large for the original linear
117 searching. */
118
119 lookup_info lookup_list[] = {
120
121 /* cdb lookup in single file */
122
123   {
124   US"cdb",                       /* lookup name */
125   lookup_absfile,                /* uses absolute file name */
126 #ifdef LOOKUP_CDB
127   cdb_open,                      /* open function */
128   cdb_check,                     /* check function */
129   cdb_find,                      /* find function */
130   cdb_close,                     /* close function */
131   NULL,                          /* no tidy function */
132   NULL                           /* no quoting function */
133 #else
134   NULL, NULL, NULL, NULL, NULL, NULL /* lookup not present */
135 #endif
136   },
137
138 /* DBM file lookup; called "dbm" because that is the name in Exim,
139 but the code is called dbmdb to avoid name clashes. */
140
141   {
142   US"dbm",                       /* lookup name */
143   lookup_absfile,                /* uses absolute file name */
144 #ifdef LOOKUP_DBM
145   dbmdb_open,                    /* open function */
146   dbmdb_check,                   /* check function */
147   dbmdb_find,                    /* find function */
148   dbmdb_close,                   /* close function */
149   NULL,                          /* no tidy function */
150   NULL                           /* no quoting function */
151 #else
152   NULL, NULL, NULL, NULL, NULL, NULL /* lookup not present */
153 #endif
154   },
155
156 /* This variant of DBM does not include the binary zero on the end
157 of the key strings. */
158
159   {
160   US"dbmnz",                     /* lookup name */
161   lookup_absfile,                /* uses absolute file name */
162 #ifdef LOOKUP_DBM
163   dbmdb_open,      /* sic */     /* open function */
164   dbmdb_check,     /* sic */     /* check function */
165   dbmnz_find,                    /* find function */
166   dbmdb_close,     /* sic */     /* close function */
167   NULL,                          /* no tidy function */
168   NULL                           /* no quoting function */
169 #else
170   NULL, NULL, NULL, NULL, NULL, NULL /* lookup not present */
171 #endif
172   },
173
174 /* Using DNS TXT records as a database */
175
176   {
177   US"dnsdb",                     /* lookup name */
178   lookup_querystyle,             /* query style */
179 #ifdef LOOKUP_DNSDB
180   dnsdb_open,                    /* open function */
181   NULL,                          /* check function */
182   dnsdb_find,                    /* find function */
183   NULL,                          /* no close function */
184   NULL,                          /* no tidy function */
185   NULL                           /* no quoting function */
186 #else
187   NULL, NULL, NULL, NULL, NULL, NULL /* lookup not present */
188 #endif
189   },
190
191 /* Search of files in a directory */
192
193   {
194   US"dsearch",                   /* lookup name */
195   lookup_absfile,                /* uses absolute file name */
196 #ifdef LOOKUP_DSEARCH
197   dsearch_open,                  /* open function */
198   dsearch_check,                 /* check function */
199   dsearch_find,                  /* find function */
200   dsearch_close,                 /* close function */
201   NULL,                          /* no tidy function */
202   NULL                           /* no quoting function */
203 #else
204   NULL, NULL, NULL, NULL, NULL, NULL /* lookup not present */
205 #endif
206   },
207
208 /* Interbase lookup */
209
210   {
211   US"ibase",                     /* lookup name */
212   lookup_querystyle,             /* query-style lookup */
213 #ifdef LOOKUP_IBASE
214   ibase_open,                    /* open function */
215   NULL,                          /* no check function */
216   ibase_find,                    /* find function */
217   NULL,                          /* no close function */
218   ibase_tidy,                    /* tidy function */
219   ibase_quote                    /* quoting function */
220 #else
221   NULL, NULL, NULL, NULL, NULL, NULL /* lookup not present */
222 #endif
223   },
224
225 /* Linear search of single file with ip-addresses and networks; shares many
226 functions with lsearch. */
227
228   {
229   US"iplsearch",                 /* lookup name */
230   lookup_absfile,                /* uses absolute file name */
231 #ifdef LOOKUP_LSEARCH
232   lsearch_open,                  /* open function */
233   lsearch_check,                 /* check function */
234   iplsearch_find,                /* find function */
235   lsearch_close,                 /* close function */
236   NULL,                          /* no tidy function */
237   NULL                           /* no quoting function */
238 #else
239   NULL, NULL, NULL, NULL, NULL, NULL /* lookup not present */
240 #endif
241   },
242
243 /* LDAP lookup, allowing data from only one entry to be returned */
244
245   {
246   US"ldap",                      /* lookup name */
247   lookup_querystyle,             /* query-style lookup */
248 #ifdef LOOKUP_LDAP
249   eldap_open,                    /* open function */
250   NULL,                          /* check function */
251   eldap_find,                    /* find function */
252   NULL,                          /* no close function */
253   eldap_tidy,                    /* tidy function */
254   eldap_quote                    /* quoting function */
255 #else
256   NULL, NULL, NULL, NULL, NULL, NULL /* lookup not present */
257 #endif
258   },
259
260 /* LDAP lookup, allowing the DN from more one entry to be returned */
261
262   {
263   US"ldapdn",                     /* lookup name */
264   lookup_querystyle,             /* query-style lookup */
265 #ifdef LOOKUP_LDAP
266   eldap_open,       /* sic */    /* open function */
267   NULL,                          /* check function */
268   eldapdn_find,                  /* find function */
269   NULL,                          /* no close function */
270   eldap_tidy,       /* sic */    /* tidy function */
271   eldap_quote       /* sic */    /* quoting function */
272 #else
273   NULL, NULL, NULL, NULL, NULL, NULL /* lookup not present */
274 #endif
275   },
276
277 /* LDAP lookup, allowing data from more than one entry to be returned */
278
279   {
280   US"ldapm",                     /* lookup name */
281   lookup_querystyle,             /* query-style lookup */
282 #ifdef LOOKUP_LDAP
283   eldap_open,       /* sic */    /* open function */
284   NULL,                          /* check function */
285   eldapm_find,                   /* find function */
286   NULL,                          /* no close function */
287   eldap_tidy,       /* sic */    /* tidy function */
288   eldap_quote       /* sic */    /* quoting function */
289 #else
290   NULL, NULL, NULL, NULL, NULL, NULL /* lookup not present */
291 #endif
292   },
293
294 /* Linear search of single file */
295
296   {
297   US"lsearch",                   /* lookup name */
298   lookup_absfile,                /* uses absolute file name */
299 #ifdef LOOKUP_LSEARCH
300   lsearch_open,                  /* open function */
301   lsearch_check,                 /* check function */
302   lsearch_find,                  /* find function */
303   lsearch_close,                 /* close function */
304   NULL,                          /* no tidy function */
305   NULL                           /* no quoting function */
306 #else
307   NULL, NULL, NULL, NULL, NULL, NULL /* lookup not present */
308 #endif
309   },
310
311 /* MYSQL lookup */
312
313   {
314   US"mysql",                     /* lookup name */
315   lookup_querystyle,             /* query-style lookup */
316 #ifdef LOOKUP_MYSQL
317   mysql_open,                    /* open function */
318   NULL,                          /* no check function */
319   mysql_find,                    /* find function */
320   NULL,                          /* no close function */
321   mysql_tidy,                    /* tidy function */
322   mysql_quote                    /* quoting function */
323 #else
324   NULL, NULL, NULL, NULL, NULL, NULL /* lookup not present */
325 #endif
326   },
327
328 /* NIS lookup, excluding trailing 0 from key */
329
330   {
331   US"nis",                       /* lookup name */
332   0,                             /* not abs file, not query style*/
333 #ifdef LOOKUP_NIS
334   nis_open,                      /* open function */
335   NULL,                          /* check function */
336   nis_find,                      /* find function */
337   NULL,                          /* no close function */
338   NULL,                          /* no tidy function */
339   NULL                           /* no quoting function */
340 #else
341   NULL, NULL, NULL, NULL, NULL, NULL /* lookup not present */
342 #endif
343   },
344
345 /* NIS lookup, including trailing 0 in key */
346
347   {
348   US"nis0",                      /* lookup name */
349   0,                             /* not absfile, not query style */
350 #ifdef LOOKUP_NIS
351   nis_open,    /* sic */         /* open function */
352   NULL,                          /* check function */
353   nis0_find,                     /* find function */
354   NULL,                          /* no close function */
355   NULL,                          /* no tidy function */
356   NULL                           /* no quoting function */
357 #else
358   NULL, NULL, NULL, NULL, NULL, NULL /* lookup not present */
359 #endif
360   },
361
362 /* NIS+ lookup */
363
364   {
365   US"nisplus",                   /* lookup name */
366   lookup_querystyle,             /* query-style lookup */
367 #ifdef LOOKUP_NISPLUS
368   nisplus_open,                  /* open function */
369   NULL,                          /* check function */
370   nisplus_find,                  /* find function */
371   NULL,                          /* no close function */
372   NULL,                          /* no tidy function */
373   nisplus_quote                  /* quoting function */
374 #else
375   NULL, NULL, NULL, NULL, NULL, NULL /* lookup not present */
376 #endif
377   },
378
379 /* Linear search of single file, with wildcarding but no pattern expansion.
380 Shares many functions with lsearch. */
381
382   {
383   US"nwildlsearch",              /* lookup name */
384   lookup_absfile,                /* uses absolute file name */
385 #ifdef LOOKUP_LSEARCH
386   lsearch_open,                  /* open function */
387   lsearch_check,                 /* check function */
388   nwildlsearch_find,             /* find function */
389   lsearch_close,                 /* close function */
390   NULL,                          /* no tidy function */
391   NULL                           /* no quoting function */
392 #else
393   NULL, NULL, NULL, NULL, NULL, NULL /* lookup not present */
394 #endif
395   },
396
397 /* Oracle lookup */
398
399   {
400   US"oracle",                    /* lookup name */
401   lookup_querystyle,             /* query-style lookup */
402 #ifdef LOOKUP_ORACLE
403   oracle_open,                   /* open function */
404   NULL,                          /* check function */
405   oracle_find,                   /* find function */
406   NULL,                          /* no close function */
407   oracle_tidy,                   /* tidy function */
408   oracle_quote                   /* quoting function */
409 #else
410   NULL, NULL, NULL, NULL, NULL, NULL /* lookup not present */
411 #endif
412   },
413
414 /* passwd lookup */
415
416   {
417   US"passwd",                    /* lookup name */
418   lookup_querystyle,             /* query-style lookup */
419 #ifdef LOOKUP_PASSWD
420   passwd_open,                   /* open function */
421   NULL,                          /* no check function */
422   passwd_find,                   /* find function */
423   NULL,                          /* no close function */
424   NULL,                          /* no tidy function */
425   NULL                           /* no quoting function */
426 #else
427   NULL, NULL, NULL, NULL, NULL, NULL   /* lookup not present */
428 #endif
429   },
430
431 /* PGSQL lookup */
432
433   {
434   US"pgsql",                     /* lookup name */
435   lookup_querystyle,             /* query-style lookup */
436 #ifdef LOOKUP_PGSQL
437   pgsql_open,                    /* open function */
438   NULL,                          /* no check function */
439   pgsql_find,                    /* find function */
440   NULL,                          /* no close function */
441   pgsql_tidy,                    /* tidy function */
442   pgsql_quote                    /* quoting function */
443 #else
444   NULL, NULL, NULL, NULL, NULL, NULL   /* lookup not present */
445 #endif
446   },
447
448 /* SPF lookup */
449
450   {
451   US"spf",                       /* lookup name */
452   0,                             /* not absfile, not query style */
453 #ifdef EXPERIMENTAL_SPF
454   spf_open,                      /* open function */
455   NULL,                          /* no check function */
456   spf_find,                      /* find function */
457   spf_close,                     /* close function */
458   NULL,                          /* no tidy function */
459   NULL                           /* no quoting function */
460 #else
461   NULL, NULL, NULL, NULL, NULL, NULL /* lookup not present */
462 #endif
463   },
464
465 /* sqlite lookup */
466
467   {
468   US"sqlite",                    /* lookup name */
469   lookup_absfilequery,           /* query-style lookup, starts with file name */
470 #ifdef LOOKUP_SQLITE
471   sqlite_open,                   /* open function */
472   NULL,                          /* no check function */
473   sqlite_find,                   /* find function */
474   sqlite_close,                  /* close function */
475   NULL,                          /* no tidy function */
476   sqlite_quote                   /* quoting function */
477 #else
478   NULL, NULL, NULL, NULL, NULL, NULL /* lookup not present */
479 #endif
480   },
481
482 /* Testdb lookup is for testing Exim, not useful for normal running.
483 For that reason, we omit the entry entirely when not building it into
484 the binary, so that attempts to use it give "unknown lookup type" instead
485 of "lookup type not available". */
486
487 #ifdef LOOKUP_TESTDB
488   {
489   US"testdb",                    /* lookup name */
490   lookup_querystyle,             /* query-style lookup */
491   testdb_open,                   /* open function */
492   NULL,                          /* check function */
493   testdb_find,                   /* find function */
494   NULL,                          /* no close function */
495   NULL,                          /* no tidy function */
496   NULL                           /* no quoting function */
497   },
498 #endif
499
500 /* "Whoson" lookup */
501
502   {
503   US"whoson",                    /* lookup name */
504   lookup_querystyle,             /* query-style lookup */
505 #ifdef LOOKUP_WHOSON
506   whoson_open,                   /* open function */
507   NULL,                          /* check function */
508   whoson_find,                   /* find function */
509   NULL,                          /* no close function */
510   NULL,                          /* no tidy function */
511   NULL                           /* no quoting function */
512 #else
513   NULL, NULL, NULL, NULL, NULL, NULL   /* lookup not present */
514 #endif
515   },
516
517 /* Linear search of single file, with wildcarding and pattern expansion. Shares
518 many functions with lsearch. */
519
520   {
521   US"wildlsearch",               /* lookup name */
522   lookup_absfile,                /* uses absolute file name */
523 #ifdef LOOKUP_LSEARCH
524   lsearch_open,                  /* open function */
525   lsearch_check,                 /* check function */
526   wildlsearch_find,              /* find function */
527   lsearch_close,                 /* close function */
528   NULL,                          /* no tidy function */
529   NULL                           /* no quoting function */
530 #else
531   NULL, NULL, NULL, NULL, NULL, NULL /* lookup not present */
532 #endif
533   }
534 };
535
536 /* Number of entries in the list */
537
538 int lookup_list_count = sizeof(lookup_list)/sizeof(lookup_info);
539
540
541
542 /* Table of information about all possible authentication mechamisms. All
543 entries are always present if any mechanism is declared, but the functions are
544 set to NULL for those that are not compiled into the binary. */
545
546 #ifdef AUTH_CRAM_MD5
547 #include "auths/cram_md5.h"
548 #endif
549
550 #ifdef AUTH_CYRUS_SASL
551 #include "auths/cyrus_sasl.h"
552 #endif
553
554 #ifdef AUTH_DOVECOT
555 #include "auths/dovecot.h"
556 #endif
557
558 #ifdef AUTH_PLAINTEXT
559 #include "auths/plaintext.h"
560 #endif
561
562 #ifdef AUTH_SPA
563 #include "auths/spa.h"
564 #endif
565
566 auth_info auths_available[] = {
567
568 /* Checking by an expansion condition on plain text */
569
570 #ifdef AUTH_CRAM_MD5
571   {
572   US"cram_md5",                              /* lookup name */
573   auth_cram_md5_options,
574   &auth_cram_md5_options_count,
575   &auth_cram_md5_option_defaults,
576   sizeof(auth_cram_md5_options_block),
577   auth_cram_md5_init,                        /* init function */
578   auth_cram_md5_server,                      /* server function */
579   auth_cram_md5_client                       /* client function */
580   },
581 #endif
582
583 #ifdef AUTH_CYRUS_SASL
584   {
585   US"cyrus_sasl",           /* lookup name */
586   auth_cyrus_sasl_options,
587   &auth_cyrus_sasl_options_count,
588   &auth_cyrus_sasl_option_defaults,
589   sizeof(auth_cyrus_sasl_options_block),
590   auth_cyrus_sasl_init,                      /* init function */
591   auth_cyrus_sasl_server,                    /* server function */
592   NULL                                       /* client function */
593   },
594 #endif
595
596 #ifdef AUTH_DOVECOT
597   {
598   US"dovecot",                                /* lookup name */
599   auth_dovecot_options,
600   &auth_dovecot_options_count,
601   &auth_dovecot_option_defaults,
602   sizeof(auth_dovecot_options_block),
603   auth_dovecot_init,                          /* init function */
604   auth_dovecot_server,                        /* server function */
605   NULL                                        /* client function */
606   },
607 #endif
608
609 #ifdef AUTH_PLAINTEXT
610   {
611   US"plaintext",                             /* lookup name */
612   auth_plaintext_options,
613   &auth_plaintext_options_count,
614   &auth_plaintext_option_defaults,
615   sizeof(auth_plaintext_options_block),
616   auth_plaintext_init,                       /* init function */
617   auth_plaintext_server,                     /* server function */
618   auth_plaintext_client                      /* client function */
619   },
620 #endif
621
622 #ifdef AUTH_SPA
623   {
624   US"spa",                                   /* lookup name */
625   auth_spa_options,
626   &auth_spa_options_count,
627   &auth_spa_option_defaults,
628   sizeof(auth_spa_options_block),
629   auth_spa_init,                             /* init function */
630   auth_spa_server,                           /* server function */
631   auth_spa_client                            /* client function */
632   },
633 #endif
634
635 { US"", NULL, NULL, NULL, 0, NULL, NULL, NULL  }
636 };
637
638
639 /* Tables of information about which routers and transports are included in the
640 exim binary. */
641
642 /* Pull in the necessary header files */
643
644 #include "routers/rf_functions.h"
645
646 #ifdef ROUTER_ACCEPT
647 #include "routers/accept.h"
648 #endif
649
650 #ifdef ROUTER_DNSLOOKUP
651 #include "routers/dnslookup.h"
652 #endif
653
654 #ifdef ROUTER_MANUALROUTE
655 #include "routers/manualroute.h"
656 #endif
657
658 #ifdef ROUTER_IPLITERAL
659 #include "routers/ipliteral.h"
660 #endif
661
662 #ifdef ROUTER_IPLOOKUP
663 #include "routers/iplookup.h"
664 #endif
665
666 #ifdef ROUTER_QUERYPROGRAM
667 #include "routers/queryprogram.h"
668 #endif
669
670 #ifdef ROUTER_REDIRECT
671 #include "routers/redirect.h"
672 #endif
673
674 #ifdef TRANSPORT_APPENDFILE
675 #include "transports/appendfile.h"
676 #endif
677
678 #ifdef TRANSPORT_AUTOREPLY
679 #include "transports/autoreply.h"
680 #endif
681
682 #ifdef TRANSPORT_LMTP
683 #include "transports/lmtp.h"
684 #endif
685
686 #ifdef TRANSPORT_PIPE
687 #include "transports/pipe.h"
688 #endif
689
690 #ifdef TRANSPORT_SMTP
691 #include "transports/smtp.h"
692 #endif
693
694
695 /* Now set up the structures, terminated by an entry with a null name. */
696
697 router_info routers_available[] = {
698 #ifdef ROUTER_ACCEPT
699   {
700   US"accept",
701   accept_router_options,
702   &accept_router_options_count,
703   &accept_router_option_defaults,
704   sizeof(accept_router_options_block),
705   accept_router_init,
706   accept_router_entry,
707   NULL,     /* no tidyup entry */
708   ri_yestransport
709   },
710 #endif
711 #ifdef ROUTER_DNSLOOKUP
712   {
713   US"dnslookup",
714   dnslookup_router_options,
715   &dnslookup_router_options_count,
716   &dnslookup_router_option_defaults,
717   sizeof(dnslookup_router_options_block),
718   dnslookup_router_init,
719   dnslookup_router_entry,
720   NULL,     /* no tidyup entry */
721   ri_yestransport
722   },
723 #endif
724 #ifdef ROUTER_IPLITERAL
725   {
726   US"ipliteral",
727   ipliteral_router_options,
728   &ipliteral_router_options_count,
729   &ipliteral_router_option_defaults,
730   sizeof(ipliteral_router_options_block),
731   ipliteral_router_init,
732   ipliteral_router_entry,
733   NULL,     /* no tidyup entry */
734   ri_yestransport
735   },
736 #endif
737 #ifdef ROUTER_IPLOOKUP
738   {
739   US"iplookup",
740   iplookup_router_options,
741   &iplookup_router_options_count,
742   &iplookup_router_option_defaults,
743   sizeof(iplookup_router_options_block),
744   iplookup_router_init,
745   iplookup_router_entry,
746   NULL,     /* no tidyup entry */
747   ri_notransport
748   },
749 #endif
750 #ifdef ROUTER_MANUALROUTE
751   {
752   US"manualroute",
753   manualroute_router_options,
754   &manualroute_router_options_count,
755   &manualroute_router_option_defaults,
756   sizeof(manualroute_router_options_block),
757   manualroute_router_init,
758   manualroute_router_entry,
759   NULL,     /* no tidyup entry */
760   0
761   },
762 #endif
763 #ifdef ROUTER_QUERYPROGRAM
764   {
765   US"queryprogram",
766   queryprogram_router_options,
767   &queryprogram_router_options_count,
768   &queryprogram_router_option_defaults,
769   sizeof(queryprogram_router_options_block),
770   queryprogram_router_init,
771   queryprogram_router_entry,
772   NULL,     /* no tidyup entry */
773   0
774   },
775 #endif
776 #ifdef ROUTER_REDIRECT
777   {
778   US"redirect",
779   redirect_router_options,
780   &redirect_router_options_count,
781   &redirect_router_option_defaults,
782   sizeof(redirect_router_options_block),
783   redirect_router_init,
784   redirect_router_entry,
785   NULL,     /* no tidyup entry */
786   ri_notransport
787   },
788 #endif
789 { US"", NULL, NULL, NULL, 0, NULL, NULL, NULL, 0 }
790 };
791
792
793
794 transport_info transports_available[] = {
795 #ifdef TRANSPORT_APPENDFILE
796   {
797   US"appendfile",                              /* driver name */
798   appendfile_transport_options,                /* local options table */
799   &appendfile_transport_options_count,         /* number of entries */
800   &appendfile_transport_option_defaults,       /* private options defaults */
801   sizeof(appendfile_transport_options_block),  /* size of private block */
802   appendfile_transport_init,                   /* init entry point */
803   appendfile_transport_entry,                  /* main entry point */
804   NULL,                                        /* no tidyup entry */
805   NULL,                                        /* no closedown entry */
806   TRUE,                                        /* local flag */
807   },
808 #endif
809 #ifdef TRANSPORT_AUTOREPLY
810   {
811   US"autoreply",                               /* driver name */
812   autoreply_transport_options,                 /* local options table */
813   &autoreply_transport_options_count,          /* number of entries */
814   &autoreply_transport_option_defaults,        /* private options defaults */
815   sizeof(autoreply_transport_options_block),   /* size of private block */
816   autoreply_transport_init,                    /* init entry point */
817   autoreply_transport_entry,                   /* main entry point */
818   NULL,                                        /* no tidyup entry */
819   NULL,                                        /* no closedown entry */
820   TRUE                                         /* local flag */
821   },
822 #endif
823 #ifdef TRANSPORT_LMTP
824   {
825   US"lmtp",                                    /* driver name */
826   lmtp_transport_options,                      /* local options table */
827   &lmtp_transport_options_count,               /* number of entries */
828   &lmtp_transport_option_defaults,             /* private options defaults */
829   sizeof(lmtp_transport_options_block),        /* size of private block */
830   lmtp_transport_init,                         /* init entry point */
831   lmtp_transport_entry,                        /* main entry point */
832   NULL,                                        /* no tidyup entry */
833   NULL,                                        /* no closedown entry */
834   TRUE                                         /* local flag */
835   },
836 #endif
837 #ifdef TRANSPORT_PIPE
838   {
839   US"pipe",                                    /* driver name */
840   pipe_transport_options,                      /* local options table */
841   &pipe_transport_options_count,               /* number of entries */
842   &pipe_transport_option_defaults,             /* private options defaults */
843   sizeof(pipe_transport_options_block),        /* size of private block */
844   pipe_transport_init,                         /* init entry point */
845   pipe_transport_entry,                        /* main entry point */
846   NULL,                                        /* no tidyup entry */
847   NULL,                                        /* no closedown entry */
848   TRUE                                         /* local flag */
849   },
850 #endif
851 #ifdef TRANSPORT_SMTP
852   {
853   US"smtp",                                    /* driver name */
854   smtp_transport_options,                      /* local options table */
855   &smtp_transport_options_count,               /* number of entries */
856   &smtp_transport_option_defaults,             /* private options defaults */
857   sizeof(smtp_transport_options_block),        /* size of private block */
858   smtp_transport_init,                         /* init entry point */
859   smtp_transport_entry,                        /* main entry point */
860   NULL,                                        /* no tidyup entry */
861   smtp_transport_closedown,                    /* close down passed channel */
862   FALSE                                        /* local flag */
863   },
864 #endif
865 { US"", NULL, NULL, NULL, 0, NULL, NULL, NULL, NULL, FALSE }
866 };
867
868 /* End of drtables.c */