OPENPGP DNS & Milter
# yum install hash-slinger
# rpm -qil hash-slinger
Name : hash-slinger Version : 2.7 Release : 1.el7 Architecture: noarch Install Date: Fri 22 Jan 2016 10:12:33 AM CET Group : Applications/Internet Size : 88902 License : GPLv2+ Signature : RSA/SHA256, Sun 03 Jan 2016 04:05:07 AM CET, Key ID 6a2faea2352c64e5 Source RPM : hash-slinger-2.7-1.el7.src.rpm Build Date : Sun 03 Jan 2016 01:34:40 AM CET Build Host : buildppcle-05.phx2.fedoraproject.org Relocations : (not relocatable) Packager : Fedora Project Vendor : Fedora Project URL : http://people.redhat.com/pwouters/hash-slinger/ Summary : Generate various DNS records such as RFC-4255 SSHFP and RFC-698 TLSA Description : This package contains various tools to generate special DNS records: sshfp Generate RFC-4255 SSHFP DNS records from known_hosts files or ssh-keyscan tlsa Generate RFC-6698 TLSA DNS records via TLS openpgpkey Generate draft-ietf-dane-openpgpkey DNS records from OpenPGP keyrings ipseckey Generate RFC-4025 IPSECKEY DNS records on Libreswan IPsec servers This package supersedes 'sshfp' and 'swede' /usr/bin/ipseckey /usr/bin/openpgpkey /usr/bin/sshfp /usr/bin/tlsa /usr/share/doc/hash-slinger-2.7 /usr/share/doc/hash-slinger-2.7/BUGS /usr/share/doc/hash-slinger-2.7/CHANGES /usr/share/doc/hash-slinger-2.7/COPYING /usr/share/doc/hash-slinger-2.7/README /usr/share/man/man1/ipseckey.1.gz /usr/share/man/man1/openpgpkey.1.gz /usr/share/man/man1/sshfp.1.gz /usr/share/man/man1/tlsa.1.gz
$ openpgpkey --fetch --uid 2 michael@nausch.org
-----BEGIN PGP PUBLIC KEY BLOCK----- Comment: michael@nausch.org key obtained from DNS Comment: key transfer was protected by DNSSEC Version: GnuPG v2.0.22 (GNU/Linux) mQINBFI9/U0BEACfpc7ClI9gjdYZ4dU4oRq7OytIMJCqd9f/82zXLav2R282a+Ne k997kartujdknbuAsVKpqh4kVjj7SA1/4ITkuE+d7Ski2XZZVAJQlqXgpqVmCP2w Gq2zODnopu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4UBtJ0 LymqM80MuSVRgQrFdxJAFgHN+ziRw9v+VRijWzmufeHkqUo77BVot9mDmouAiUGw cK1hGL0Nl34rgN6gOETPzGLiOLBmytVW/fGZ0hwerRuE7rk0W5lapE2lQeQPjCiL 2LeJPxcPjsBJa3h05QwIaZo18Wb9esnjBjzjV4fRY0+akiJw/w6+V893FGbZnHIv /cDg8Z+10RIiBZa9qC50NNTfhPD70lV+HRc= =usnJ -----END PGP PUBLIC KEY BLOCK-----
# yum install openpgpkey-milter -y
# rpm -qil openpgpkey-milter
Name : openpgpkey-milter Version : 0.5 Release : 1.el7 Architecture: noarch Install Date: Fri 29 Jan 2016 12:35:15 PM CET Group : System Environment/Daemons Size : 50233 License : GPLv3+ Signature : RSA/SHA256, Mon 04 Jan 2016 04:56:06 PM CET, Key ID 6a2faea2352c64e5 Source RPM : openpgpkey-milter-0.5-1.el7.src.rpm Build Date : Mon 04 Jan 2016 01:08:27 AM CET Build Host : bvirthost02-nfs.phx2.fedoraproject.org Relocations : (not relocatable) Packager : Fedora Project Vendor : Fedora Project URL : ftp://ftp.nohats.ca/openpgpkey-milter Summary : OPENPGPKEY basd automatic encryption of emails using the milter API Description : The openpgpkey-milter package provides a milter plugin for sendmail or postfix that will automatically encrypt plaintext emails if the target recipient is publishing an OPENPGPKEY record protected with DNSSEC. This is currently an IETF draft (draft-wouters-dane-openpgp) /etc/tmpfiles.d/openpgpkey-milter.conf /usr/lib/systemd/system/openpgpkey-milter.service /usr/sbin/openpgpkey-milter /usr/share/doc/openpgpkey-milter-0.5 /usr/share/doc/openpgpkey-milter-0.5/LICENSE /usr/share/doc/openpgpkey-milter-0.5/README /var/run/openpgpkey-milter /var/run/openpgpkey-milter/openpgpkey-milter.sock /var/spool/openpgpkey-milter
README
# less /usr/share/doc/openpgpkey-milter-0.5/README
WARNING ======= This is pre-release software. It's only been testing by me on my personal postfix server. Running this anywhere on a production machine might cost you your job, although afterwards please do let me know how it failed you so I can fix it. openpgpkey-milter ----------------- openpgpkey-milter is a sendmail/postfix milter service that will attempt to automatically OpenPGP encrypt plaintext emails received by the MTA/MUA before relaying the message further towards the recipient(s). These can be messages received from the network, or generated locally. Requirements ------------ Apart from requiring a milter compatible mail server (postfix or sendmail), openpgpkey-milter requires: * python-unbound / unbound-python (in all major distros) * python-milter / python-pymilter (in all major distros) * [python-gnupg](http://pythonhosted.org/python-gnupg/) (older versions might need a [patch](http://code.google.com/p/python-gnupg/issues/detail?id=94) * gnupg, libmilter, etc which are dragged in dependancies by the above packages Recommended ----------- The [hash-slinger](http://people.redhat.com/pwouters/hash-slinger/) package contains an "openpgpkey" command that allows you to generate and verify your own OPENPGPKEY records. How does it work ---------------- openpgpkey-milter detects when a message is not encrypted with gpg and then checks all the recipients to see if they published the special [OPENPGPKEY](http://tools.ietf.org/html/draft-ietf-dane-openpgpkey) DNS record. Configuration of the milter service ----------------------------------- To use openpgpkey-milter with postfix, add to `/etc/postfix/main.cf` smtpd_milters = inet:127.0.0.1:8890 non_smtpd_milters = $smtpd_milters milter_default_action = tempfail milter_protocol = 2 If you run `opendkim`, ensure you add openpgpkey-milter **before** opendkim or you'll break the opendkim signatures. For the fedora/rhel configuration where opendkims uses port 8891, you can use the following: smtpd_milters = inet:127.0.0.1:8890, inet:127.0.0.1:8891 non_smtpd_milters = $smtpd_milters milter_protocol = 2 milter_default_action = accept Mailing list and bug reports ---------------------------- There is no mailing list yet. Please send questions and bug reports to paul@nohats.ca. However if you run openpgpkey-milter on your mail server and it broke, you might be better of mailing me at the unsigned domain paul@cypherpunks.ca.
openpgpkey-milter
nix zu tun
# vim /etc/tmpfiles.d/openpgpkey-milter.conf
- /etc/tmpfiles.d/openpgpkey-milter.conf
D /var/run/openpgpkey-milter 0770 root mail -
# systemctl start openpgpkey-milter
# systemctl status openpgpkey-milter
● openpgpkey-milter.service - OPENPGPKEY auto encryption milter
Loaded: loaded (/usr/lib/systemd/system/openpgpkey-milter.service; disabled; vendor preset: disabled)
Active: active (running) since Fri 2016-01-29 12:45:19 CET; 22s ago
Main PID: 3880 (openpgpkey-milt)
CGroup: /system.slice/openpgpkey-milter.service
├─3880 /usr/bin/python /usr/sbin/openpgpkey-milter
└─3886 /usr/bin/python /usr/sbin/openpgpkey-milter
Jan 29 12:45:19 vml000087.dmz.nausch.org systemd[1]: Started OPENPGPKEY auto encryption milter.
Jan 29 12:45:19 vml000087.dmz.nausch.org systemd[1]: Starting OPENPGPKEY auto encryption milter...
Jan 29 12:45:20 vml000087.dmz.nausch.org openpgpkey-milter[3880]: openpgpkey-milter: failed to setproctitle - python-setproctitle missing?
Jan 29 12:45:20 vml000087.dmz.nausch.org openpgpkey-milter[3880]: starting daemon [3880] version 0.5 on port 8890 at /var/spool/openpgpkey-milter with timeout 600