-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
59 lines (41 loc) · 1.28 KB
/
README
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
57
58
59
NetGovern Detach service
========================
This is a free/libre sucessor to Netmail Secure's Attachment Stripping Agent.
It consists of:
- a RESTful detach API (node service)
- a milter wrapper (in progress)
- some quick tests
Configuration
-------------
```
STORE or --store - CAS to use when storing stripped attachments.
PORT or --port - which port detach should listen on.
TRANSFORM or --transform - URL transform service
REPLACE or --replace - simple hostname substitution
```
Requirements
------------
- npm
- typescript
Build
-----
Build the "api" source directory:
$ cd api
$ npm install
$ tsc
Run
---
Once the detach api service is built:
$ cd api
$ STORE=http://caspoorhost:3237 node .
Use
---
To strip attachments from a message, POST its RFC822 data to /detach/ :
$ curl -H "Content-Type: text/plain" --data-binary @test.eml -X POST \
http://localhost:7001/detach/ >stripped.eml
The message will then contain links instead of attachments.
To restore the attachments, POST a stripped message to /reattach/ :
$ curl -H "Content-Type: text/plain" --data-binary @stripped.eml -X POST \
http://localhost:7001/reattach/ >restored.eml
For a simple reference implementation of a URL transform service, see
test/transform.js