Added authors info, and removed duplicated code
This commit is contained in:
parent
78c6ecf44e
commit
da8559e31b
11
README.md
11
README.md
|
@ -11,3 +11,14 @@ For installation instructions, please refer to the included INSTALL file.
|
||||||
- Easy installation
|
- Easy installation
|
||||||
|
|
||||||
This is forked from the original project at http://code.google.com/p/gpg-mailgate/
|
This is forked from the original project at http://code.google.com/p/gpg-mailgate/
|
||||||
|
|
||||||
|
# Authors
|
||||||
|
|
||||||
|
This is a combined work of many developers:
|
||||||
|
|
||||||
|
* mcmaster <mcmaster@aphrodite.hurricanelabs.rsoc>
|
||||||
|
* Igor Rzegocki <ajgon@irgon.com> - [GitHub](https://github.com/ajgon/gpg-mailgate)
|
||||||
|
* perennate <admin@perennate.com> - [GitHub](https://github.com/uakfdotb/gpg-mailgate)
|
||||||
|
* Colin Moller <colin@unixarmy.com> - [GitHub](https://github.com/LeftyBC/gpg-mailgate)
|
||||||
|
* Taylor Hornby <havoc@defuse.ca> - [GitHub](https://github.com/defuse/gpg-mailgate)
|
||||||
|
* Martin (uragit) <uragit@telemage.com> - [GitHub](https://github.com/uragit/gpg-mailgate)
|
||||||
|
|
|
@ -45,14 +45,11 @@ def send_msg( message, recipients = None ):
|
||||||
smtp.sendmail( from_addr, recipients, message.as_string() )
|
smtp.sendmail( from_addr, recipients, message.as_string() )
|
||||||
|
|
||||||
def encrypt_payload( payload, gpg_to_cmdline ):
|
def encrypt_payload( payload, gpg_to_cmdline ):
|
||||||
gpg = GnuPG.GPGEncryptor( cfg['gpg']['keyhome'], gpg_to_cmdline, payload.get_content_charset() )
|
|
||||||
raw_payload = payload.get_payload(decode=True)
|
raw_payload = payload.get_payload(decode=True)
|
||||||
if "-----BEGIN PGP MESSAGE-----" in raw_payload and "-----END PGP MESSAGE-----" in raw_payload:
|
if "-----BEGIN PGP MESSAGE-----" in raw_payload and "-----END PGP MESSAGE-----" in raw_payload:
|
||||||
return payload
|
return payload
|
||||||
gpg = GnuPG.GPGEncryptor( cfg['gpg']['keyhome'], gpg_to_cmdline, payload.get_content_charset() )
|
gpg = GnuPG.GPGEncryptor( cfg['gpg']['keyhome'], gpg_to_cmdline, payload.get_content_charset() )
|
||||||
gpg.update( raw_payload )
|
gpg.update( raw_payload )
|
||||||
if "-----BEGIN PGP MESSAGE-----" in raw_payload and "-----END PGP MESSAGE-----" in raw_payload:
|
|
||||||
return payload
|
|
||||||
payload.set_payload( gpg.encrypt() )
|
payload.set_payload( gpg.encrypt() )
|
||||||
|
|
||||||
isAttachment = payload.get_param( 'attachment', None, 'Content-Disposition' ) is not None
|
isAttachment = payload.get_param( 'attachment', None, 'Content-Disposition' ) is not None
|
||||||
|
|
Loading…
Reference in New Issue