You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ponymail.apache.org by se...@apache.org on 2021/10/07 21:22:37 UTC

[incubator-ponymail-foal] branch master updated: Add lid CLI param

This is an automated email from the ASF dual-hosted git repository.

sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-ponymail-foal.git


The following commit(s) were added to refs/heads/master by this push:
     new 4def854  Add lid CLI param
4def854 is described below

commit 4def8545bb894f1890f46d5a2628c54cb6e98831
Author: Sebb <se...@apache.org>
AuthorDate: Thu Oct 7 22:22:26 2021 +0100

    Add lid CLI param
---
 tools/plugins/dkim_id.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/tools/plugins/dkim_id.py b/tools/plugins/dkim_id.py
index 91cc2cd..0fdc410 100644
--- a/tools/plugins/dkim_id.py
+++ b/tools/plugins/dkim_id.py
@@ -404,6 +404,10 @@ def main() -> None:
         f: BinaryIO
         with open(argv[1], "rb") as f:
             print(dkim_id(f.read()))
+    elif len(argv) == 3: # add lid
+        f: BinaryIO
+        with open(argv[1], "rb") as f:
+            print(dkim_id(f.read(), argv[2].encode('utf-8')))
     else:
         from sys import stdin