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