SPDX: Mass-update to GPL-2.0-or-later
[exim.git] / src / src / routers / redirect.h
1 /*************************************************
2 *     Exim - an Internet mail transport agent    *
3 *************************************************/
4
5 /* Copyright (c) The Exim Maintainers 2021 - 2022 */
6 /* Copyright (c) University of Cambridge 1995 - 2009 */
7 /* See the file NOTICE for conditions of use and distribution. */
8 /* SPDX-License-Identifier: GPL-2.0-or-later */
9
10 /* Header for the redirect router */
11
12 /* Private structure for the private options. */
13
14 typedef struct {
15   transport_instance *directory_transport;
16   transport_instance *file_transport;
17   transport_instance *pipe_transport;
18   transport_instance *reply_transport;
19
20   uschar *data;
21   uschar *directory_transport_name;
22   uschar *file;
23   uschar *file_dir;
24   uschar *file_transport_name;
25   uschar *include_directory;
26   uschar *pipe_transport_name;
27   uschar *reply_transport_name;
28   uschar *sieve_subaddress;
29   uschar *sieve_useraddress;
30   uschar *sieve_vacation_directory;
31   uschar *sieve_enotify_mailto_owner;
32   uschar *syntax_errors_text;
33   uschar *syntax_errors_to;
34   uschar *qualify_domain;
35
36   uid_t  *owners;
37   gid_t  *owngroups;
38
39   int   modemask;
40   int   bit_options;
41   BOOL  check_ancestor;
42   BOOL  check_group;
43   BOOL  check_owner;
44   BOOL  forbid_file;
45   BOOL  forbid_filter_reply;
46   BOOL  forbid_pipe;
47   BOOL  forbid_smtp_code;
48   BOOL  hide_child_in_errmsg;
49   BOOL  one_time;
50   BOOL  qualify_preserve_domain;
51   BOOL  skip_syntax_errors;
52 } redirect_router_options_block;
53
54 /* Data for reading the private options. */
55
56 extern optionlist redirect_router_options[];
57 extern int redirect_router_options_count;
58
59 /* Block containing default values. */
60
61 extern redirect_router_options_block redirect_router_option_defaults;
62
63 /* The main and initialization entry points for the router */
64
65 extern int redirect_router_entry(router_instance *, address_item *,
66   struct passwd *, int, address_item **, address_item **,
67   address_item **, address_item **);
68
69 extern void redirect_router_init(router_instance *);
70
71 /* End of routers/redirect.h */