Remove useless domains configuration setting.
This commit is contained in:
parent
5d8e8202a6
commit
f8711583a3
2 changed files with 13 additions and 16 deletions
|
@ -1,6 +1,5 @@
|
|||
[default]
|
||||
add_header = yes
|
||||
domains = example.com,corp.org
|
||||
|
||||
[gpg]
|
||||
keyhome = /var/gpg/.gnupg
|
||||
|
|
|
@ -93,22 +93,20 @@ def get_msg( message ):
|
|||
keys = GnuPG.public_keys( cfg['gpg']['keyhome'] )
|
||||
gpg_to = list()
|
||||
ungpg_to = list()
|
||||
|
||||
|
||||
for enc in encrypted_to_addrs:
|
||||
if enc in keys:
|
||||
gpg_to.append( (enc, enc) )
|
||||
elif cfg.has_key('keymap') and cfg['keymap'].has_key(enc):
|
||||
gpg_to.append( (enc, cfg['keymap'][enc]) )
|
||||
else:
|
||||
ungpg_to.append(enc)
|
||||
|
||||
for to in to_addrs:
|
||||
domain = to.split('@')[1]
|
||||
if domain in cfg['default']['domains'].split(','):
|
||||
if to in keys:
|
||||
if verbose:
|
||||
log("Found public key for '%s' on keyring." % to)
|
||||
gpg_to.append( (to, to) )
|
||||
elif cfg.has_key('keymap') and cfg['keymap'].has_key(to):
|
||||
if verbose:
|
||||
log("Found public key for '%s' in keymap (%s)." % (to, cfg['keymap'][to]))
|
||||
gpg_to.append( (to, cfg['keymap'][to]) )
|
||||
else:
|
||||
if verbose:
|
||||
log("Found no public key for '%s'." % to)
|
||||
ungpg_to.append(to);
|
||||
if to in keys:
|
||||
gpg_to.append( (to, to) )
|
||||
elif cfg.has_key('keymap') and cfg['keymap'].has_key(to):
|
||||
gpg_to.append( (to, cfg['keymap'][to]) )
|
||||
else:
|
||||
if verbose:
|
||||
log("Recipient (%s) not in domain list." % to)
|
||||
|
|
Loading…
Reference in a new issue