Indy节点电子邮件通知程序
indynotifieremail的Python项目详细描述
#Sovrin通知者电子邮件
##先决条件 -在本地主机上运行的SMTP服务器
##安装SMTP服务器(如果尚未安装) 在ubuntu上最简单的方法是使用sendmail ` sudo apt-get install sendmail ` 检查它是否工作执行 ` echo "Subject: sendmail test" | sendmail -v youremail@example.com -f alert@noreply.com ` 如果在youremail@example.com上收到电子邮件,则sendmail可以工作。
##安装 ` pip3 install indynotifieremail Add INDY_NOTIFIER_EMAIL_RECIPIENTS=youremail@example.com to your /etc/environment ` 您需要设置系统环境变量indy_notifier_email_recipients。
##配置 包依赖于两个环境变量: -Indy_Notifier_电子邮件收件人(必需) -Indy_Notifier_电子邮件发件人(可选)
###Indy_Notifier_电子邮件收件人 Indy_Notifier_电子邮件收件人应为以下格式的字符串: ` recipient1@adress.com [optional list of events the recipient is going to get],recipient2@adress.com [event list], ... ` 如果未提供列表,则收件人将获取所有事件的通知。 例子: ` steward1@company.com event1 event2, steward2@company.com, steward3@company.com event3 ` 这样Steward1将获得Event1和Event2的通知,Steward2将获得所有可能的通知,Steward3将仅获得Event3的通知。
当前事件列表可以在[plenum](https://github.com/hyperledger/indy-plenum/blob/master/plenum/server/notifier_plugin_manager.py#L11)中找到。
###Indy_通知者_电子邮件发件人 默认情况下,每个电子邮件通知都将来自alert@noreply.com。您可以通过设置indy_notifier_email_sender来更改此设置。可能对电子邮件过滤器有用。
##电子邮件发送频率 默认情况下,您一小时收到的同一主题的电子邮件不会超过一次。这是由[静音超时](https://github.com/evernym/sovrin-notifier-email/blob/master/sovrinnotifieremail/constants.py#L8)定义的。可以通过设置indy_notifier_silence_timeout环境变量来覆盖它。有关更新程序的电子邮件始终会发送。