Skip to content

Change keyword/label/tag header fields of an e-mail message

License

Notifications You must be signed in to change notification settings

seschwar/mailkwds

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

87 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

% 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>

About

Change keyword/label/tag header fields of an e-mail message

Resources

License

Stars

Watchers

Forks

Packages

No packages published