-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathREADME
More file actions
56 lines (37 loc) · 1.41 KB
/
README
File metadata and controls
56 lines (37 loc) · 1.41 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
MFS
===
Mfs or Mailfs is a linux kernel IMAP file system. It allows to mount an IMAP
server in a directory and reading mails by reading files.
NOTICE
------
This project is at its early stage, and has only a pedagogic purpose to help me
learn how fs and networking work inside linux kernel. If you still want to give
it a shot I strongly recommend to test it in a VM.
Build it
--------
Simply run "make". Hopefully everything will build ok.
To compile with debug kernel messages run "make DEBUG=1"
How to use it
-------------
As root user:
insmod ./build/fs/mfs.ko
mount -o port=IMAPPORT,login=IMAPLOGIN,pass=IMAPPASS -tmfs IPADDR /mnt/mail
As normal user:
ls /mnt/mail/INBOX
cat /mnt/mail/INBOX/12
Mount helper
------------
In order to avoid to write your password in clear text on the command line, a
helper is in build/tools/mount.mfs.
First as root user copy build/tools/mount.mfs in /sbin then use mount as below:
insmod ./build/fs/mfs.ko
mount -o port=IMAPPORT,login=IMAPLOGIN -tmfs IPADDR /mnt/mail
It will ask you to enter imap password at mount time without printing it.
TODO (not in order)
-------------------
- Export mail in an maildir/mbox/understandable format
- Implement mail body cache, so not to fetch mail body too often (use
address_space_operation to use buffer cache)
- Support mail deletion when doing a "rm" on it.
- Support concurrent file access (protect imap structure)
- and so on ...