diff --git a/gpgmymail b/gpgmymail index c55a960..a3c230f 100755 --- a/gpgmymail +++ b/gpgmymail @@ -126,6 +126,8 @@ def main() -> None: parser.add_argument('--encoding', action="store", default=DEFAULT_ENCODING, required=False, help="Encoding to use for the gnupg.GPG object") + parser.add_argument('--unconditional', action="store_true", + help="Encrypt mail unconditionally. By default, mail is not encrypted if it is already encrypted.") parser.add_argument('recipient', nargs='*', help="Key ID or email of keys to encrypt for") args = parser.parse_args() @@ -134,7 +136,12 @@ def main() -> None: if args.decrypt: sys.stdout.write(decrypt(msg), encoding=args.encoding) else: - sys.stdout.write(encrypt(msg, args.recipient, encoding=args.encoding)) + sys.stdout.write(encrypt( + msg, + args.recipient, + unconditionally_encrypt=args.unconditional, + encoding=args.encoding + )) if __name__ == '__main__': main()