## ================================================================= ## File: $HOME/.mutt.color.index ## Purpose: Setup file for the Mail program "Mutt" ## Colorize text within messages headers ## Author: Sven Guckes setup-mutt.color.index(at)guckes.net ## Latest change: Tue Dec 06 19:42:23 CET 2016 ## Size: ca 21KB ## Availability: http://www.guckes.net/Setup/mutt.color.index ## Comments via email are very very welcome! :-) ## ================================================================= ## ======================================================================== ## Remember: Order counts! The *last* matching rule "wins". ## ======================================================================== ## ================================================== ## COLOR for both the Folder INDEX *and* the PAGER ## ================================================== # error messages color error red black # "message" - informational messages # such as the incremental count at startup. # It is nice to see on startup that # color actually works. :-) color message white blue ## ================================================== ## Special COLORs for the Folder INDEX ## ================================================== # The "indicator" for the "current message" - # whether it is an arrow or an "inverse line": color indicator white red # "status" lines in the folder index. # used for the mini-help line. color status white blue # The "tree" display of threads within the folder index. color tree red black ## ================================================== ## COLOR for some special messages. ## ================================================== # 2009-06-01 # the use of the color "default" requires *some* setting; # so you must set a color for "index" at least! # 2013-02-03 # mails which were not sorted # To: vim@vim.org # Reply-To: vim_use@googlegroups.com color index white green "~C vim@vim.org" save-hook "~C vim@vim.org" ~/Mail.IN/VIM # 2002-10-26 # bounced messages - as indicated by "Resent" headers. color index brightyellow blue "~h resent- ! ~h resent-by.*forw" # 2000-08-28 # Deleted Mails - use dark color # as these are already "dealt with". color index blue black "~D" # 2000-08-23 # Mails with no obvious addresses # (empty To: and Cc: lines) color index blue black "! ~C ." # Flagged Messages are important! color index brightred black "~F" # I use the flag to indicate that # I should reply to these soon. # mail from myself *and* to myself (TODO items): color index black brightyellow '~f guckes ~p' # the pattern "~p" means "from myself" - but alas # there is no pattern for "*from* myself" :-( # mail to myself (personal mail): # color index brightgreen black '~p' # Commented out as most mail is for me - except SPAM. # mail NOT to myself (unpersonal mail): # color index green black '! ~p' # "DONE mails" ie those I have already replied to. color index blue black '~Q' # MailList - these messages have been sent to a known mailing list. # Just what do these do in my mailbox, anyway? # folder-hook . 'color index default default ~l' # folder-hook '!' 'color index white blue ~l' # only show this for the mailbox (aka '!') - # not in other inboxes, of course. ## ================================================== ## Mails FROM special addresses ## ================================================== # mails from myself: # color index cyan black '~f guckes' color index cyan black '~P' ## ================================================== ## Mails TO special addresses ## ================================================== # Public Announcements on local domain # "To: studi-replies" etc # color index magenta black '~C -replies@math.fu-berlin.de' # CCs from posts on Usenet: # color index brightyellow red '~C guckes-usenet-cc' # this alone does not suffice because # it could simply be a personal reply. # CCs from 40tude Dialog [User-Agent: 40tude_Dialog/2.0.10.1de] # 2004-01-07 # color index brightyellow red '~C guckes-usenet-cc ~h "Posted-And-Mailed: yes"' # User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 # Newsgroups: de.comp.editoren # Posted-To: de.comp.editoren # color index brightyellow red '~C guckes-usenet-cc ~h "Posted-To: "' # SLRN Maintenance # color index brightblue white '~C guckes@slrn.org' # color index white brightblue '~C guckes@slrn.org' # VIM Maintenance # color index brightgreen white '~C guckes@vim.org' # folder-hook \! 'color index green black "~C guckes@vim.org"' # local mail aliases: # color index yellow black '~t ^(all\|hackers\|key\|studi)' # 2001-08-06 # replies without "re:" in the Subject line: # color index white green "(~h 'in-reply-to .' | ~x . ) ! ~s re:" color index white green "(~h ^in-reply-to: | ~x . ) ! ~s re:" # 2002-12-01 # CCs from Usenet color index brightmagenta default '~C guckes-usenet ~h newsgroups: ' color index brightmagenta default '~C guckes-usenet ~h x-posted-to:' color index brightmagenta default '~C guckes-usenet ~h posted-to:' color index brightmagenta default '~C guckes-usenet ~h MacSOUP ' color index brightmagenta default '~C guckes-usenet ~h KMail ' color index brightmagenta default '~C guckes-usenet ~h PMMail ' # # Pet Peeve: Some clients put the notification warning # into the body of the *post* (on Usenet), too! # guilty offenders: # User-Agent: KNode/0.8.0 # # ## ================================================== ## SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM ## ================================================== # 2002-12-17: # non-multipart mails which are tex/html almost always are spam: ##color index brightmagenta white "~h 'content-type: text/html'" # some use "Content-type" (small "type") # instead of "Content-Type", so i'll make the # pattern all lower-case to match both types. # 2001-12-15: # X-Mailer line consisting of "Hex gibberish with two dots" # this gave me some 189 matches out of 20050 in my spam folder. # examples: # X-Mailer: 3C0337A3.6E0B59EC.71ff3cbd41150678dc108a815c0a4836 # X-Mailer: 3C8FBD7A.3618CAB1.07dde1392bfb375daf7d0be27840724c # X-Mailer: 3CBF6D96.29270584.ba5e73b253594ee8140a256648143127 # X-Mailer: 3CDCD698.3A9397B7.450beda8d47820443a0f6e3fc320adfa # X-Mailer: 3F3294D3.1548A4F6.ba2d55e63b07870f139aed8db45f14be # X-Mailer: 3F58504A.1BE6AFA8.765e11ca8e976f689689734781ee6ebe # X-Mailer: 3FC0B18.5C84A237.c50bce966ab480cb8f2a727d2025e190 # color index green magenta \ #"X-Mailer: [0-9][A-Z0-9]*.[A-Z0-9]*.[.0-9A-Za-z]*$" # Addresses lines (To:, Cc:, Bcc:, Delivered-To:) # # Definite SPAM: # I *never* use my "inf" address to send any mail - for *years* now! # color index magenta black '~C guckes@inf.fu-berlin.de' # color index magenta black '~h "Delivered-To: .*guckes@inf.fu-berlin.de"' # # and my inbox.as address was *never* used for sending, anyway: # color index magenta black '~C sven@inbox.as' # # I have not posted to Usenet with a hostname in my address for years. # so an address like "guckes@host.math.fu-berlin.de" is *invalid*! # color index magenta black '~C guckes@[a-z]+.math.fu-berlin.de' # color index magenta black '~h "Delivered-To: .*guckes@[a-z]+.math.fu-berlin.de"' # Possible SPAM: # Mails which were not sent to a known mailing list # (tell mutt about them with the "lists" command) # and which have not been "Copied to" 'guckes' # and yet have been "Delivered-To:" 'guckes'. # [ Too bad you cannot use "~p" here. :-( ] # color index white magenta "! ~l ! ~C guckes ~h 'Delivered-To: .*guckes-'" # # SPAM indicators in To: or Cc: line ("~C"): # # Sent to "Undisclosed Recipients": # color index white magenta '~C Undisclosed.*Recipients' # # Mails sent from ("~f") free mail services: # [All commented as I get mails from sensible people, too.] # color index magenta black '! ~p ~f @(aol\|hotmail\|msn\|prodigy\|yahoo)\.(com' # color index magenta black '~f @(aol\|hotmail\|msn\|prodigy\|yahoo)\.(com\|net)' # color index magenta black '! ~p ~f @compulink.nlrs.com' # color index magenta black '! ~p ~f free' # color index magenta black '! ~p ~f funtime' # color index magenta black '! ~p ~f gmx' # color index magenta black '! ~p ~f worldnet.att.net' # SPAM indicators within the Message-ID: line (pattern ~i): # The Message-ID (aka MID) is often broken in many ways. # Spam seldomly has a correct MID; mostly the FQDN is invalid. # # Usual characters in MID: [-0-9a-zA-Z<>$@._+%] # Unusual characters in MID: [:%#|/] # # Message-ID values should not contain these characters: # color index yellow black "~i [{:%#|/]" # Are any of the "unusual characters" forbidden by the RFC? # (Gotta check that..) # # Message-IDs contains at least one '@' character, so # Message-IDs without a '@' are invalid: # color index yellow black "! ~i @" # # Message-IDs are enclosed in angle brackets, # so an '<' should not be missing: # color index yellow black "! ~i <" # # Message-IDs must not be empty: # color index yellow black "~i <>" # # Message-IDs' FQDN must not be empty: # color index yellow black "~i @>" # # Message-IDs' FQDN contain at least one dot: # color index yellow black "! ~i @.+[.].+>" # # Message-IDs FQDN does not end with a dot, # ie there must be at least a top level domain: # color index yellow black "~i [.]>" # # Message-IDs do not contain spaces. # color index yellow black "~i '<.* .*>'" # # Message-IDs should not contain "localhost". # color index yellow black "~i localhost" # commented because a LOT of people cannot # change this because of their crappy mail system. *sigh* # # Message-IDs should not contain "localdomain". # color index yellow black "~i localdomain" # # Message-IDs with more than one angle bracket: # color index yellow black "~i <.*<" # # Message-IDs with a strange domain name, # ie either one letter - or four and more: # color index yellow black "~i [.][a-z]>" # color index yellow black "~i [.][a-z]{4,}>" # # Message-IDs added by mail relays: # color index yellow black "~i @mail.chemie.fu-berlin.de>" # color index yellow black "~i @zedat.fu-berlin.de>" # color index yellow black "~i Mail.ZEDAT.FU-Berlin.DE>" # color index yellow black "~i @arbi.informatik.uni-oldenburg.de>" # color index yellow black "~i @arbi.informatik.uni-oldenburg.de>" # # [2001-06-17] Possible SPAM # Mails sent to "guckes-word" - but the # address lines do not contain my first name. # This is usually a copied address. # color index blue magenta "~C guckes- ! ~C sven" # # Mail received through inf.fu-berlin.de: # color index red magenta '~h "Received:.* inf.fu-berlin.de" ! ~h Delivered-To:' # # No letters in the Subject line at all: # color index green magenta "! ~s [a-z] ~h 'Delivered-To:.*guckes'" # 2000-12-30 # When the Subject indicates a reply (with ":re") # then there *must* be a reference to the previous message! # So if there is neither an In-Reply-To nor a References line # then it must have been sent with a crappy mailer.... # color index yellow magenta "~s re: ! ~x . ! ~h 'in-reply-to: '" # Guilty Mailers: # X-Mailer: Internet Mail Service (5.5.2650.21) # X-Mailer: MIME-tools 4.104 (Entity 4.116) # X-Mailer: USANET web-mailer (34WB1.4A.01) # SPAM SPAM SPAM # Address lines contain only local addresses # ie without an '@' character. # color index white magenta "! ~C @" # SPAM indicators in mail body ("~b") # # "Dollars and Percentages" # Example: "95% of Internet traffic ..." # and "Normally, we charge $500 per keyword" # color index white magenta "~b [1-9][0-9]% ~b [0-9]{3,}\$" # # Silly stuff: # color index white magenta "~b 'This is not a Spam!'" # Yeah, right. ;-) # # No characters in body -> SPAM! # color index black black "! ~b ." # SPAM indicators within the Subject: line ("~s"): # # Empty Subject line - "not a single character"! # color index white magenta "! ~s ." # # Subject line contains figures in dollar: # "Subject: Make $50,000 in 90 Days" # color index white magenta "~s '\\$[0-9]+[0-9]+'" # # 2002-03-03 # color index blue magenta '~s \\(none\\)' # color index blue magenta '~s "ad(v)?:"' # color index blue magenta '~s "adv\.[ ]"' # color index blue magenta '~s "To help your business succeed"' # color index blue magenta '~s "Have You Heard of Age Reversal"' # color index blue magenta '~s "Analyst.s Pick"' # color index blue magenta '~s "LOW risk, HIGH yield"' # color index blue magenta '~s "123 Inkjets"' # color index blue magenta '~s "150 FREE Business Cards"' # color index blue magenta '~s "Register to win your Dream Vacation"' # color index blue magenta '~s "Free Pics"' # color index blue magenta '~s "Mortgage For 30 Yr. Fixed Term"' # color index blue magenta '~s "TARGETED EMAIL ADDRESSES"' # color index blue magenta '~s "INCREASE PORTFOLIO VALUE"' # color index blue magenta '~s "Congratulations, You Won"' # color index blue magenta '~s "RAPID EXPANSION"' # color index blue magenta '~s "Take Control of Your Financial Security"' # color index blue magenta '~s "Work at Home . Make Great Money"' # color index blue magenta '~s ""' # color index blue magenta '~s ""' # color index blue magenta '~s ""' # color index blue magenta '~s ""' # "Get ...!" # Subject: Get $100 FREE NOW from Golden Comps Casino # Subject: Get 250 full-color business cards F R E E ! # Subject: Get 3 free CDs with free shipping (details inside) # Subject: Get A Dozen Sweetheart Roses & A FREE Vase--LIMITED TIME! # Subject: Get Cash Fast! # Subject: Get FREE DVD movies, Download software! # Subject: Get Instant Term Life Quotes for FREE # Subject: Get Paid $10 to Play Games and Win Much More!! # Subject: Get Paid to Shop! Get Paid to Eat Out! # Subject: Get a Collateralized Investment Opportunity! # Subject: Get a U.n.i.v.e.r.s.i.t.y D.i.p.l.o.m.a - Easily. # Subject: Get a new mortgage loan on your terms! # Subject: Get into that summer look # Subject: Get paid cash every time you receive email! # Subject: Get your site listed! # color index blue magenta '~s "Get.*!"' # URGENT # Subject: URGENT # Subject: URGENT AND CONFIDENTIAL # Subject: URGENT AND CONFIDENTIAL. # Subject: URGENT BUSINESS # Subject: URGENT BUSINESS PROPOSAL # Subject: URGENT NOTICE: Feds Cut Interest Rates Again ... # Subject: URGENT REPLY color index blue magenta '~s "URGENT"' # I cannot read/view Japanese (ISO-2022) # or Russian (koi8-r). Sorry! # color index blue magenta '~s "=\\?(big5|iso-2022|koi8-r|ks_c_5601)"' # Windows? eek! # color index blue magenta '~s "windows-125[1234]"' # color index blue magenta "~h 'Return-Path.*\.tw\>'" # SPAM indicators - special header lines. # # HTML attachments # color index green magenta "~h 'Content-Type: text/html'" ## ================================================== ## "Coloring by Reference" ## ================================================== # status: experimental # Show mails with "References" lines in the header. # This uses a rainbow scheme - the darker the color, # the more entries in the References line. # # color index brightyellow black "~h 'References: +<.+>'" # color index yellow black "~h 'References: +<.+> +<.+>'" # color index brightred black "~h 'References: +<.+> +<.+> +<.+>'" # color index red black "~h 'References: +<.+> +<.+> +<.+> +<.+>'" # color index blue black "~h 'References: +<.+> +<.+> +<.+> +<.+> +<.+>'" # color index green black "~h 'References: +<.+> +<.+> +<.+> +<.+> +<.+> +<.+>'" # Replies to my mails - indicated by an "in-reply-to" line # including my local domain. # color index brightyellow black "~x @guckes.net'" # References # color index brightyellow black "~h 'in-reply-to:.*@guckes.net'" # MIDs start with yyyymmdd, so at least should start with a year like "20[01][0-9]": # color index brightyellow black "~h 'in-reply-to:.*<20[01]...................@guckes.net>'" # # 2013-11-25 example: # 20131125150708.GC467@guckes.net date+time -> 14digits # yyyymmddhhmmss.AAddd@guckes.net two letters, followed by three or four digits # color index brightyellow black "~h 'in-reply-to:.*<201[0-9]{11}[.][a-z][a-z][0-9]{3,4}@guckes.net>'" # color index brightyellow black "~h 'in-reply-to:.*<201[0-9]*[.][a-z][a-z][0-9]*@guckes.net>'" color index brightyellow black "~h 'in-reply-to:.*<201[.a-z0-9]*@guckes.net>'" # NOTE: using "[A-Z]" for uppercase letters does NOT yield a match. # instead, using "[a-z]" works. # # 2009-07-05 # there are too many fake MIDs which use "@guckes.net" - # so i'll have to be more specific about this. # Example: Message-ID: <20090519155642.GA6817@guckes.net> color index brightyellow black "~x 20[01]..................@guckes.net'" # color index brightred white "~x @guckes.net !~x 200..................@guckes.net'" # fakes # 2017-05-23 # example: <20170518013856.ammilwivkbgjnp4q@guckes.net> color index brightyellow black "~x 20[01][0-9]*[.].*@guckes.net'" # color index brightyellow black "~h 'in-reply-to: .*math.fu-berlin.de'" # color index brightyellow black "~h 'references: .*math.fu-berlin.de'" # color index black yellow "~x @([a-z]+.)math.fu-berlin.de'" # actually, this should not happen any more.. # 2003-12-17, 2004-02-02: # possible feedback to one of my webpages: color index brightgreen black "~C webpage.*@guckes.net'" # color index brightgreen black "~C bark-chemnitz2004@guckes.net'" # ====================== # PAGER stuff # ====================== # "search" - matches found with search # within the internal pager. color search white blue # The "markers" indicate a wrapped line # when showing messages with looong lines. color markers red black # ====================== # GPG/PGP output # ====================== # 2005-03-01 # pgp/gpg signatures color index white blue "~s 'pgp(/gpg)? key'" color index white blue "~s 'signed gpg key:'" color index white blue "~s 'your signed.*key'" color index white blue "Signatur von Key" # 2005-03-08 # GridCalendar color index white red "~C sg@grical.org" # 2011-07-19 # 2006-02-20 # color index black cyan "~f ccc.de" # 2006-03-24 subscribe easterhegg@mail.cngw.org color index blue white "~C easterhegg@mail.cngw.org" # color index blue white "~C easterhegg@mail.cngw.org" color index brightyellow red "~f hh-city@lehmanns.de" color index brightyellow blue "~C sed-users-owner@yahoogroups.com" # From: newthinking network newsletter color index brightred white "~f info@newthinking.de ~s newsletter" color index brightred white "~f geld@in-berlin.de ~s konto" color index yellow red "~C lms@tfh-berlin.de" # 2006-04-21 color index yellow blue "~C brandenburg2006-ksp@guckes.net" # 2006-04-26 # color index white red "~f mailrobot@openbc.com" # color index white red "~f mailrobot@xing.com" # 2006-11-27 color index white magenta "~f gaestebuch-system@onlinehost.de" color index blue white "~f info@linuxsymposium.org" color index white red "~C linux-l-announce" # 2006-04-09 # =========================================================== # PROJECTS color index brightred black '~f acceptsub.*@yahoogroups.com' color index white blue '~C pf-lug.de' color index white blue '~C abibilder' # Recognizing the first-contact address: # color index white red "~C first-contact" color index white green "~C first-contact" color index green white "~C first-contact" # User-Agent: slrn/0.9.7.4 (SunOS) color index white blue "~h '^User-Agent:.*slrn'" color index green white "~h X-Mailer:.WWW-Mail ~f nion" color index brightyellow red "~f orkut" color index red white "~C linuxbus" # 2010-10-08 color index brightyellow magenta "~C undisclosed-recipients" # 2010-03-04 # mails sent via gmail.com had probably been edited within a browser. # a typical indication is broken citations, ie # broken across lines without any further indentation for that level. # message-hook "~h Message-ID:.*gmail.mail.com" "unignore message-id" # coloring the header line: color header brightyellow magenta "Message-ID:.*@mail.gmail.com" # coloring for the index: color index brightyellow magenta "~h Message-ID:.*@mail.gmail.com" # colorize mail which might be encrypted color index yellow green "~C pgp@" color index black green "~C keysigning@" # 2016-12-06 # colorize mail which might be spam color index black magenta "~h'^x-envelope-to: ' !~C pgp@ !~skey" color index black magenta "~h'^x-envelope-to:.*keysigningparty@' !~Cparty@ !~skey" # 2017-06-17 # see which messages have already been tagged # before applying ';' (tag-prefix) to commands color index brightmagenta black '~T' # vim: set ai et noic nowrap ft=muttrc list isk+=@-@,. ts=4 tw=120: EOF