ForMaiR v1.2.0 已经发布,邮件自动转发工具

ForMaiR v1.2.0 已经发布,邮件自动转发工具

此版本更新内容包括:

ForMaiR - auto Forward eMails with custom Rules

CodeFactor

GitHub | 码云

自定义规则的邮件自动转发工具。

安装

使用 pip

$ python3 -m pip install --user formair

使用 git

$ git clone [email protected]:k8scat/ForMaiR.git
$ cd ForMaiR
$ python3 setup.py install

使用

参考配置:template/config.yaml

$ formair # 从 ./config.yaml 中加载配置

$ formair /path/to/config.yaml # 从 /path/to/config.yaml 中加载配置

自定义规则

满足下列任一规则的邮件会被转发到指定的邮箱列表(to_addrs

  • 邮件的发件人(from_addr[1])在指定的发件人列表中(from_addrs
  • 邮件的主题(subject)匹配指定的主题正则表达式(subject_pattern
  • 邮件的内容(plain_contenthtml_content)匹配指定的内容正则表达式(content_pattern
rules:
  -
    to_addrs:
      - '[email protected]'
      - '[email protected]'
    from_addrs:
      - '[email protected]'
      - '[email protected]'
    subject_pattern: ''
    content_pattern: ''
  -
    to_addrs:
      - '[email protected]'
      - '[email protected]'
    from_addrs:
      - '[email protected]'
      - '[email protected]'
    subject_pattern: ''
    content_pattern: ''

只转发新邮件

支持转发指定范围内的新邮件。

  • index_file 文件中获取上次读取的邮件位置(last_email_index) (如果文件不存在,则默认是 0)
  • pop3_server.stat 获取当前邮件的总数(email_count
for index in range(last_email_index+1, email_count+1):
    pass

文档

https://formair.io

详情查看:https://gitee.com/hsowan/ForMaiR/releases/v1.2.0

猜你喜欢

转载自www.oschina.net/news/129769/formair-1-2-0-released