Support file specification in a dataset starting with './' and '../' in addition to '/'. Update man pages to indicate it is general and not just fo KeyTable*.
This commit is contained in:
@@ -278,7 +278,7 @@ def _dataset_to_list(dataset):
|
||||
# This is a flat file dataset, which are key value:value stores
|
||||
ds = []
|
||||
dsd = {}
|
||||
if dataset[0] == '/':
|
||||
if dataset[0] == '/' or dataset[:2] == './' or dataset[:3] == '../':
|
||||
dsname = dataset
|
||||
elif dataset[:5] == 'file:':
|
||||
dsname = dataset[5:]
|
||||
|
||||
@@ -175,7 +175,7 @@ def read_keytable(tabledict, milterconfig):
|
||||
import dkim
|
||||
import syslog
|
||||
for dictkey, values in tabledict.items():
|
||||
if values[-1][:1] == '/':
|
||||
if values[-1][:1] == '/' or values[-1][:2] == './' or values[-1][:3] == '../':
|
||||
key = read_keyfile(values[-1], milterconfig)
|
||||
tabledict[dictkey] = [values[0], values[1], key]
|
||||
return tabledict
|
||||
|
||||
+4
-1
@@ -182,7 +182,10 @@ should be separated by colons.
|
||||
.TP
|
||||
.I i)
|
||||
If the string contains none of these prefixes but starts with a slash ("/")
|
||||
character, it is presumed to be a flat file as described above.
|
||||
character, or "./" or "../", it is presumed to be a flat file as described
|
||||
above. Note: In OpenDKIM "./" and "../" only apply to KeyTable, but for
|
||||
dkimpy-milter it is generally applicable and KeyTable specification is not
|
||||
a special case.
|
||||
.TP
|
||||
.I j)
|
||||
If the string begins with "csl:", the string is treated as a comma-separated
|
||||
|
||||
Reference in New Issue
Block a user