fortran95/postoffice
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
POSTOFFICE:NERV ξ 计划的应用程序 ================================= POSTOFFICE是利用 ξ 计划作为核心,进行具有OTR性质的保密信息交换服务程序。 目录结构 -------- postoffice/ boxes/ incoming/ queue/ error/ handled/ outgoing/ queue/ error/ handled output/ certificates/ config/ gui/ secrets/ xi/ -> 连接到xi模块( 源码在 http://github.com/fortran95/xi ) 使用说明 -------- POSTOFFICE 是针对各种通讯应用程序而设计的。任何一个应用程序,如果需要使用本 服务,只需: 1. 在boxes/outgoing/queue/ 下新建文件,文件名任意,内容遵循如下规则: a)文件头由如下关键字+空格+值组成: SENDER,RECEIVER,VIA,TAG 例如: SENDER send@somemail.com RECEIVER recv@somemail.com VIA Email TAG 1 b)每行之间用\n分隔。文件头后用两个\n,之后是明文,完整例子如: SENDER send@somemail.com RECEIVER recv@somemail.com VIA Email TAG 1 Hello, world! This is the test letter. The end. c)允许用ATTRIBUTES关键字指定Base64属性,这样明文将被POSTOFFICE认为 是Base64编码过的 2. 执行 python outbox.py,这样将使程序处理上述路径下的文件 3. 处理后的信息由程序输出到 boxes/outgoing/handled/,应用程序有责任将输 出结果根据指示发送到指定接收账户。 在接收时,同样地,应用程序将收到的信息放入boxes/incoming/queue/下,同上指定 文件头。执行 python inbox.py ,应用程序读取 boxes/incoming/handled/下的信息 显示给用户。输出结果类似于上述例子。 配置文件 -------- config/alias.cfg 配置一个用户的信息。段落名(Section Name)是用户的标识,在提示输入密码等 场合会用到。Public键指定公钥证书,Private键(可选)指定私人证书。 之后需要配置应用名称和账户。例如一个典型的配置文件如下: [person1] Public: certificates/public/person1.pub Private:certificates/secret/person1 Email=person1@somewhere.com QQ=000000000 [person2] Public: certificates/public/person2.pub Email=person2@somewhere.com 在输入系统的信件中指定了VIA后,将根据SENDER和RECEIVER的值在配置文件中寻 找对应人选,继而寻找证书。例如给定如下信件: SENDER person1@somewhere.com RECEIVER person2@somewhere.com VIA Email TAG 000102030405060708090A0B0C0D0E0F This is an example email. 则程序将以 person1 为发送人,person2 为接收人,传送上述信息。 错误处理 -------- 在程序执行中出现任何错误,都将导致信件被移动到相应信箱目录(boxes/ incoming 或 boxes/outgoing)下的 error/ 目录中。同时会报告错误。 配置系统 -------- 程序提供一个CLI界面,使用 python postoffice.py 可以启动。通过这个界面, 您可以实现系统提供的大多数功能。 版权 ---- 本程序根据 GPL 发布。您可以自由地使用、分发程序或程序的部分源码,前提是 您必须与此同时使您的程序源码也遵循 GPL 协议发布。作者不保证程序或程序的任何 部分适合您的需求,也不保证它们的正确性。因为使用本程序的源码导致的任何损失 与作者无关。
About
A client works with Xi...
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published