summaryrefslogtreecommitdiff
path: root/config.py.dist
diff options
context:
space:
mode:
authorCarson Fleming <cflems@cflems.net>2024-10-02 01:52:23 -0400
committerCarson Fleming <cflems@cflems.net>2024-10-02 01:52:23 -0400
commit1422a25cd5390404221f12b6a08cca6b35e9b776 (patch)
treefc605fa20fb7b6a62e8214c13cca891146eb5a23 /config.py.dist
downloadpgp-milter-1422a25cd5390404221f12b6a08cca6b35e9b776.tar.gz
Initial version with debug prints
Diffstat (limited to 'config.py.dist')
-rw-r--r--config.py.dist16
1 files changed, 16 insertions, 0 deletions
diff --git a/config.py.dist b/config.py.dist
new file mode 100644
index 0000000..e35e8ae
--- /dev/null
+++ b/config.py.dist
@@ -0,0 +1,16 @@
+socket = '/var/spool/postfix/pgp-milter/pgp-milter.sock'
+db_config = {
+ 'host': 'localhost',
+ 'user': 'user',
+ 'password': 'password',
+ 'database': 'database'
+}
+
+# Things to bear in mind when writing this query:
+# - `fingerprint` can be any deduplicating attribute of any type
+# - `raw_data` can either be armored or unarmored key data
+# - column names don't matter
+# - the input argument (%s) is a series of addresses, like so:
+# - `'a@example.com', 'b@example.com', 'c@example.com'`
+# - a prepared statement is used so input is sanitized for you
+key_loader_query = 'SELECT fingerprint, raw_data FROM pgp_keys WHERE addr IN (%s)'