GNU Mailutils |
|
General-Purpose Mail Package |
Official GNU Software |
Decodes the input string str as per RFC 2047. Useful in printing ‘From:’, ‘To:’ and ‘Subject:’ headers.
Notice that, unlike the similar NMH function, decode
checks the value
of the global profile variable Charset
(see Charset variable)
to determine the charset to output the result in. If this variable is
not set, decode
returns its argument without any change. If
this variable is set to auto
, decode
tries to determine
the charset name from the setting of LC_ALL
environment
variable. Otherwise, the value of Charset
is taken to be the
name of the character set.
Returns package name (string ‘mailutils’).
Returns full package string (e.g. ‘GNU Mailutils 2.1’)
Returns mailutils version.
The function removes any leading whitespace and eventual ‘Re:’ prefix from its argument. Useful for creating subjects in reply messages:
%<{subject}Subject: Re: %(unre{subject})\\n%>
Sets the regular expression used to recognize reply messages. The argument r should be a POSIX extended regular expression. Matching is case insensitive.
For example, the following invocation
%(reply_regex ^\(re|aw|ang|odp\)\(\\[[0-9]+\\]\)?:[[:blank:]])
corresponds to English ‘Re’, Polish ‘Odp’, Norwegian ‘Aw’ or German ‘Ang’, optionally followed by a number in brackets, followed by colon and any amount of whitespace. Notice proper quoting of the regex metacharacters.
See also Reply-Regex
(see Reply-Regex variable) and
isreply
(see isreply MH function) below.
If str is not given, the value of ‘Subject:’ header is taken.
The function returns true if its argument matches the “reply subject”
regular expression. This expression is set via the global profile variable
Reply-Regex
(see Reply-Regex variable) or via the format
function reply_regex
.
This function is useful for creating ‘Subject:’ headers in reply messages. For example, consider the following construction:
%<{subject}%(lit)%<(isreply)%?\ (profile reply-prefix)%(concat)%|%(concat Re:)%>\ %(concat{subject})%(printhdr Subject: )\n%>
If the ‘Subject:’ header already contained reply prefix, this construct
leaves it unchanged. Otherwise it prepends to it the value of
Reply-Prefix
profile variable, or, if it is unset, the string
‘Re:’.
This expression is used in default replcomps and replgroupcomps files.
This function returns true if the given element is present in the
recipient mask (as modified by -cc or -nocc options) and
false otherwise. It is used in default formats for repl
and
comp
, e.g.:
%(lit)%<(rcpt to)%(formataddr{to})%>
Notice that this means that usual replcomps file will be ignoring -cc and -nocc options, unless it has been modified as shown above.
Appends whitespace + arg to string register.
Prints the value of string register, prefixed by str. The output is formatted as a RFC 822 header, i.e. it is split at whitespace characters nearest to the width boundary and each subsequent segment is prefixed with horizontal tabulation.
Generates the value for ‘In-reply-to:’ header according to RFC 2822.
Generates the value for ‘References:’ header according to RFC 2822.
This document was generated on January 2, 2022 using makeinfo.
Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved.