Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/grahamedgecombe/pdf-decrypt-filter
Automatically decrypt PDF attachments in emails
https://github.com/grahamedgecombe/pdf-decrypt-filter
mail pdf perl
Last synced: 25 days ago
JSON representation
Automatically decrypt PDF attachments in emails
- Host: GitHub
- URL: https://github.com/grahamedgecombe/pdf-decrypt-filter
- Owner: grahamedgecombe
- License: isc
- Created: 2016-11-05T10:13:48.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2019-06-17T20:26:26.000Z (over 5 years ago)
- Last Synced: 2024-10-31T01:13:34.442Z (2 months ago)
- Topics: mail, pdf, perl
- Language: Perl
- Homepage:
- Size: 3.91 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.markdown
- License: LICENSE
Awesome Lists containing this project
README
# pdf-decrypt-filter
## Introduction
`pdf-decrypt-filter` automatically decrypts PDF attachments in an email. It's
designed for automated use with a Mail Delivery Agent such as `procmail` or
`maildrop`.## Using with `procmail`
Use a recipe like this in your `.procmailrc` file:
:0 fw
* ^From:.*encrypted-pdf-sender@example\.com
| /path/to/pdf-decrypt-filter --password=hunter2As rewriting the emails can break things like DKIM signatures, you might want to
write the original emails to a file for backup purposes::0 cw :
* ^From:.*encrypted-pdf-sender@example\.com
| gzip >> pdfs.gz:0 afw
| /path/to/pdf-decrypt-filter --purge --password=hunter2By default `pdf-decrypt-filter` will keep the encrypted PDF attachment in
addition to the new plaintext attachment. The `--purge` flag can be used to
override this behaviour and remove the encrypted PDF attachment.## Limitations
* Only supports a single password.
* The entire script will fail if the password is incorrect.
* Assumes the mail is a single `multipart/mixed` part directly containing one or
more `application/pdf` attachments.## Dependencies
* [Perl 5][perl]
* [File::Slurp][slurp]
* [MIME::Tools][mimetools]
* [qpdf][qpdf]## License
`pdf-decrypt-filter` is available under the terms of the [ISC license][isc],
which is similar to the 2-clause BSD license. See the `LICENSE` file for the
copyright information and licensing terms.[perl]: https://www.perl.org/
[slurp]: https://metacpan.org/pod/File::Slurp
[mimetools]: https://metacpan.org/pod/MIME::Tools
[qpdf]: http://qpdf.sourceforge.net/
[isc]: https://www.isc.org/downloads/software-support-policy/isc-license/