=head1 NAME

lei-tag - set/unset metadata on messages

=head1 SYNOPSIS

lei tag [OPTIONS] FILE [FILE...] METADATA [METADATA...]

lei tag [OPTIONS] (-|--stdin) METADATA [METADATA...]

=head1 DESCRIPTION

Set or unset volatile metadata on messages.  In JMAP terms, "volatile
metadata" includes "mailboxes" (analogous to a folder or label) and a
restricted set of "keywords".  This supported keywords are the
combination of system keywords (seen, answered, flagged, and draft),
which map to Maildir flags and mbox Status/X-Status headers, as well
as reserved keywords (forwarded, phishing, junk, and notjunk).

To add a label or keyword, prefix it with "+L:" and "+kw:",
respectively.  To remove a label or keyword, use "-L:" or "-kw:".  For
example, "+kw:flagged" would set the "flagged" keyword for the
specified messages, and "-L:INBOX" would remove the "INBOX" label.

=head1 OPTIONS

=over

=item -F MAIL_FORMAT

=item --in-format=MAIL_FORMAT

Message input format: C<eml>, C<mboxrd>, C<mboxcl2>, C<mboxcl>, or
C<mboxo>.

Default: C<eml>

=item -q

=item --quiet

Suppress feedback messages.

=back

=head1 LABELS

Labels are user-defined values analogous to IMAP/JMAP mailbox
names.  They must only contain lowercase characters, digits, and
a limited amount of punctuation (e.g. C<.>, C<->, C<@>).

Messages may have multiple labels.

=head1 KEYWORDS

Keywords are "flags" in Maildir and IMAP terminology.
Common keywords include: C<seen>, C<answered>, C<flagged>, and
C<draft>, though C<forwarded>, C<phishing>, C<junk>, and C<notjunk>
are also supported.

When writing to various mboxes, the common keywords will be
mapped to the C<Status> and C<X-Status> headers.

Messages may have multiple keywords.

=head1 CONTACT

Feedback welcome via plain-text mail to L<mailto:meta@public-inbox.org>

The mail archives are hosted at L<https://public-inbox.org/meta/> and
L<http://4uok3hntl7oi7b4uf4rtfwefqeexfzil2w6kgk2jn5z2f764irre7byd.onion/meta/>

=head1 COPYRIGHT

Copyright 2021 all contributors L<mailto:meta@public-inbox.org>

License: AGPL-3.0+ L<https://www.gnu.org/licenses/agpl-3.0.txt>

=head1 SEE ALSO

L<lei-add-external(1)>
