-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
80 lines (49 loc) · 2.76 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
% MAILKWDS(1) 0.0
% Sebastian Schwarz <[email protected]>
% 2010-06-14
# NAME
mailkwds -- edit email keywords/labels/tags stored in a message header field
# SYNOPSIS
`mailkwds` [*options*] [\--] [*command* [*keyword*]...]
# DESCRIPTION
`mailkwds` reads a single email message from standard input, searches for a "Keywords" or other specified header fields, modifies them according to the given command and writes the modified message with the new header fields to the standard output.
It automatically removes any duplicate keywords and combines multiple read header fields.
`mailkwds` is intended to be run as a message filter from a mail delivery agent such as `procmail` or `maildrop`.
# OPTIONS
-c, \--catenate
: Catenate the mail headers instead of refolding them to fit the 78 characters per line limit.
-h, \--help
: Print usage information.
-f *HEADER* *SEPARATOR*, \--from *HEADER* *SEPARATOR*, -i *HEADER* *SEPARATOR*, \--input *HEADER* *SEPARATOR*
: Read and parse the *HEADER* by splitting it on *SEPARATOR*.
If this option is specified multiple times the union of the *HEADER*s' keywords will be processed.
If it is not specified `mailkwds` defaults to `--input Keywords ','`.
-o *HEADER* *SEPARATOR*, \--output *HEADER* *SEPARATOR*, -t *HEADER* *SEPARATOR*, \--to *HEADER* *SEPARATOR*
: Print the processed keywords in the header field body of *HEADER* as a list separated by *SEPARATOR*.
If this option is specified multiple times all *HEADER*s will be printed, each with the complete set of processed keywords.
If it is not specified `mailkwds` defaults to `--output Keywords ', '`.
-v, \--version
: Print version information.
# COMMANDS
add
: Adds the given keywords to the header field body.
clear
: Deletes all specified header fields.
set
: Overwrites the header field body with the given keywords.
remove
: Removes the specified keywords from the header field body.
tidy
: Tidies the specified header field(s) by removing duplicates and odd formatting.
# BUGS
`mailkwds` strips trailing whitespace characters from the header fields.
It also does not do MIME de- and encoding of the keywords in the header fields.
If you find more bugs, please report them at <https://github.com/seschwar/mailkwds/issues>.
# EXAMPLES
Combine Mutt's X-Label and Thunderbird's X-Mozilla-Keys header fields into the standardized Keywords header field:
mailkwds --from X-Label , --from X-Mozilla-Keys ' ' tidy
Synchronize Dovecot's X-Keywords, Mutt's X-Label and Thunderbird's X-Mozilla-Keys header fields:
mailkwds -i X-Keywords ' ' -i X-Label , -i X-Mozilla-Keys ' ' -o X-Keywords ' ' -o X-Label ', ' -o X-Mozilla-Keys ' ' tidy
# SEE ALSO
`formail`(1), `maildirkw`(1), `reformail`(1), RFC 822, RFC 2822
Homepage: <https://github.com/seschwar/mailkwds>