-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit c81913a
Showing
6 changed files
with
428 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'v*' | ||
|
||
jobs: | ||
|
||
release: | ||
name: Release | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- name: Create Release | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ steps.get_version.outputs.VERSION }} | ||
release_name: Cafe ${{ steps.get_version.outputs.VERSION }} | ||
draft: false | ||
prerelease: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
.vscode |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2020 K8sCat <[email protected]> | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# Cafe | ||
|
||
<p align="center"> | ||
<a href="https://github.com/k8scat/Cafe">GitHub</a> | | ||
<a href="https://gitee.com/hsowan/Cafe">码云</a> | ||
</p> | ||
|
||
Auto forward emails with custom rules. | ||
|
||
## Custom rules | ||
|
||
Emails which meet follow rules will be auto forwarded to `to_addrs`. | ||
|
||
- [x] Email `from_addr[1]` in `from_addrs` | ||
- [x] Email `subject` meet `subject_pattern` | ||
- [x] Email `plain_content` or `html_content` meet `content_pattern` | ||
|
||
```python | ||
email = { | ||
'from_addr': ('realname', '[email protected]'), | ||
'subject': '', | ||
'plain_content': '', | ||
'html_content': '' | ||
} | ||
|
||
transfer_rules = [ | ||
{ | ||
'to_addrs': [''], | ||
'from_addrs': [''], | ||
'subject_pattern': r'', | ||
'content_pattern': r'' | ||
} | ||
] | ||
``` | ||
|
||
## About `last_email_count` | ||
|
||
`Cafe` support forward emails in the specified range. | ||
|
||
```python | ||
[last_email_count+1, email_count+1] | ||
``` | ||
|
||
- `last_email_count` is read from the `index_file` (default 0 if not exists) | ||
- `email_count` is from `pop3_server.stat` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# Cafe | ||
|
||
<p align="center"> | ||
<a href="https://github.com/k8scat/Cafe">GitHub</a> | | ||
<a href="https://gitee.com/hsowan/Cafe">码云</a> | ||
</p> | ||
|
||
自定义规则的邮件自动转发工具。 | ||
|
||
## 自定义规则 | ||
|
||
满足下列任一规则的邮件会被转发到指定的邮箱列表(`to_addrs`) | ||
|
||
- [x] 邮件的发件人(`from_addr[1]`)在指定的发件人列表中(`from_addrs`) | ||
- [x] 邮件的主题(`subject`)匹配指定的主题正则表达式(`subject_pattern`) | ||
- [x] 邮件的内容(`plain_content` 或 `html_content`)匹配指定的内容正则表达式(`content_pattern`) | ||
|
||
```python | ||
email = { | ||
'from_addr': ('realname', '[email protected]'), | ||
'subject': '', | ||
'plain_content': '', | ||
'html_content': '' | ||
} | ||
|
||
transfer_rules = [ | ||
{ | ||
'to_addrs': [''], | ||
'from_addrs': [''], | ||
'subject_pattern': r'', | ||
'content_pattern': r'' | ||
} | ||
] | ||
``` | ||
|
||
## 关于 `last_email_count` | ||
|
||
`Cafe` 支持自动转发指定范围内的邮件。 | ||
|
||
```python | ||
[last_email_count+1, email_count+1] | ||
``` | ||
|
||
- `last_email_count` 从 `index_file` 文件中读取 (如果文件不存在,则默认是 0) | ||
- `email_count` 从 `pop3_server.stat` 获取 |
Oops, something went wrong.