forked from Disroot/gpg-lacre
Add keymap_only configuration, to ignore public_keys list.
This means the keymap will be exclusively used to determine which email addresses to sign with which keys.
This commit is contained in:
parent
27e9d6ce50
commit
a035df85be
2 changed files with 6 additions and 1 deletions
|
@ -3,6 +3,11 @@
|
||||||
# this may be useful for debugging purposes
|
# this may be useful for debugging purposes
|
||||||
add_header = yes
|
add_header = yes
|
||||||
|
|
||||||
|
# whether we should only sign emails if they are explicitly defined in
|
||||||
|
# the key mappings below ([keymap] section)
|
||||||
|
# this means gpg-mailgate won't automatically detect PGP recipients
|
||||||
|
keymap_only = no
|
||||||
|
|
||||||
[gpg]
|
[gpg]
|
||||||
# the directory where gpg-mailgate public keys are stored
|
# the directory where gpg-mailgate public keys are stored
|
||||||
# (see INSTALL for details)
|
# (see INSTALL for details)
|
||||||
|
|
|
@ -86,7 +86,7 @@ gpg_to = list()
|
||||||
ungpg_to = list()
|
ungpg_to = list()
|
||||||
|
|
||||||
for to in to_addrs:
|
for to in to_addrs:
|
||||||
if to in keys:
|
if to in keys and not ( cfg['default'].has_key('keymap_only') and cfg['default']['keymap_only'] == 'yes' ):
|
||||||
gpg_to.append( (to, to) )
|
gpg_to.append( (to, to) )
|
||||||
elif cfg.has_key('keymap') and cfg['keymap'].has_key(to):
|
elif cfg.has_key('keymap') and cfg['keymap'].has_key(to):
|
||||||
gpg_to.append( (to, cfg['keymap'][to]) )
|
gpg_to.append( (to, cfg['keymap'][to]) )
|
||||||
|
|
Loading…
Reference in a new issue