Skip to content

Latest commit

 

History

History
82 lines (61 loc) · 1.78 KB

README.md

File metadata and controls

82 lines (61 loc) · 1.78 KB

ForMaiR - auto Forward eMails with custom Rules

CodeFactor

GitHub | 码云

Installation

Install using pip

$ python3 -m pip install --user formair

Install using git

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

Usage

Refer config: template/config.yaml

$ formair # load config from ./config.yaml

$ formair /path/to/config.yaml # load config from /path/to/config.yaml

Custom rules

Emails which meet follow rules will be auto forwarded to to_addrs.

  • Email from_addr[1] in from_addrs
  • Email subject meet subject_pattern
  • Email plain_content or html_content meet 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: ''

Only forwarding the new emails

Support forwarding new emails in the specified range.

  • Get last_email_index from the index_file (default 0 if not exists)
  • Get email_count from pop3_server.stat
for index in range(last_email_index+1, email_count+1):
    pass

Docs

https://formair.io