-
Notifications
You must be signed in to change notification settings - Fork 1
/
mysql2sqlite_general.ini.tmpl
113 lines (88 loc) · 4.6 KB
/
mysql2sqlite_general.ini.tmpl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
# https://github.com/WhyAskWhy/mysql2sqlite
# Purpose:
#
# Expose general configuration options for the mysql2sqlite.py script
# so values do not have to be hardcoded in the script.
############################################################
# "toggle" options to broadly enable/disable behavior. Primarily used to
# control the types of output messages used to assist when first configuring
# or testing the script. For example, you might wish to see the output to
# know all is well before enabling the script as part of a cron job and
# then turning off all output
[flags]
############################################################
# Set to true for verbose output to the current console/terminal as the script
# executes. Useful for troubleshooting.
display_console_debug_messages = false
# Less verbose output. Enabling this provides status details.
display_console_info_messages = false
# Output warning messages which indicate that a desired step was not
# completed as expected, but the issue does not appear to be severe
# enough to stop the script from completing in an "acceptable" manner.
display_console_warning_messages = true
# Output error messages which block proper operation of the script
display_console_error_messages = true
# If enabled, this treats all warnings as failures and exits immediately with
# one or more messages indicating that this option is enabled and what warning
# condition occured
# TODO: Add support for this
fail_on_warnings = false
# If enabled the script will attempt to create any needed directories on behalf
# of the user account running the script. Calls to su or sudo are not made,
# so it is up to the sysadmin to handle setting ownership/permissions ahead
# of time
create_directories = true
##############################################################################
# Used by the MySQL database connector module
[mysqldb_config]
##############################################################################
# NOTE: Read-only access to the tables listed within mysql2sqlite_queries.ini
# is required. If specific columns are sensitive and you do not wish to
# mirror the field values to the SQLite database, provide a placeholder
# value in the SELECT statements defined in that INI config file (e.g., 'NULL')
user = mysql2sqlite
# Password for the MySQL database account. Reminder: read-only access
# is sufficient
password = qwerty
# MySQL database host. If you use a stunnel or other forward connection you
# will likely wish to set this to 127.0.0.1 and override the default port
# for the 'port' setting
host = 127.0.0.1
# If this script runs on the same box as the MySQL/MariaDB server then you
# probably want to enter 3306 here, otherwise if using stunnel or another
# port forwarding setup you will likely need to enter an alternate port.
port = 3306
# The database whose contents you wish to mirror to a local SQLite database
# Note: make sure to update the queries in the mysql2sqlite_queries.ini
# file to reflect the schema for this database
database = mailserver
# Specific to the upstream MySQL Connector module > 2.0.5. This forces all
# warning conditions to trigger exceptions, which if uncaught will terminate
# the script. In normal operation you shouldn't receive any exceptions, so
# this is enabled by default to help catch configuration or script errors
raise_on_warnings = true
##############################################################################
# Settings specific to the SQLite database this script is responsible for
# maintaining
[sqlitedb_config]
##############################################################################
# The "short" name of the SQLite database file. Do not specify the directory
# which will hold the file here.
#
# Note: Make sure to upate the /etc/postfix/sqlite/*.cf files to reference
# this filename.
db_filename = mailserver.db
# The directory that will hold the SQLite database file. The user running this
# script should have write access to this location. If you enable the option
# to create needed directories and the full path given below does not exist
# an attempt will be made to create the full path. If the user running this
# script lacks the necessary permissions the script will fail.
#
# Note: Make sure to upate the /etc/postfix/sqlite/*.cf files to reference
# this location.
base_dir = /var/cache/mysql2sqlite
# The full path to the SQLite database file. An attempt to create the db file
# using this explicit full path if it doesn't already exist. Make sure that
# the script has write access to the file and that applicable daemons (e.g.,
# Postfix, Dovecot, etc) have read access to the file.
db_file = %(base_dir)s/%(db_filename)s