Eric D. Schabell: Mutt Hints
Showing posts with label Mutt Hints. Show all posts
Showing posts with label Mutt Hints. Show all posts

Monday, February 25, 2013

Mutt hints - viewing iCal calendar invites

This is not the first place this has been posted but I wanted to capture it for myself here. I am not attempting to auto import ical files, or your meeting invites, into my macbook calendar application. I just want to view the details inline of the meeting.

Add this ruby script to your path:

#!/usr/bin/env ruby

require "rubygems" # apt-get install rubygems
require "icalendar" # gem install icalendar
require "date"

class DateTime
  def myformat
    (self.offset == 0 ? (DateTime.parse(self.strftime("%a %b %d %Y, %H:%M ") + self.icalendar_tzid)) : self).
        new_offset(Rational(Time.now.utc_offset - 60*60, 24*60*60)).strftime("%a %b %d %Y, %H:%M")
        # - 60*60 to compensate for icalendar gem/Outlook mismatch
  end
end

cals = Icalendar.parse($<)
cals.each do |cal|
  cal.events.each do |event|
    puts "Organizer: #{event.organizer}"
    puts "Event:     #{event.summary}"
    puts "Starts:    #{event.dtstart.myformat} local time"
    puts "Ends:      #{event.dtend.myformat}"
    puts "Location:  #{event.location}"
    puts "Contact:   #{event.contacts}"
    puts "Description:\n#{event.description}"
    puts ""
    end
end

Add this to your .mailcap file:

text/calendar; icalview.rb; copiousoutput

Then finally, add this to your .muttrc:

auto_view text/calendar

Enjoy viewing your meetings now!

Monday, August 10, 2009

Remove your email from Mutt group reply

I was having the problem that I have two email addresses that people send to me from work and when I was replying to a group in Mutt it would include my email in the .cc line. Here is how to prevent that from happening:

# Add this to your .muttrc to prevent your name being
# added to .cc on group replies.
#
alternates "emailA@yourDomain.com|emailB@yourDomain.com"

Friday, August 7, 2009

Display and read HTML mail with mutt

I have lately been running into more people out there who seem to like HTML mail, which did not by default display all that well. Here is how to get mutt to automatically display HTML e-mail in-line:

# In your $HOME you should have (or create one) a .mailcap file,
# add these lines for displaying HTML inline.
#
text/html;      links %s; nametemplate=%s.html
text/html;      links -dump %s; nametemplate=%s.html; copiousoutput

# Then you need to turn on the automagic in mutt to actually
# display the HTML e-mail by adding this to your $HOME/.muttrc
# file.
#
auto_view text/html

Enjoy!

Tuesday, December 5, 2006

Mutt mailer index overview!

I have been getting tired of having to look up the various Mutt flags that show up only once in awhile on the index view. 

I decided to put them here for myself and maybe for you out there who need only this information and not a complete Mutt tutorial to plow through. 

;-) 

Status Flags 

In addition to who sent the message and the subject, a short summary of the disposition of each message is printed beside the message number. Zero or more of the following “flags” may appear, which mean: 
  • D message is deleted (is marked for deletion) 
  • d message have attachments marked for deletion 
  • K contains a PGP public key 
  • N message is new 
  • O message is old 
  • P message is PGP encrypted 
  • r message has been replied to 
  • S message is PGP signed, and the signature is succesfully verified 
  • s message is PGP signed 
  • ! message is flagged 
  • * message is tagged 
Furthermore, the following flags reflect who the message is addressed to. They can be customized with the $to_chars variable. 
  • + message is to you and you only 
  • T message is to you, but also to or cc’ed to others 
  • C message is cc’ed to you 
  • F message is from you 
  • L message is sent to a subscribed mailing list