Re: Hide [bracketed topic indicators] such as prepended by mailing lists
On Tue, Apr 10, 2012 at 07:10:18PM -0500, David Champion wrote: * On 10 Apr 2012, Michael Ludwig wrote: 28.06.11 14:08+0200 Alexander Muyla 21 [Firebird-net-provider] Consol 29.06.11 01:56-0700 ven ~ 6 [Firebird-net-provider] fbdata 30.06.11 19:40+ Nataniel (JIRA) 98 [Firebird-net-provider] [FB-Tr Does anyone know of a why to hide those tags short of editing the source? [...] Examples of subjectx commands I've used: subjectrx '^(re: *)?\[[^]]*\] *' '%1%R' subjectrx '\[nsit-rt #[0-9]+\] *' '%L%R' subjectrx '\[nsit-[^\0-9]*\]:? *' '%L%R' subjectrx '\[servicedesk #([0-9]+)\] ([^.]+)\.([^.]+) - (new|open|pending|update) - ' '%L[#%1] %R' The advantage of this solution is that it affects only how the message is displayed in the pager, so the people who set up the mailing list to expect these [list tags] still get them back from you when you reply. I have something similar in that I patched mutt to call a Lua function to filter subject lines (the function receives marshalled envelope data from mutt and returns a string subject line to display). As with the above it only affects how the line is displayed, and so replies still get sent with the original line. I actually use it to *add* bracketed tags to subject lines, for example marking messages from certain senders/lists or those addressed to non-existent users on my mail server. -Dave Dodge/dodo...@dododge.net
how to get mutt new mails' number
Hi,all I am a newcomer to mutt, Is there any method to show that how many new mails and how many mails in all in my mailboxs i read the mutt manual ,but i can not find a command to get the result! for example, i have a inbox call gmail, in it, there has 15 new mails and 30 mails in all, then i want a mutt command to return the numbers and let other shell command use it!
Re: Hide [bracketed topic indicators] such as prepended by mailing lists
On 2012-04-11 at 12:58 +, Grant Edwards wrote: It may not be applicable, but back before I switched to usnig gmane for reading mailing lists, I used a procmail script to sort mailing list postings into their own folders and ran the messages through formail to remove the tags. I keep the information about my mailing lists in a file similar to what Chris Green described in this thread. In order to prevent overzealous munging I use a sed script generated from it to remove the subject prefixes. After a quick glance over formail's manual page I was not able to see how one could use it to edit the contents of a header field -- only to add or remove complete header fields. Would you mind sharing your configuration? These days I leave all my mail on an IMAP server, so that approach wouldn't really work unless I could run procmail/formail on the server. If your IMAP server is able to run Sieve scripts you could try to pull off something similar with it. Regards, Sebastian
Re: how to get mutt new mails' number
Quoth vinurs on Thursday, 12 April 2012: Hi,all I am a newcomer to mutt, Is there any method to show that how many new mails and how many mails in all in my mailboxs i read the mutt manual ,but i can not find a command to get the result! for example, i have a inbox call gmail, in it, there has 15 new mails and 30 mails in all, then i want a mutt command to return the numbers and let other shell command use it! If you're using mbox format, then this ruby script will output the number of new messages in an mbox passed as an argument or piped to its stdin: #!/usr/bin/env ruby UNIX_FROM = /^From \S+ ([A-Z][a-z]{2} ){2}[\s\d]\d \d{2}:\d{2}:\d{2} \d{4}$/ newmail=0 in_hdr=false $.each do |line| case line when UNIX_FROM newmail += 1 in_hdr = true when /^Status: RO/ newmail -= 1 if in_hdr when /^\s*$/ in_hdr = false end end puts newmail -- .O. | Sterling (Chip) Camden | http://camdensoftware.com ..O | sterl...@camdensoftware.com | http://chipsquips.com OOO | 2048R/D6DBAF91 | http://chipstips.com pgphiT68bnRUJ.pgp Description: PGP signature
Re: how to get mutt new mails' number
* vinurs schrieb am 12. Apr. 2012: I am a newcomer to mutt, Is there any method to show that how many new mails and how many mails in all in my mailboxs i read the mutt manual ,but i can not find a command to get the result! for example, i have a inbox call gmail, in it, there has 15 new mails and 30 mails in all, then i want a mutt command to return the numbers and let other shell command use it! lsmbox - list number of total, old unread, and new messages for the specified mailbox(es) http://ftp.de.debian.org/debian/pool/main/l/lsmbox/lsmbox_2.1.2.orig.tar.gz Andreas
Re: how to get mutt new mails' number
Chip Camden wrote: Quoth vinurs on Thursday, 12 April 2012: ... i have a inbox call gmail... If you're using mbox format... Snipped for clarity.
Re: Hide [bracketed topic indicators] such as prepended by mailing lists
On 2012-04-12, Sebastian Schwarz sesch...@googlemail.com wrote: On 2012-04-11 at 12:58 +, Grant Edwards wrote: It may not be applicable, but back before I switched to usnig gmane for reading mailing lists, I used a procmail script to sort mailing list postings into their own folders and ran the messages through formail to remove the tags. I keep the information about my mailing lists in a file similar to what Chris Green described in this thread. In order to prevent overzealous munging I use a sed script generated from it to remove the subject prefixes. After a quick glance over formail's manual page I was not able to see how one could use it to edit the contents of a header field -- only to add or remove complete header fields. Would you mind sharing your configuration? That was many, many years ago (I've been using gmane.org for a long time), and I don't have the procmail files any more. But after a quick glance at formail's man page, it looks like the '-I' option lets you replace a header field. IIRC the procmail delivery line just called formail and passed it the -I option with the new subject line (created with sed probably). -- Grant Edwards grant.b.edwardsYow! I'm having a at tax-deductible experience! gmail.comI need an energy crunch!!
Re: Hide [bracketed topic indicators] such as prepended by mailing lists
David Champion schrieb am 10.04.2012 um 19:10 (-0500): * On 10 Apr 2012, Michael Ludwig wrote: 28.06.11 14:08+0200 Alexander Muyla 21 [Firebird-net-provider] Consol 29.06.11 01:56-0700 ven ~ 6 [Firebird-net-provider] fbdata 30.06.11 19:40+ Nataniel (JIRA) 98 [Firebird-net-provider] [FB-Tr Does anyone know of a why to hide those tags short of editing the source? It now looks like this: 28.06.11 14:08+0200 Alexander Muyla 21 Console app for failing events 29.06.11 01:56-0700 ven ~ 6 fbdataadapter update 'dataType 30.06.11 19:40+ Nataniel (JIRA) 98 (DNET-386) Timeout exceeded or I've since edited the source, and I find this a much more compete solution. There are two patches and some muttrc configuration: https://bitbucket.org/dgc/mutt-dgc/raw/tip/replacelist https://bitbucket.org/dgc/mutt-dgc/raw/tip/subjectrx Applied against current trunk from Mercurial, together with trash folder patch; some fuzz, but no conflicts. Works as advertised, see above. The configuration is straightforward if you know regular expressions: subjectrx '\[Firebird-net-provider\] *' '%L%R' subjectrx '\[FB-Tracker\] Created: *' '%L%R' Thanks, David! Michael
Re: allow_ansi set, but I only get the first character highlighted
lilydjwg schrieb am 11.04.2012 um 19:40 (+0800): I'm using elinks to view those HTML emails. ~/.mailcap contains: text/html; muttHtml; copiousoutput Not answering your questions, but as you appear to like Python: https://bitbucket.org/blacktrash/muttils This allows you to have FF or IE or display your mail. -- Michael Ludwig
Re: Hide [bracketed topic indicators] such as prepended by mailing lists
On 2012-04-12 at 19:30 +, Grant Edwards wrote: IIRC the procmail delivery line just called formail and passed it the -I option with the new subject line (created with sed probably). After unfolding and decoding the header fields to UTF-8 I pipe the message through sed directly. For example the sed command for the list notm...@notmuchmail.org would look like this: sed '1,/^$/ { /^Subject:/s/\[notmuch\][[:space:]]*//g }' Just in case someone might be interested...