New answers tagged

1

The question (and suggested answer) are a little obscure, but what is being described is mutt's use of the default color feature of ncurses (or slang). If your mutt color scheme uses the word "default" for the foreground or background, then at runtime mutt will ask ncurses/slang to use the terminal's default color. Whether in an application such as mutt or ...


2

As @infixed says, the X-Spam-Status header is continued across multiple lines. If you have procmail installed, you can use its formail utility to concatenate continued headers. From man formail: -c      Concatenate continued fields in the header. Might be convenient when postprocessing mail with standard (line oriented) text ...


3

It sounds like that X-Spam-Status line is a 'continued' RFC822 header that spans multiple lines. A header starts with non-whitespace in the first character of a line. A non-blank line with whitespace at the beginning is a continuation of the previous line, and a blank line ends the headers. If you want to filter out a particular header, you are going to ...


2

Rather than colours I just use the index_format string to show the presence of attachments, like this: set index_format = "[%Z][%?X?A& ?] %D %-20.20F %s %g" The %?X?A& ? is a ternary which says if the email has nonzero attachments then show the character "A", else show " ". You could actually show the number of attachments but I generally just ...


0

This cron job does what you specified daily at midnight: 0 0 * * * script >/dev/null -c 'env TERM=vt100 mutt -F/dev/null -falerts -e "push <delete-pattern>syscheck@example.com<enter><sync-mailbox>y<enter><exit>"' /dev/null Let's break that down. script -c 'cmd' runs cmd under a fake pseudo-tty (pty) so that cmd thinks it ...


0

Made some modifications, but didn't solve the "% in subject" issue #include <stdlib.h> #include <stdio.h> #include <time.h> #define DAY (time_t)86400 #define WEEK (time_t)604800 #define MONTH (time_t)2678400 #define YEAR (time_t)31556926 /*I use this line in .muttrc: * set index_format = '/home/marcus/.mutt/mfdate "%9[%d.%m.%y]" ...


0

Just to expand on Mayey's answer. This will read and delete a message without any side effects (e.g., moving to the next-entry when using tag-prefix, moving to the next-entry when user has resolve set to no): macro index d "<enter-command>set my_old_resolve=\$resolve noresolve<enter>\ ...


0

To delete a message and return to index properly without any side effects (e.g., exiting mutt): macro pager d <exit><delete-message>


1

You could use mutt to do this from cron with expect (or one of its many implementations in many other languages). #!/usr/bin/env expect spawn mutt -f alerts expect -ex "Mutt" # or something if you've customized the display send -- "D" send -- "syscheck@example.com" ... Another option would be to write code that does a similar thing via something like ...



Top 50 recent answers are included