Where is mutt configuration file




















Since it's made in a text format to return fast results, some people might feel Mutt does not do the job well for mails with images. Nevertheless, Mutt should be your first choice if you want a command-line email client for Linux. Forget webmailthe best way to manage email is in a mail client. But which one? Choose from the 10 best Linux email clients. Wini is a Delhi based writer, having 2 years of writing experience. During her writing stints, she has been associated with digital marketing agencies and technical firms.

She has written content related to programming languages, cloud technology, AWS, Machine Learning, and much more. In her free time, she likes to paint, spend time with her family and travel to the mountains, whenever possible.

What Is Mutt? Here are some features that would convince you of Mutt's true mettle as a mailbox handler: It's easy to install and configure. It wholeheartedly supports message threading. Utilize the excellent feature of mailing lists. Well so does Mutt! You just have to know how to set it up. First, you'll need abook. Add a new contact foobar and foo bar.

Next, you'll need to edit your muttrc file to be able to query your address book. Add this into your. Type in foo Or the first name of the person you added into your abook , and a list should appear with anybody from your abook matching the query. This is set by the smime. The program can be then be used to import and list certificates. Mutt will next look for a file named. If this file does not exist and your home directory has a subdirectory named.

In addition, Mutt supports version specific configuration files that are parsed instead of the default files as explained above. For instance, if your system has a Muttrc The same is true of the user configuration file, if you have a file. Mutt is highly configurable because it's meant to be customized to your needs and preferences.

However, this configurability can make it difficult when just getting started. Among them, sample. An initialization file consists of a series of commands. Each line of the file may contain one or more commands. You can use it to annotate your initialization file. All text after the comment character to the end of the line is ignored.

The difference between the two types of quotes is similar to that of many popular shell programs, namely that a single quote is used to specify a literal string one that is not interpreted for shell variables or quoting with a backslash [see next paragraph] , while double quotes indicate a string for which should be evaluated.

For example, backticks are evaluated inside of double quotes, but not for single quotes. Lines are first concatenated before interpretation so that a multi-line can be commented by commenting out the first line only.

Example 3. Splitting long configuration commands over several lines. It is also possible to substitute the output of a Unix command in an initialization file.

In Example 3. Since initialization files are line oriented, only the first line of output from the Unix command will be substituted. Using external command's output in configuration files. To avoid the output of backticks being parsed, place them inside double quotes.

For example,. Mutt expands the variable when it is assigned, not when it is used. If the value of a variable on the right-hand side of an assignment changes after the assignment, the variable on the left-hand side will not be affected. See the Using MuttLisp section for more details.

The commands understood by Mutt are explained in the next paragraphs. For a complete list, see the command reference. Because Mutt first recodes a line before it attempts to parse it, a conversion introducing question marks or other characters as part of errors unconvertable characters, transliteration may introduce syntax errors or silently change the meaning of certain tokens e. Mutt supports grouping addresses logically into named groups. An address or address pattern can appear in several groups at the same time.

These groups can be used in patterns for searching, limiting and tagging and in hooks by using group patterns. This can be useful to classify mail and take certain actions depending on in what groups the message is.

Using send-hook , the sender can be set to a dedicated one for writing mailing list messages, and the signature could be set to a mutt-related one for writing to a mutt list — for other lists, the list sender setting still applies but a different signature can be selected.

The group command is used to directly add either addresses or regular expressions to the specified group or groups. The different categories of arguments to the group command can be in any order.

The flags -rx and -addr specify what the following strings that cannot begin with a hyphen should be interpreted as: either a regular expression or an email address, respectively. These address groups can also be created implicitly by the alias , lists , subscribe and alternates commands by specifying the optional -group option. Besides many other possibilities, this could be used to automatically mark your own messages in a mailing list folder as read or use a special signature for work-related messages.

The ungroup command is used to remove addresses or regular expressions from the specified group or groups. As soon as a group gets empty because all addresses and regular expressions have been removed, it'll internally be removed, too i. When removing regular expressions from a group, the pattern must be specified exactly as given to the group command or -group argument.

