ForMaiR - auto Forward eMails with custom Rules
Refer config: template/config.yaml
docker run -d --rm \
-v /path/to/config.yaml:/formair/conf/config.yaml \
k8scat/formair:latestpython3 -m pip install --user formairgit clone [email protected]:k8scat/ForMaiR.git
cd ForMaiR
python3 setup.py installRefer config: template/config.yaml
formair # load config from ./config.yaml
formair /path/to/config.yaml # load config from /path/to/config.yamlEmails which meet follow rules will be auto forwarded to to_addrs.
- Email
from_addr[1]infrom_addrs - Email
subjectmeetsubject_pattern - Email
plain_contentorhtml_contentmeetcontent_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: ''Support forwarding new emails in the specified range.
- Get
last_email_indexfrom the index_file (default 0 if not exists) - Get
email_countfrompop3_server.stat
for index in range(last_email_index+1, email_count+1):
pass