Skip to content
This repository has been archived by the owner on Dec 25, 2021. It is now read-only.

Bug fixes for broken html #3

Open
wants to merge 41 commits into
base: master
Choose a base branch
from

Conversation

TheGreatGooo
Copy link

No description provided.

fixed issue with Content-Transfer-Encoding during encryption
decode payload before encryption
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.
@jomagalo
Copy link

After installing, patching and configuring everything I send a test email and return it to me with these metadata:

`Reporting-MTA: dns; mail.email.com
X-Postfix-Queue-ID: 13CD884CAC
X-Postfix-Sender: rfc822; [email protected]
Arrival-Date: Fri, 21 Sep 2018 12:01:34 +0200 (CEST)

Final-Recipient: rfc822; [email protected]
Original-Recipient: rfc822;[email protected]
Action: failed
Status: 5.3.0
Diagnostic-Code: x-unix; Traceback (most recent call last): File
"/usr/bin/gpg-mailgate.py", line 688, in
sort_recipients(raw_message, from_addr, to_addrs) File
"/usr/bin/gpg-mailgate.py", line 648, in sort_recipients
recipients_left = gpg_decrypt(raw_message, recipients_left) File
"/usr/bin/gpg-mailgate.py", line 81, in gpg_decrypt keys =
GnuPG.private_keys( cfg['gpg']['keyhome'] ) AttributeError: 'module' object
has no attribute 'private_keys'`

@TheGreatGooo
Copy link
Author

@jomagalo which GnuPG are you using, i think you may be using the wrong one.

@jomagalo
Copy link

jomagalo commented Sep 22, 2018

I'm using:
gpg (GnuPG) 2.1.11
libgcrypt 1.6.5

In the file init.py seven lines have been modified in this way:
cmd = ['/usr/bin/gpg2', '--home', keyhome, '--list-secret-keys', '--with-colons']

In this version it works fine:
https://github.com/uakfdotb/gpg-mailgate/tree/www

svenseeberg and others added 24 commits March 10, 2019 17:06
* Add information about enabling automatic
  public key download via gpg.conf
Added starttls support for SMTP
Provide a simple Python script that would linsten on a given port and print to
standard output any message received via SMTP on that port.

This script will then be used to automatically test gpg-mailgate with different
scenarios (unknown recipient key, RSA key, elliptic curve key).
- Use an environment variable to point at the configuration file while
  strating gpg-mailgate.py.

- Unify paths: store temporary config, logs and anything else under 'test'
  directory.

- Configure more tests (RSA, Ed25519).

- Add test descriptions to be shown before they're started.
Since it's not so easy to encrypt a message exactly the same way twice, we
only verify if the message has been encrypted or not.

Introduce minor changes to the library itself, because it doesn't work very
well with modern GnuPG.

Also, include GnuPG directory (pointed at by --homedir option).
To let the user know that tests produce logs, include a message at the end of
the test output informing about locations of E2E and Mailgate logs.

Also, extract some constants.
- Move things to configuration file where appropriate (logging format, etc.).

- Rework execute_e2e_test signature to simplify it and get rid of keyword
arguments.

- Simplify output.

- Include a header comment in configuration file.
Extract a function to calculate GPG commands to be executed and cover it with
unit tests.
Remove unused msgout files, fix addresses in msgin files.
Do not keep test/keyhome/random_seed in repository.
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 \
    '{}' '+'
- Use b'' (byte strings) where appropriate.

- Fix indentation.

- Replace python2.x references with python3.x.
Piotr F. Mieszkowski and others added 14 commits January 10, 2022 18:21
Fix bytes sequences handling after auto-migration.
- Makefile: add 'unittest' to .PHONY targets.
- Remove unnecessary #! line from e2e_test.py.
- Extract Python path to test/e2e.ini file.
- Let the user overwrite Python binary name while calling make.

- Use environment variable set by make to instruct e2e_test.py which binary it
should call to execute Python code.
Tests kept breaking (not failing) randomly with "Broken pipe" errors.  Rework
how processes are spawned to make sure that it doesn't break them again.
- Explain how to specify Python binary path used during tests.

- Mention test logs.
we need to convert to string to concatenate
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants