infertux / zeyple

Postfix filter/hook to automatically encrypt outgoing emails with PGP/GPG
https://infertux.com/labs/zeyple/
Other
144 stars 30 forks source link

Replace python-gpgme with python-gpg #52

Closed momu closed 4 years ago

momu commented 6 years ago

python-gpgme has been abandoned in Ubuntu 18.04 (and Debian I guess). It should be replaced with python-gpg

The interface is broadly similar but has some differences. https://github.com/pazz/alot/pull/906/files is an example of a project being ported from python-gpgme to python-gpg.

See also: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=846314

infertux commented 6 years ago

Thank you very much.

It looks like it's getting removed from Debian as well (https://tracker.debian.org/pkg/pygpgme) and https://packages.debian.org/stretch/python3-gpg could be a good replacement but it's not available on CentOS.

I'll investigate...

ntimo commented 5 years ago

Do you have any news on this? I would really like to use Zeyple for my Mailserver.

infertux commented 5 years ago

@ntimo So I'm afraid this is gonna take longer than expected because I think I will rewrite Zeyple from scratch in another language (probably Go, I started in the go branch).

As a short backstory, the reason I picked Python when I created Zeyple was that "Python is already installed on most servers so Zeyple won't require people to install a bunch of new dependencies." Turns out Zeyple may not require many dependencies but unfortunately the ones it requires are poorly maintained/packaged.

I could switch to the new python-pgp one but it's not packaged for CentOS and I want to keep compatibility with CentOS since I use it for some of my machines.

Moreover, the whole Python 2 to Python 3 transition is taking so damn long and it has been such a pain to maintain backward compatibility. I probably spent more time dealing with Python 2/3 quirks than adding actual features. I used to like Python back in 2012 but not anymore...</rant>

So now I'm considering rewriting it in another language. I think there are two good candidates: C & Golang. I thought about Rust too but it doesn't have a good GPG library.

Go has a very nice standalone GPG library and Zeyple would actually have no dependencies as I could simply distribute a binary file and be done with it. Lastly, I think it'd be a good opportunity to learn the language for me.

I realize this is not ideal for you but in the meantime, I could suggest to use the Debian package of python-gpgme or maybe install it by hand. If someone wants to update zeyple.py to use the new python-gpg, I'd be happy to merge it while I'm working on the next version...

dominic-p commented 5 years ago

I just ran into this after upgrading a server to Ubuntu 18. In case anyone else runs into this, I worked around it by installing a 16.04 .deb from here.

Definitely not the cleanest solution, but it seems to be working for now. Excited about the rewrite in Go. That should make the install a lot simpler.