It's usually very cumbersome to remember or type out the address of someone you are communicating with. The optional -group argument to alias causes the aliased address es to be added to the named group. Unlike other mailers, Mutt doesn't require aliases to be defined in a special file. The alias command can appear anywhere in a configuration file, as long as this file is source d. Consequently, you can have multiple alias files, or you can have all aliases defined in your.

This file is not special either, in the sense that Mutt will happily append aliases to any file, but in order for the new aliases to take effect you need to explicitly source this file too. To use aliases, you merely use the alias at any place in Mutt where Mutt prompts for addresses, such as the To: or Cc: prompt.

In addition, at the various address prompts, you can use the tab character to expand a partial alias to the full alias. If there are multiple matches, Mutt will bring up a menu with the matching aliases. In order to be presented with the full list of aliases, you must hit tab without a partial alias, such as at the beginning of the prompt or after a comma denoting multiple addresses.

This command allows you to change the default key bindings operation invoked when pressing a key. Multiple maps may be specified by separating them with commas no additional whitespace is allowed.

The currently defined maps are:. This is not a real menu, but is used as a fallback for all of the other menus except for the pager and editor modes. If a key is not defined in another menu, Mutt will look for a binding to use in this menu. This allows you to bind a key to a certain function in multiple menus instead of having multiple bind statements to accomplish the same task. The alias menu is the list of your personal aliases as defined in your. It is the mapping from a short alias name to the full email address es of the recipient s.

The browser is used for both browsing the local directory structure, and for listing all of your incoming mailboxes. The editor is used to allow the user to enter a single line of text, such as the To or Subject prompts in the compose menu. The postpone menu is similar to the index menu, except is used when recalling a message the user was composing, but saved until later.

The mixmaster screen is used to select remailer options for outgoing messages if Mutt is compiled with Mixmaster support. In addition, key may be a symbolic name as shown in Table 3. For a complete list of functions, see the reference. Note that the bind expects function to be specified without angle brackets.

Some key bindings are controlled by the terminal, and so by default can't be bound inside Mutt. These terminal settings can be viewed and changed using the stty program.

Once unbound e. The cd command changes Mutt's current working directory. This affects commands and functions like source , change-folder , and save-entry that use relative paths. Using cd without directory changes to your home directory.

The charset-hook command defines an alias for a character set. This is useful to properly display messages which are tagged with a character set name not known to Mutt. The iconv-hook command defines a system-specific name for a character set. This is helpful when your systems character conversion library insists on using strange, system-specific names for character sets.

It is often desirable to change settings based on which mailbox you are reading. The folder-hook command provides a method by which you can execute any configuration command. If a mailbox matches multiple folder-hook s, they are executed in the order given in the. The regexp parameter has mailbox shortcut expansion performed on the first character. See Mailbox Matching in Hooks for more details.

Settings are not restored when you leave the mailbox. For example, a command action to perform is to change the sorting method based upon the mailbox being read:.

However, the sorting method is not restored to its previous value when reading a different mailbox. The keyboard buffer will not be processed until after all hooks are run; multiple push or exec commands will end up being processed in reverse order. Macros are useful when you would like a single key to perform a series of actions. When you press key in menu menu , Mutt will behave as if you had typed sequence. So if you have a common sequence of commands you type, you can create a macro to execute those commands with a single key or fewer keys.

Multiple maps may be specified by separating multiple menu arguments by commas. Whitespace may not be used in between the menu arguments and the commas separating them. For a listing of key names see the section on key bindings. Functions are listed in the reference.

The advantage with using function names directly is that the macros will work regardless of the current key bindings, so they are not dependent on the user having particular key definitions. This makes them more robust and portable, and also facilitates defining of macros in files used by more than one user e.

