Commit Graph

98 Commits

Author SHA1 Message Date
Piotr F. Mieszkowski 1e7d33c1df Handle bytes properly
Fix bytes sequences handling after auto-migration.
2022-01-10 18:21:53 +01:00
Piotr F. Mieszkowski b2a01c15b0 Fix auto-migrated code
- Use b'' (byte strings) where appropriate.

- Fix indentation.

- Replace python2.x references with python3.x.
2022-01-10 18:21:40 +01:00
Piotr F. Mieszkowski 5f02223ec7 Perform automatic migration to Python 3.x
Use lib2to3 automatic migration tool provided by Python 2.x to convert
codebase to new idioms.

Command line:

find . -type f -name '*.py' \
    -exec python2.7 -m lib2to3 \
    -f all -f idioms -f buffer -f set_literal -f ws_comma -w \
    '{}' '+'
2022-01-10 18:21:20 +01:00
Piotr F. Mieszkowski 7a063a91b8 Polish E2E testing script and make it configurable 2021-11-09 21:25:41 +01:00
Mukesh Sai Kumar 0b92307b23
Added starttls support for SMTP 2019-05-24 23:20:34 +05:30
TheGreatGooo 29f902b27c Fix bug
Content type not passed to encrypted submime causing bug where is only html is sent for example, the email client will not decode the html before displaying the email.
2017-09-09 11:53:00 -04:00
TheGreatGooo ba0953a372 Update gpg-mailgate.py
decode payload before encryption
2016-04-21 10:29:22 -04:00
TheGreatGooo bb4d267785 Update gpg-mailgate.py
fixed issue with Content-Transfer-Encoding during encryption
2016-04-20 20:44:56 -04:00
fkrone 24cfe01d95 Fixing stupid bug with non existing variable. Copy & paste fail. Finding a default key for recipient in domain keymap crashed mailgate. 2015-06-04 19:04:27 +02:00
fkrone 0de0d6a1b1 Critical bugfix: Under some circumstances a mail which should be encrypted with PGP/MIME was not encrypted if at least one attachment ot the body itself contained the PGP-tags. 2015-06-04 16:45:22 +02:00
fkrone 4b7a187ac3 Forgot to change this value from a debug one to the real value 2015-05-29 23:15:05 +02:00
fkrone 11f70fb241 Added possibility to define a regex for finding recipients to decrypt for and also adding possibility to use default keys for domain ranges 2015-05-29 23:13:05 +02:00
fkrone 5fdbabc3b3 Disable PGP/INLINE decryption by default. It does work, however, it has some drawbacks (e.g. content type for files getting lost). 2015-05-25 22:49:42 +02:00
fkrone 2c0e342e5e Support for decrypting PGP encrypted mails. However, it has some drawbacks and might cause some security issues. So before using it please read carefully through the installation instructions. 2015-05-25 20:24:37 +02:00
fkrone 6a7dda969b Bugfix: The mailgate crashes with certain settings when mail is delivered locally 2015-05-25 00:28:55 +02:00
fkrone 4283c7ef4d Prefere keys in keymap over keys in keyring. Could be useful if you have a recipient with two keys. 2015-03-29 18:16:58 +02:00
fkrone dbb65bbf7f Bugfix: Missed return code for failed PGP encryption in log message 2015-03-16 14:58:01 +01:00
fkrone 600b57e6ef Bugfix: Handle multipart messages and especially nested multipart messages correct and not mess up them 2015-03-14 21:52:33 +01:00
fkrone 46730ba8e6 Bugfix: Avoid nested encryptions of any kind 2015-03-02 21:01:05 +01:00
fkrone a766a9bd4a Refactored code (and also optimizing code).
Changes while refactoring: The gateway now handles mail addresses case sensitivity compitable to RFC 2821 as default.
2015-03-02 13:13:30 +01:00
fkrone 7934dc00db Little bugfix for PGP/INLINE: Make it working again by stop calling non existing method
Bugfix for PGP/MIME: Make it compatible to RFC 3156 (MIME Security with OpenPGP) when using mails with attachments
2015-02-22 14:19:11 +01:00
fkrone c022a2fe9d Added option to overwrite default PGP style (inline or PGP/MIME) for defined recipients (useful if you have some recipients which can't handle one style). 2015-02-19 16:40:48 +01:00
fkrone 92d66a35a5 Bugfix: S/MIME worked only for one recipient because Python handles assignments of lists as call by object references. So the for-loop broke after first iteration. 2015-02-15 15:39:58 +01:00
fkrone ccbe8de7e5 Making S/MIME also compatible with RFC 2821 changes. So both RFC 2821 compatibility and ignoring the case sensitivity of mail addresses are supported my S/MIME. 2015-02-15 15:36:18 +01:00
fkrone 228d43e936 Making GPG-Mailgate compatible with RFC 2821 (Simple Mail Transfer Protocol). The previous reverted commits made the gateway incompatible with the RFC. However, compatibility has to be activated in the settings. Most mail servers ignore the case sensitivity of the mail addresses, so this should not be a big issue.
A quick solution to make the S/MIME functionality compatible with the RFC was not found so this needs to be fixed later.
2015-02-14 19:34:26 +01:00
fkrone 2ff0b7e123 Revert 0b503fa: Fixing critical bug: looking up email addresses for PGP encryption in keychain was done case sensitive 2015-02-14 19:00:25 +01:00
fkrone c059cfe63b Merged change:
62f60f0592
( Added option to convert text/plain source email into MIME/PGP attachment style during encryption.

Useful if sending to recipient that can't handle the PGP-inline style. )
2015-02-14 17:07:02 +01:00
fkrone e2ef883ec2 Merged change:
584eee18dc
( Added check that config file keymap fingerprint exists in actual GPG keyring. Decline encryption if mismatch. )
2015-02-14 16:01:58 +01:00
fkrone 63435c72c5 Merged change:
779e712a5d
( Changed GPGEncryptor.encrypt() to also give PGP return code. Write rc to logfile in encrypt_payload(). )
2015-02-14 15:22:29 +01:00
fkrone 9c1375fdb2 Renaming some variables to make names consistent 2015-02-14 15:15:14 +01:00
fkrone 93b505d00a We don't need to do S/MIME encryption on an already PGP encrypted mail 2015-02-01 19:10:16 +01:00
fkrone 8561c01e99 Fixing bug: If at least one S/MIME recipient was found, every recipient received a S/MIME encrypted mail. Furthermore, the header data is now preserved in S/MIME 2015-02-01 19:09:20 +01:00
fkrone 0b503fa616 Fixing critical bug: looking up email addresses for PGP encryption in keychain was done case sensitive 2015-01-31 19:14:21 +01:00
kflux 8a9976556c preserve X-GPG-Mailgate header for S/MIME enc. 2014-03-02 13:14:12 +01:00
kflux f010613e6b Update gpg-mailgate.py
- functionalized smime encryption
- fixed some bugs
2014-03-02 01:50:31 +01:00
kflux fc4dcb55fe added additional/optional S/MIME encryption 2014-02-26 01:49:29 +01:00
perennate 9ac151f438 Merge https://github.com/ajgon/gpg-mailgate
Conflicts:
	INSTALL
	README.md
	gpg-mailgate.conf.sample
	gpg-mailgate.py
2013-11-03 10:38:04 -05:00
Igor Rzegocki da8559e31b Added authors info, and removed duplicated code 2013-11-03 15:31:28 +01:00
perennate 44d94c85ad Enable encryption for signed messages. 2013-11-03 15:14:17 +01:00
perennate b6e4a321e6 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.
2013-11-03 15:14:17 +01:00
perennate 119b611557 Remove the encrypted to addrs, since that was gpg-mailgate-specific and is no longer used. 2013-11-03 15:14:13 +01:00
perennate c1538cfff7 Use correct content transfer encoding (7bit). 2013-11-03 15:13:35 +01:00
perennate 52bdb31637 Don't encrypt if it's a signed message, since that would mess with the signature. 2013-11-03 15:13:35 +01:00
perennate f8711583a3 Remove useless domains configuration setting. 2013-11-03 15:13:34 +01:00
perennate 5d8e8202a6 Remove attachment content filter because it seems to make PGP-encrypted data invalid. 2013-11-03 15:13:05 +01:00
perennate 04afea12cf Use extend instead of append to fix list problem. 2013-11-03 15:13:05 +01:00
perennate e4b5a0e979 Use replace header instead of add header to avoid header duplication. 2013-11-03 15:13:05 +01:00
perennate 9bd941b752 Fix problem with previous commit. 2013-11-03 15:13:05 +01:00
perennate 4aa366dea5 Fix bug causing messages to have extra characters or failing to encode properly. 2013-11-03 15:13:03 +01:00
perennate 7110b9a303 Remove encryptod_to_addrs. 2013-11-03 15:11:22 +01:00