Tag Info

Hot answers tagged

22

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


7

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; text/html; luakit '%s' &; test=test -n "$DISPLAY"; ...


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.


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

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


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

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


5

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). ...


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

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

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


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

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

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

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

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

You set the headers you want to display in muttrc, like so: # headers to show ignore * # ignore all headers unignore from: to: cc: date: subject: # show only these hdr_order from: to: cc: date: subject: # and in this order


3

The shell commands are executed when the config setting is read, not every time you reply. You can see that by entering set attribution="Date: `date`" It never changes. And of course, expandos aren't expanded at that moment. There is way: if you end the string with a |, mutt assumes it is a command and just executes it and uses its output (the ...


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


3

There is no facility in mutt to run a user-defined command upon receiving new mail. A workaround could be this one: use imapfilter itself to copy the emails to a another IMAP mailbox (e.g., +INBOX2), configure mutt to read new mail from =INBOX2 (e.g., set spoolfile="+INBOX2" in .muttrc) You could run imapfilter from mutt (just bind its invocation to a ...


3

You could switch to esmtp, there it is pretty trivial: identity myself@gmail.com hostname smtp.googlemail.com:25 username "myself@gmail.com" password "secret" starttls enabled default identity mysecondaccount@gmail.com hostname smtp.googlemail.com:25 username "mysecondaccount@gmail.com" ...


3

I've been some researching, with some help from a friend, and that's what we have found out. It's possible to change the list of mailboxes (pressing "c" plus "?", for instance), but I think at the moment there is no easy way (but maybe there is a not-so-easy way) to change the names in the folder browser (I suppose that would change mutt-patched tree). From ...


3

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


3

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)


3

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



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