Optionally you can specify a descriptive text after sequence , which is shown in the help screens if they contain a description. Macro definitions if any listed in the help screen s , are silently truncated at the screen width, and are not wrapped. If your terminal supports color, you can spice up Mutt by creating your own color scheme.

To define the color of an object type of information , you must specify both a foreground color and a background color it is not possible to only specify one or the other. When set, color is applied only to the exact text matched by regexp. The color name can optionally be prefixed with the keyword bright or light to make the color boldfaced or light e.

The precise behavior depends on the terminal and its configuration. If your terminal supports it, the special keyword default can be used as a transparent color. The value brightdefault is also valid. The S-Lang library requires you to use the lightgray and brown keywords instead of white and yellow when setting this variable. The uncolor command can be applied to the index, header and body objects only. It removes entries from the list. You must specify the same pattern specified in the color command for it to be removed.

Mutt also recognizes the keywords color0 , color1 , This is useful when you remap the colors for your display for example by changing the color associated with color2 for your xterm , since color names may then lose their normal meaning. For object , composeobject , and attribute , see the color command. Though there're precise rules about where to break and how, Mutt always folds headers using a tab for readability.

Note that the sending side is not affected by this, Mutt tries to implement standards compliant folding. Messages often have many header fields added by automatic processing systems, or which may not seem useful to display on the screen. This command allows you to specify header fields which you don't normally want to see in the pager.

You do not need to specify the full header field name. To hide the latter, instead use " unignore from: date subject to cc " on the second line. With various functions, Mutt will treat messages differently, depending on whether you sent them or whether you received them from someone else. For instance, when replying to a message that you sent to a different party, Mutt will automatically suggest to send the response to the original message's recipients — responding to yourself won't make much sense in many cases.

Many users receive e-mail under a number of different addresses. To fully use Mutt's features here, the program must be able to recognize what e-mail addresses you receive mail under.

That's the purpose of the alternates command: It takes a list of regular expressions, each of which can identify an address under which you receive e-mail. As addresses are matched using regular expressions and not exact strict comparisons, you should make sure you specify your addresses as precise as possible to avoid mismatches.

For example, if you specify:. As a solution, in such cases addresses should be specified as:. The -group flag causes all of the subsequent regular expressions to be added to the named group. The unalternates command can be used to write exceptions to alternates patterns. If an address matches something in an alternates command, but you nonetheless do not think it is from you, you can list a more precise pattern under an unalternates command.

To remove a regular expression from the alternates list, use the unalternates command with exactly the same regexp. Likewise, if the regexp for an alternates command matches an entry on the unalternates list, that unalternates entry will be removed. Mutt has a few nice features for handling mailing lists. In order to take advantage of them, you must specify which addresses belong to mailing lists, and which mailing lists you are subscribed to.

Mutt also has limited support for auto-detecting mailing lists: it supports parsing mailto: links in the common List-Post: header which has the same effect as specifying the list address via the lists command except the group feature.

For unsubscribed lists, this will include your personal address, ensuring you receive a copy of replies. For subscribed mailing lists, the header will not, telling other users' mail user agents not to send copies of replies to your personal address. The Mail-Followup-To header is a non-standard extension which is not supported by all mail user agents.

Adding it is not bullet-proof against receiving personal CCs of list messages. More precisely, Mutt maintains lists of patterns for the addresses of known and subscribed mailing lists.

Every subscribed mailing list is known. To mark a mailing list as known, use the list command. To mark it as subscribed, use subscribe. You can use regular expressions with both commands. To mark all messages sent to a specific bug report's address on Debian's bug tracking system as list mail, for instance, you could say. Specify as much of the address as you need to remove ambiguity. For example, if you've subscribed to the Mutt mailing list, you will receive mail addressed to mutt-users mutt.

So, to tell Mutt that this is a mailing list, you could add lists mutt-users to your initialization file. To tell Mutt that you are subscribed to it, add subscribe mutt-users to your initialization file instead. If you also happen to get mail from someone whose address is mutt-users example. The -group flag adds all of the subsequent regular expressions to the named address group in addition to adding to the specified address list. To remove a mailing list from the list of subscribed mailing lists, but keep it on the list of known mailing lists, use unsubscribe.

