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

 邮箱网  0条评论  4710次浏览  2021年02月10日 星期三 07:34

分享到: 更多

中国邮箱网讯 2月10日消息 此版本更新内容包括:

ForMaiR - auto Forward eMails with custom Rules

CodeFactor

GitHub | 码云

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

安装

使用 pip

$ python3 -m pip install --user formair

使用 git

$ git clone git@github.com: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_content  html_content)匹配指定的内容正则表达式(content_pattern
rules:
  -
    to_addrs:
      - 't1@example.com'
      - 't2@example.com'
    from_addrs:
      - 'f1@example.com'
      - 'f2@example.com'
    subject_pattern: ''
    content_pattern: ''
  -
    to_addrs:
      - 't1@example.com'
      - 't2@example.com'
    from_addrs:
      - 'f1@example.com'
      - 'f2@example.com'
    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

标签:邮件自动转发ForMaiR

我的评论:

请  后发表评论。