A simple mailfs based on FUSE !!
- python >= 3.6
- fuse
+ site
|
+ mailbox1
| |
| + Sender
| |
| + Subject
| |
| + content.txt
| + content.html
| + ...
| + files
| |
| + file1
| + ...
+ mailbox2
+ mailbox3
+ ...
+ send
|
+ To Address
|
+ Subject
|
+ content.txt
+ content.html
+ ...
+ files
|
+ file1
+ ...
python main.py mount [-s STORAGE] [-t TIMEOUT] [-r RETRY] [-c CONFIG]
- STORAGE: Path to somewhere to cache data. default =
./storage
. - TIMEOUT: IMAP & SMTP socket connection timeout (s). default =
10
seconds. - RETRY: Max times of IMAP & SMTP login retry. default =
2
times - CONFIG: Path to configuration json file. default =
config.json
.
{
"site name": {
"suffix": "Email address suffix such as 'mails.tsinghua.edu.cn'",
"account": "YOUR ACCOUNT",
"password": "PASSWORD",
"encoding": "Default encoding",
"receive": {
"host": "IMAP Server Address",
"port": 993,
"ssl": true
},
"send": {
"host": "SMTP Server Address",
"port": 465,
"ssl": true
}
},
"another site": {
// ...
}
}
/subject/content.*
: body of this email./subject/files/*
: attached files in this email.
Use command chmod 777 <site_name>/send/<to>/<subject>
to send an email after putting correct mail structured files to <site_name>/send/<to>/<subject>
.