Tag Info

Hot answers tagged

25

This tweak should get rid of your problem. Use gpg as suggested, or set imap_pass=`getpassword email_id` where you use pwsafe or passwords to fetch the passwords. Edit: If mutt is built with IMAP support (--enable-imap), then mutt should prompt you for the password if you do not set it in the config file. From the manual: imap_pass Type: ...


11

search and limit can also actually search inside messages, depending on the search patterns you give. From the Patterns subsection of the Mutt reference: ~b EXPR messages which contain EXPR in the message body ~B EXPR messages which contain EXPR in the whole message That is, ~b only searches in the body, whereas ~B also searches in the ...


8

The formatting in the index is controlled by the index_format setting -- it's generated by mutt. The Date header isn't controlled by mutt, it's a header included with the message that just gets displayed. If it shows UTC time it's because the sending server decided to use UTC when generating the header. The only way to change it is to actually change the ...


8

You can do this with mutt's mime support. In addition, you can use this with Autoview to denote two commands for viewing an attachment, one to be viewed automatically, the other to be viewed interactively from the attachment menu. Essentially, you include two options in your mailcap file1. text/html; luakit '%s' &; test=test -n "$DISPLAY"; needsterminal; ...


8

The s command saves to a mailbox, which for you is in maildir format. Unfortunately, there is no save-to-file command, perhaps because in the historical mbox format, a mailbox that contains a single mail is just a file containing that mail. The mutt command pipe-message (default shortcut |) can be used for this. It opens a command line and you write cat ...


7

An old message is an unread message that is not new. A message is new if this is the first time the mail reader has noticed it in your mailbox. So if you start your mail reader and there are five new messages and you quit without reading any of them, the next time you start the reader there should be five old messages.


7

You need to run the tag-pattern command. The default for that is T (Shift+t). You can then give it a regular expression. By default this will match message subjects. If you need to select a range of messages by number, you can provide the ~m [MIN]-[MAX] pattern to tag-pattern. There are many other options I've found useful over the years, and you can ...


6

There is also Muttprint. It does support UTF-8 and its output looks decent by default. Muttprint seems to use LaTeX and seems to provide hooks for customization. Since I am printing mails from different environments I can't use a default printer. Thus I have set it up (via ~/.muttrc) to use a PDF viewer where I can dynamically select a printer: set ...


6

mutt doesn't seem able to open individual messages. What you can do is convert the .eml file into an mbox folder containing a single message. This basically involves adding a From line at the top, which can be done using formail -b: formail -b < themessage.eml > themessage.mbox This can then be opened within mutt using change-folder (default key c). ...


6

You can set the index_format variable to include all manner of different details about each message. In particular, you probably want the %d format string, which inserts the date formatted according to the value of date_format, or one of the other date format strings, such as %{fmt}, %[fmt], etc. As an example, here is my default index_format setting: set ...


6

Create a folder ~/.mutt Split up your configuration in your folder source all the config files in your folder, i.e. (from my ~/.mutt/muttrc): . source ~/.mutt/rc source ~/.mutt/hooks source ~/.mutt/macros source ~/.mutt/ml source ~/.mutt/gnupg


6

After you compose a message, but before sending you have lots of options available to you. Press ? to view them. Some that may help here: F to filter the attachment through an external processor Use pandoc -s -f markdown -t html to convert to HTML ^T to edit the attachment MIME type Change from text/plain to text/html. Now a macro that will do ...


6

The obvious answer is Alpine, which used to be Pine, but was freed by the University of Washington. Pine is non-free software, Alpine is free software. Alpine is quite similar to Mutt, but Mutt is generally considered to be more powerful and flexible. The current active branch of Alpine is a fork called Re-Alpine, since the University of Washington has ...


5

You could pipe the message to ripmime, which lets you specify a destination directory on the command line...e.g.: ripmime -i - -d ~/myfiles/ The -i - tells ripmime to read from standard input, and -d specifies a destination directory. If that's too much typing, stick it in a shell script and call that (which will also make it easier if you want to use ...


5