All of the mailing list configuration options described so far govern mutt's knowledge of your list subscriptions and how it presents list information to you. If you have a message from a mailing list, you can also use the list menu bound to "ESC L" by default to interact with the message's list's list server.

This makes it easy to subscribe, unsubscribe, and so on. This command is used to move read messages from a specified mailbox to a different mailbox automatically when you quit or change folders. Unlike some of the other hook commands, only the first matching regexp is used it is not possible to save read mail in more than a single mailbox. This command specifies folders which can receive mail and which will be checked for new messages periodically.

Use -nonotify to disable notifying when new mail arrives. The -notify argument can be used to reenable notifying for an existing mailbox. If unspecified: a new mailbox will notify by default, while an existing mailbox will be unchanged. To disable polling, specify -nopoll before the mailbox name. The -poll argument can be used to reenable polling for an existing mailbox.

If unspecified: a new mailbox will poll by default, while an existing mailbox will be unchanged. The -label argument can be used to specify an alternative label to print in the sidebar or mailbox browser instead of the mailbox path.

A label may be removed via the -nolabel argument. If unspecified, an existing mailbox label will be unchanged. The URL syntax is described in Section 1. If none of these shortcuts are used, a local path should be absolute as otherwise Mutt tries to find it relative to the directory from where Mutt was started which may not always be desired.

The standard for electronic mail RFC says that space is illegal there, so Mutt enforces the rule. This command is used to override the default mailbox used when saving messages.

Also see the fcc-save-hook command. Mutt searches the initial list of message recipients for the first matching pattern and uses mailbox as the default Fcc: mailbox. See Message Matching in Hooks for information on the exact format of pattern. Note, however that the fcc-save-hook is not designed to take advantage of multiple mailboxes, as fcc-hook is. For correct behavior, you should use separate fcc and save hooks in that case.

These commands can be used to execute arbitrary configuration commands based upon recipients of the message. However, you can inhibit send-hook in the reply case by using the pattern '! For each type of send-hook or reply-hook , when multiple matches occur, commands are executed in the order they are specified in the. They are not executed when resuming a postponed draft. This command can be used to execute arbitrary configuration commands before viewing or formatting a message based upon information about the message.

When multiple matches occur, commands are executed in the order they are specified in the. The crypt-hook command provides a method by which you can specify the ID of the public key to be used when encrypting messages to a certain recipient. You may use multiple crypt-hooks with the same regexp; multiple matching crypt-hooks result in the use of multiple keyids for a recipient. If all crypt-hooks for a recipient are declined, Mutt will use the original recipient address for key selection instead.

The meaning of keyid is to be taken broadly in this context: You can either put a numerical key ID or fingerprint here, an e-mail address, or even just a real name. Index-format-hooks with the same name are matched using pattern against the current message. Matching is done in the order specified in the. The hook's format-string is then substituted and evaluated.

Here is an example showing how to implement dynamic date formatting:. Another example, showing a way to prepend to the subject.

This command adds the named string to the beginning of the keyboard buffer. The string may contain control characters, key names and function names like the sequence string in the macro command. You may use it to automatically run a sequence of commands at startup, or when entering certain folders. For example, Example 3. Embedding push in folder-hook. Otherwise it will simulate individual just keystrokes, i.

Keystrokes can be used, too, but are less portable because of potentially changed key bindings. With default bindings, this is equivalent to the above example:. This command can be used to execute any function. Functions are listed in the function reference.

The score commands adds value to a message's score if pattern matches it. A message's final score is the sum total of all matching score entries. Negative final scores are rounded up to 0. The unscore command removes score entries from the list. You must specify the same pattern specified in the score command for it to be removed. Scoring occurs as the messages are read in, before the mailbox is sorted. A workaround is to push the scoring command in a folder hook.

