Copyright updates:
[exim.git] / src / src / transports / appendfile.h
1 /*************************************************
2 *     Exim - an Internet mail transport agent    *
3 *************************************************/
4
5 /* Copyright (c) University of Cambridge 1995 - 2018 */
6 /* Copyright (c) The Exim Maintainers 2021 */
7 /* See the file NOTICE for conditions of use and distribution. */
8
9 /* Private structure for the private options. */
10
11 typedef struct {
12   uschar *filename;
13   uschar *dirname;
14   uschar *dirfilename;
15   uschar *message_prefix;
16   uschar *message_suffix;
17   uschar *create_file_string;
18   uschar *quota;
19   uschar *quota_directory;
20   uschar *quota_filecount;
21   uschar *quota_size_regex;
22   uschar *quota_warn_threshold;
23   uschar *mailbox_size_string;
24   uschar *mailbox_filecount_string;
25   uschar *expand_maildir_use_size_file;
26   uschar *maildir_dir_regex;
27   uschar *maildir_tag;
28   uschar *maildirfolder_create_regex;
29   uschar *mailstore_prefix;
30   uschar *mailstore_suffix;
31   uschar *check_string;
32   uschar *escape_string;
33   uschar *file_format;
34   off_t quota_value;
35   off_t quota_warn_threshold_value;
36   off_t mailbox_size_value;
37   int   mailbox_filecount_value;
38   int   quota_filecount_value;
39   int   mode;
40   int   dirmode;
41   int   lockfile_mode;
42   int   lockfile_timeout;
43   int   lock_fcntl_timeout;
44   int   lock_flock_timeout;
45   int   lock_retries;
46   int   lock_interval;
47   int   maildir_retries;
48   int   create_file;
49   int   options;
50   BOOL  allow_fifo;
51   BOOL  allow_symlink;
52   BOOL  check_group;
53   BOOL  check_owner;
54   BOOL  create_directory;
55   BOOL  notify_comsat;
56   BOOL  use_lockfile;
57   BOOL  set_use_lockfile;
58   BOOL  use_fcntl;
59   BOOL  set_use_fcntl;
60   BOOL  use_flock;
61   BOOL  set_use_flock;
62   BOOL  use_mbx_lock;
63   BOOL  set_use_mbx_lock;
64   BOOL  use_bsmtp;
65   BOOL  use_crlf;
66   BOOL  file_must_exist;
67   BOOL  mode_fail_narrower;
68   BOOL  maildir_format;
69   BOOL  maildir_use_size_file;
70   BOOL  mailstore_format;
71   BOOL  mbx_format;
72   BOOL  quota_warn_threshold_is_percent;
73   BOOL  quota_is_inclusive;
74   BOOL  quota_no_check;
75   BOOL  quota_filecount_no_check;
76 } appendfile_transport_options_block;
77
78 /* Restricted creation options */
79
80 enum { create_anywhere, create_belowhome, create_inhome };
81
82 /* Data for reading the private options. */
83
84 extern optionlist appendfile_transport_options[];
85 extern int appendfile_transport_options_count;
86
87 /* Block containing default values. */
88
89 extern appendfile_transport_options_block appendfile_transport_option_defaults;
90
91 /* The main and init entry points for the transport */
92
93 extern BOOL appendfile_transport_entry(transport_instance *, address_item *);
94 extern void appendfile_transport_init(transport_instance *);
95
96 /* Function that is shared with tf_maildir.c */
97
98 extern off_t  check_dir_size(const uschar *, int *, const pcre2_code *);
99
100 /* End of transports/appendfile.h */