I assume you want to edit the mail before it is sent? In that case piping is not going to work because mutt receives an EOF when the pipe closes. Either use an actual file or use process substitution, a ksh93 feature also available in bash and zsh, e.g.: mutt -i<(git request-pull HEAD https://...) -s SUBJECT invalid@example.org


4

Taking Gilles' advice, here's a version that uses a temp file and formail. #!/bin/bash TMPFILE=$(mktemp) # save the message to a file cat - >"$TMPFILE" # extract the date header DATE=$( formail -xDate: < "$TMPFILE" ) # convert to the current timezone (defined by TZ) DATE=$( date -R -d "$DATE" ) # output the modified message echo "Date: $DATE" formail ...


4

Mutt does support reading and writing mbox-format mail folders where all the messages are concatenated into one file. The tradeoff, however of using this format is that when messages are deleted, the entire file needs to be re-written. One advantage, however is that you can gzip-compress the mbox. AFAIK, you can just refer to any mail folder as you would a ...


4

If you set the edit_headers option to yes, you can edit all the headers of a mail before sending, and you can set your own Date header. A legitimate use for this is choosing your own timezone, or your own calendar. Each server that your email passes through will add a Received header containing the date at which it received the mail (or the date at which it ...


4

From man 1 ssh -t Force pseudo-tty allocation. This can be used to execute arbitrary screen-based programs on a remote machine, which can be very useful, e.g. when implementing menu services. Multiple -t options force tty allocation, even if ssh has no local tty. Now mutt has a tty to display it's menus on. (You would use -tt if connecting ...


4

You can write a macro and bind it to a key, or key sequence. For example, in my muttrc I include this line: macro index \Cs "<change-folder> =JWR/INBOX.Sent<enter>" "go to Sent Items" It takes me to my Sent items with Ctrls. You can determine the correct name of the relevant maildir folder by bringing up the prompt with c and then hitting ? ...


4

You want to execute two functions (delete-message and exit) at once so you have to use a macro: macro pager d '<delete-message><exit>' This will bind d to delete the current message and exit the pager. You can do the same for s but it gets a little bit more complicated as you need to have user input, if you just accept the default save ...


4

It's not possible with key bindings. Ctrl-G is hardcoded in mutt at a lower level than the macro or keybinding processing (see mutt_getch() in mutt's source code, at the core of all user input in mutt that returns an error upon ^G). macro editor \e '^G' wouldn't work either. What you can do is configure your terminal to send ^G upon pressing Escape With ...


4

Bind a key (G for "Get" is recommended) to imap-fetch-mail in your ~/.muttrc. bind index G imap-fetch-mail Pressing G while in the index will now fetch new mail from the imap server. (for POP users, the fetch-mail function fetches mail from a POP server)


4

The actual message shows up as an attachment as well, so you can save it from the attachment list. From either the index or the message itself, hit v to open the attachments and s to save


4

When using smtp submission on port 587 the value for smtp_url should start with "smtp://", i.e. not with "smtps://". It is also important to make sure ssl_starttls is set to "yes", as correctly done in the config above. While setting up my own server I got the exact same problem. Having access to logs on both the client & the server side made it obvious ...


4

Mutt can optionally be built with SMTP, POP3 and IMAP4 support. Most mainstream distributions probably do build it that way. It looks like Hotmail allows POP3 access to e-mail, which certainly makes things easier. In that case, you'd probably be looking at setting up $pop_host and perhaps its friends if you want to use only mutt. Alternatively, you can use ...


4

If you are using the "development" version of mutt (v1.5+) - and you absolutely should - there is the possibility to use an external filter as described in the manual. First you need a script that can output different things according to the age of a message. Here is an example in Python: #!/usr/bin/env python """mutt format date Prints different ...


3

Mutt is available as a package in the three main Package Managers for OS X: Macports HomeBrew Fink Of these Unix package managers and I am currently using HomeBrew.


3

This is a huge hack, but somebody has already done the work for you. Edit: What if you attached your signature as an HTML file? mutt -e "set content_type=text/html" someone@somewhere.com -s "Hello" < mysig.html



Only top voted, non community-wiki answers of a minimum length are eligible