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


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


6

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

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


5

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


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

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


4

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


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

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


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

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


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

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

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


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)


2

You won't need procmail or fetchmail. If you want a local copy of your mail, for offline access, use offlineimap. Otherwise, mutt can query the server live via IMAP. I think you will find it nearly impossible to avoid storing the password unencrypted if you use mutt to connect. With offlineimap, you can configure it to use gnome-keyring to store the ...


2

Short answer: it's entirely possible that the cache will not be comprehensive. If you delete mail and hcache later recomputes the header cache for that mailbox, your stats will not include mail from before the deletion. If you don't have access to the mail logs for your server, do you have access to a filter mechanism, e.g. procmail? You could use that to ...


2

http://www.mail-archive.com/mutt-users@mutt.org/msg44341.html This suggests using the 'pager_format', to make it show the letter date in the local timezone: set pager_format="%4C %Z %[!%b %e at %I:%M %p] %.20n %s%* -- (%P)"


2

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


2

Mutt supports and autodetects 4 mailbox formats: MH, MMDF, mbox, and Maildir. If you have an existing mbox file messages saved to it will be added to the mbox. mbox_type only sets the default for new mailboxes that you create.


2

Looks like you're setting smtp_url only in a folder-hook. That means that its only set when you use that folder, and when you're using the non-interactive command line method, it never actually tries to access the folder, so smtp_url isn't ever set, so it has no idea what method to send messages. It might be defaulting to some other method (like piping to ...


2

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.


2

The obvious way is to simply not include "trash can" in the list of mailboxes that mutt checks for new mail. i.e. don't add the trashcan folder to mailboxes. e.g. if you generate the mailboxes list with something like: mailboxes \ /var/spool/mail/username \ `find ~/Mail -type f | xargs` then add grep -v trashcan | just before the xargs, like so: ...



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