This will cause the mailbox to be rescored after it is opened and input starts being processed:. Mutt has generalized support for external spam-scoring filters. By defining your spam patterns with the spam and nospam commands, you can limit , search , and sort your mail based on its spam attributes, as determined by the external filter.

If that fixes the problem, then once your spam rules are set to your liking, remove your stale header cache files and turn the header cache back on. Your first step is to define your external filter's spam patterns using the spam command. The appearance of this attribute is entirely up to you, and is governed by the format parameter. To match spam tags, mutt needs the corresponding header information which is always the case for local and POP folders but not for IMAP in the default configuration.

If you're using multiple spam filters, a message can have more than one spam-related header. You can define spam patterns for each filter you use. Instead of getting joined format strings, you'll get only the last one to match.

And it's what sorting by spam attribute will use as a sort key. That's a pretty complicated example, and most people's actual environments will have only one spam filter. The simpler your configuration, the more effective Mutt can be, especially when it comes to sorting. Generally, when you sort by spam tag, Mutt will sort lexically — that is, by ordering strings alphanumerically. However, if a spam tag begins with a number, Mutt will sort numerically first, and lexically only when two numbers are equal in value.

This is like UNIX's sort -n. A message with no spam attributes at all — that is, one that didn't match any of your spam patterns — is sorted at lowest priority. Numbers are sorted next, beginning with 0 and ranging upward. Clearly, in general, sorting by spam tags is most effective when you can coerce your filter to give you a raw number. But in case you can't, Mutt can still do something useful. The nospam command can be used to write exceptions to spam patterns. If a header pattern matches something in a spam command, but you nonetheless do not want it to receive a spam tag, you can list a more precise pattern under a nospam command.

If the pattern given to nospam is exactly the same as the pattern on an existing spam list entry, the effect will be to remove the entry from the spam list, instead of adding an exception. Likewise, if the pattern for a spam command matches an entry on the nospam list, that nospam entry will be removed.

This might be the default action if you use spam and nospam in conjunction with a folder-hook. You can have as many spam or nospam commands as you like. Specifies the type of folder to use: mbox , mmdf , mh or maildir. Currently only used to determine the type for newly created folders. An e-mail address either with or without realname. Arbitrary text, see Section This command is used to set and unset configuration variables.

There are four basic types of variables: boolean, number, string and quadoption. A value of yes will cause the action to be carried out automatically as if you had answered yes to the question.

Example: set noaskbcc. For boolean variables, you may optionally prefix the variable name with inv to toggle the value on or off. This is useful when writing macros. The toggle command automatically prepends the inv prefix to all specified variables. The unset command automatically prepends the no prefix to all specified variables.

The reset command resets all given variables to the compile time defaults hopefully mentioned in this manual. The unset and reset commands remove the variable entirely. Since user-defined variables are expanded in the same way that environment variables are except for the shell-escape command and backtick expansion , this feature can be used to make configuration files more readable.

Using user-defined variables for config file readability. I have problems configuring mutt e-mail client on Lubuntu First I installed Mutt using command: sudo apt install mutt Everything was ok, but when I tried to add my e-mail account Google or Yandex mail , I can't find muttrc configuration file?

Improve this question. Gilles 'SO- stop being evil' k gold badges silver badges bronze badges. Blue Blue 63 2 2 silver badges 5 5 bronze badges. Yes, it's a text file. Yes, you need to create it. No, we do not know what you need in the file. Add a comment. Active Oldest Votes. You will probably want a few additional settings, including: Caching.

Set the From: line with from and declare that same address as belonging to you with alternates. Gmail Note that for Gmail you'll need to either set up a per-application password preferred or enable plain IMAP access.

Accessing multiple accounts Mutt is a bit awkward when it comes to having multiple accounts. Improve this answer. Gilles 'SO- stop being evil' Gilles 'SO- stop being evil' k gold badges silver badges bronze badges. Why is mutt designed to keep a password in txt file?



0コメント

  • 1000 / 1000